robert-alfaro / genius-lyrics

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

anyone else having trouble? #19

Closed sdaltons1 closed 2 years ago

sdaltons1 commented 2 years ago

Had this working a few days ago but had to rebuild some stuff and lost it. During the rebuild, I did update to core-2022.4.1 so that may have played a part in my troubles. I'm still fairly new at this so it is also possible I'm overlooking something obvious.

Logger: homeassistant.helpers.template Source: helpers/template.py:1828 First occurred: 11:38:37 AM (72 occurrences) Last logged: 11:47:55 AM

Template variable warning: 'homeassistant.util.read_only_dict.ReadOnlyDict object' has no attribute 'media_artist' when rendering '## {{ states.sensor.kitchen_lyrics.attributes.media_artist }} - {{ states.sensor.kitchen_lyrics.attributes.media_title }} {{ states.sensor.kitchen_lyrics.attributes.media_lyrics }}' Template variable warning: 'homeassistant.util.read_only_dict.ReadOnlyDict object' has no attribute 'media_title' when rendering '## {{ states.sensor.kitchen_lyrics.attributes.media_artist }} - {{ states.sensor.kitchen_lyrics.attributes.media_title }} {{ states.sensor.kitchen_lyrics.attributes.media_lyrics }}' Template variable warning: 'homeassistant.util.read_only_dict.ReadOnlyDict object' has no attribute 'media_lyrics' when rendering '## {{ states.sensor.kitchen_lyrics.attributes.media_artist }} - {{ states.sensor.kitchen_lyrics.attributes.media_title }} {{ states.sensor.kitchen_lyrics.attributes.media_lyrics }}'

Logger: homeassistant.helpers.template Source: helpers/template.py:1840 First occurred: 11:33:09 AM (6 occurrences) Last logged: 11:33:09 AM

Template variable error: 'None' has no attribute 'attributes' when rendering '## {{ states.sensor.kitchen_lyrics.attributes.media_artist }} - {{ states.sensor.kitchen_lyrics.attributes.media_title }} {{ states.sensor.kitchen_lyrics.attributes.media_lyrics }}' Template variable error: 'None' has no attribute 'attributes' when rendering '## {{ states.sensor.kitchen_lyrics.attributes.media_artist }} - {{ states.sensor.kitchen_lyrics.attributes.media_title }} {{ states.sensor.kitchen_lyrics.attributes.media_lyrics }}'

leo0615 commented 2 years ago

Same here.

Logger: homeassistant.helpers.template Source: helpers/template.py:1840 First occurred: 12:24:51 (1 occurrences) Last logged: 12:24:51

Template variable error: 'None' has no attribute 'attributes' when rendering '## {{ states.sensor.denon_dht_s716h_lyrics.attributes.media_artist }} - {{ states.sensor.denon_dht_s716h_lyrics.attributes.media_title }} {{ states.sensor.denon_dht_s716h_lyrics.attributes.media_lyrics }}'

caraar12345 commented 2 years ago

Looks like #17 has come to bite us properly - device_state_attributes have been removed entirely.

https://github.com/home-assistant/core/pull/67837

leo0615 commented 2 years ago

Thanks caraar12345.

fix in sensor.py made the functionality come back. 👍