cgarwood/homeassistant-fullykiosk

KeyError: 'currentPage' in 0.1.4

danobot opened this issue · 3 comments

I am facing this error in v0.1.4

Logger: homeassistant.components.sensor
Source: custom_components/fullykiosk/sensor.py:69
Integration: Sensor (documentation, issues)
First occurred: 1:51:01 PM (2 occurrences)
Last logged: 1:51:01 PM

Error adding entities for domain sensor with platform fullykiosk
Error while setting up fullykiosk platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 613, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 748, in add_to_platform_finish
    self.async_write_ha_state()
  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 "/config/custom_components/fullykiosk/sensor.py", line 69, in state
    return self.coordinator.data[self._sensor]
KeyError: 'currentPage'

I have 2 kiosks set up:
image
And have manually disabled some of the generated entities. Not sure if that is causing the problem:
image

What version of Fully are you running? Wondering if they changed what the API returns in an update

I am running 1.44.3-play. The kitchen tablet runs a licensed version, the lounge tablet is unlicensed at the moment.

Looks like that fixed it, thanks for the quick solution, appreciate it 👍
cheers