gcorgnet / sensor.emby_upcoming_media

Home Assistant component to feed Upcoming Media Card with the latest releases on an Emby instance.
MIT License
20 stars 17 forks source link

Error while setting up component #5

Closed darkenbula closed 4 years ago

darkenbula commented 4 years ago

Configuration

Add your logs here. 2020-04-13 18:29:49 ERROR (MainThread) [homeassistant.components.sensor] 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 186, in _async_setup_platform await asyncio.gather(pending) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 295, in async_add_entities await asyncio.gather(tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 447, in _async_add_entity await entity.async_update_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 284, in async_update_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 328, in _async_write_ha_state attr.update(self.device_state_attributes or {}) File "/config/custom_components/emby_upcoming_media/sensor.py", line 159, in device_state_attributes show["Id"], show["ImageTags"]["Primary"] KeyError: 'Primary'

LEJOUI commented 4 years ago

I had the same error. Couple of HA restarts seems to solve it. But it does come back sometimes.

darkenbula commented 4 years ago

Spot on, not sure what happened, but it's working brilliantly

gcorgnet commented 4 years ago

Closing for now as this seems to be fixed.