Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sensors only updating when reboot Home Assistant #27

Open
feinen opened this issue Jan 16, 2023 · 2 comments
Open

Sensors only updating when reboot Home Assistant #27

feinen opened this issue Jan 16, 2023 · 2 comments

Comments

@feinen
Copy link

feinen commented Jan 16, 2023

Sensors only updates when i reboot Home Assistant.

Logger: homeassistant.components.sensor
Source: custom_components/emby_upcoming_media/sensor.py:152
Integration: Sensor (documentation, issues)
First occurred: 11:43:32 AM (2 occurrences)
Last logged: 11:43:33 AM

Error adding entities for domain sensor with platform emby_upcoming_media
Error while setting up emby_upcoming_media platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 692, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 789, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 545, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 586, in _async_write_ha_state
attr.update(self.extra_state_attributes or {})
File "/config/custom_components/emby_upcoming_media/sensor.py", line 247, in extra_state_attributes
return self.handle_tv_show()
File "/config/custom_components/emby_upcoming_media/sensor.py", line 152, in handle_tv_show
card_item["title"] = show["SeriesName"]
KeyError: 'SeriesName'

@ZenyoMaarten
Copy link

Same over here 🙄

@feinen
Copy link
Author

feinen commented Feb 16, 2023

Found a workaround for this.

use a automation to call this service to refresh:

service: homeassistant.update_entity
data: {}
target:
entity_id: sensor.emby_latest_tv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants