You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Go to logs and see error (note the component still seems to work):
Logger: homeassistant.helpers.entity
Source: custom_components/steam_wishlist/entities.py:111
First occurred: November 3, 2020, 3:30:03 PM (1 occurrences)
Last logged: November 3, 2020, 3:30:03 PM
Update for sensor.steam_wishlist fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 474, in async_device_update
raise exc
File "/config/custom_components/steam_wishlist/entities.py", line 80, in async_update
await self.coordinator.async_request_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 126, in async_request_refresh
await self._debounced_refresh.async_call()
File "/usr/src/homeassistant/homeassistant/helpers/debounce.py", line 73, in async_call
await self.hass.async_add_hass_job(self._job) # type: ignore
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 193, in async_refresh
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 296, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 320, in _async_write_ha_state
sstate = self.state
File "/config/custom_components/steam_wishlist/entities.py", line 137, in state
return self.is_on
File "/config/custom_components/steam_wishlist/entities.py", line 111, in is_on
pricing = self.coordinator.data[self.game["steam_id"]]
KeyError: '274520'
Home Assistant Version: 0.117.2
Custom Component Version: Latest
The text was updated successfully, but these errors were encountered:
This also popped up when I changed line 111 above to catch the KeyError and return False. It just bubbled up in the device_state_attributes propery.
Logger: homeassistant.helpers.entity
Source: custom_components/steam_wishlist/entities.py:148
First occurred: 3:18:58 PM (1 occurrences)
Last logged: 3:18:58 PM
Update for sensor.steam_wishlist fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 474, in async_device_update
raise exc
File "/config/custom_components/steam_wishlist/entities.py", line 80, in async_update
await self.coordinator.async_request_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 126, in async_request_refresh
await self._debounced_refresh.async_call()
File "/usr/src/homeassistant/homeassistant/helpers/debounce.py", line 73, in async_call
await self.hass.async_add_hass_job(self._job) # type: ignore
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 193, in async_refresh
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 296, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 323, in _async_write_ha_state
attr.update(self.device_state_attributes or {})
File "/config/custom_components/steam_wishlist/entities.py", line 148, in device_state_attributes
self.game["steam_id"], self.coordinator.data[self.game["steam_id"]]
KeyError: ''
This game does exist as a sensor and is in my config (Darkwood) so may need to add some better logging to figure out what's going on.
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Home Assistant Version: 0.117.2
Custom Component Version: Latest
The text was updated successfully, but these errors were encountered: