cgarwood / homeassistant-fullykiosk

Fully Kiosk Browser integration for Home Assistant
Apache License 2.0
153 stars 27 forks source link

KeyError - screenOn #82

Closed mpjanofsky closed 2 years ago

mpjanofsky commented 2 years ago

Seeing a KeyError in HA logs when toggling the screensaver or Bring to Foreground.

Full log entry:

2022-01-07 19:45:37 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 134, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 265, in _async_refresh
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 505, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 538, in _async_write_ha_state
    state = self._stringify_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 511, in _stringify_state
    if (state := self.state) is None:
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 935, in state
    return STATE_ON if self.is_on else STATE_OFF
  File "/config/custom_components/fullykiosk/light.py", line 42, in is_on
    return self.coordinator.data["screenOn"]
KeyError: 'screenOn'

I saw a previous issue for that seemed to indicate the the Fully API changed, but I can't find anything around that.

mpjanofsky commented 2 years ago

Updated to the latest version of Fully on the tablet and this is resolved!