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

KeyError: 'cassette_days_remaining' #11

Open
thenoid opened this issue Nov 7, 2024 · 0 comments
Open

KeyError: 'cassette_days_remaining' #11

thenoid opened this issue Nov 7, 2024 · 0 comments

Comments

@thenoid
Copy link

thenoid commented Nov 7, 2024

Just replaced the cassete with a C2 and instead of saying days left like the c5 it shows a percentage.

homeassistant  | Traceback (most recent call last):
homeassistant  |   File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 266, in _handle_refresh_interval
homeassistant  |     await self._async_refresh(log_failures=True, scheduled=True)
homeassistant  |   File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 481, in _async_refresh
homeassistant  |     self.async_update_listeners()
homeassistant  |   File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 176, in async_update_listeners
homeassistant  |     update_callback()
homeassistant  |   File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 561, in _handle_coordinator_update
homeassistant  |     self.async_write_ha_state()
homeassistant  |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1007, in async_write_ha_state
homeassistant  |     self._async_write_ha_state()
homeassistant  |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1132, in _async_write_ha_state
homeassistant  |     self.__async_calculate_state()
homeassistant  |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1069, in __async_calculate_state
homeassistant  |     state = self._stringify_state(available)
homeassistant  |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
homeassistant  |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1013, in _stringify_state
homeassistant  |     if (state := self.state) is None:
homeassistant  |                  ^^^^^^^^^^
homeassistant  |   File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 544, in state
homeassistant  |     value = self.native_value
homeassistant  |             ^^^^^^^^^^^^^^^^^
homeassistant  |   File "/config/custom_components/waterguru/sensor.py", line 238, in native_value
homeassistant  |     return self.coordinator.data[self._id].sensors[self._waterguru_key]
homeassistant  |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
homeassistant  | KeyError: 'cassette_days_remaining'
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

1 participant