robert-alfaro / genius-lyrics

Home Assistant custom component for fetching song lyrics from Genius.com
25 stars 7 forks source link

Service not working #16

Closed mfabiani53 closed 10 months ago

mfabiani53 commented 2 years ago

The service genius_lyrics.search_lyrics is not working. It gives me unknown error everytime i try to call it.

This is the way i try to use it:

Schermata 2022-01-21 alle 12 35 33

I am running HA OS 2021.12.10 on a RaspBerry pi 4

robert-alfaro commented 2 years ago

Thanks for reporting, I will look into this soon. I was unaware this had broken.

mfabiani53 commented 2 years ago

I just upgraded the integration to your latest release, but this bug is still there... always "unknown error" after calling the service. I don't know if these errors in the home assistant log are referred to this, but they are shown just after the service failed:

2022-04-22 19:59:23 ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Unexpected error for call_service at pos 1: 'bool' object is not callable
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 379, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 582, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1634, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1677, in _execute_service
    await self._hass.async_add_executor_job(
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
TypeError: 'bool' object is not callable

Hope this helps....

robert-alfaro commented 2 years ago

I'm refactoring as we speak...switching to register entity service api.

jareau commented 1 year ago

Not working for me either. Looks like an awesome project, though.

image

robert-alfaro commented 10 months ago

fixing in refactored branch and possibly surfacing library methods as services

robert-alfaro commented 10 months ago

Not working for me either. Looks like an awesome project, though.

image

in your screenshot, entity_id should actually be the sensor entity created by the integration, like sensor.office_mini_lyrics