tomasmcguinness / homeassistant-mixergy

Add support for Mixergy's smart water tank into Home Assistant
MIT License
31 stars 8 forks source link

Everything is unavailable (post 2023.11.0 upgrade?) #25

Closed reedy closed 8 months ago

reedy commented 8 months ago

Not sure if this is an instance of #22, but I've been away from home for like 10 days, so HW off etc, and have just upgraded HA to 2023.11.0...

Couple of suspicious looking log entries:

Logger: custom_components.mixergy.sensor
Source: helpers/update_coordinator.py:290
Integration: Mixergy ([documentation](https://github.com/tomasmcguinness/homeassistant-mixergy), [issues](https://github.com/tomasmcguinness/homeassistant-mixergy/issues))
First occurred: 22:27:48 (1 occurrences)
Last logged: 22:27:48
Unexpected error fetching sensor data: 'heat_source'

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 246, in _async_update_data
    return await self.update_method()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/mixergy/sensor.py", line 25, in async_update_data
    await tank.fetch_data()
  File "/config/custom_components/mixergy/tank.py", line 277, in fetch_data
    await self.fetch_last_measurement()
  File "/config/custom_components/mixergy/tank.py", line 232, in fetch_last_measurement
    heat_source = current["heat_source"]
                  ~~~~~~~^^^^^^^^^^^^^^^
KeyError: 'heat_source'
Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:359
Integration: Sensor (documentation, issues)
First occurred: 22:27:48 (1 occurrences)
Last logged: 22:27:48

Error while setting up mixergy platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 246, in _async_update_data
    return await self.update_method()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/mixergy/sensor.py", line 25, in async_update_data
    await tank.fetch_data()
  File "/config/custom_components/mixergy/tank.py", line 277, in fetch_data
    await self.fetch_last_measurement()
  File "/config/custom_components/mixergy/tank.py", line 232, in fetch_last_measurement
    heat_source = current["heat_source"]
                  ~~~~~~~^^^^^^^^^^^^^^^
KeyError: 'heat_source'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 359, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/mixergy/sensor.py", line 30, in async_setup_entry
    await coordinator.async_config_entry_first_refresh()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 262, in async_config_entry_first_refresh
    raise ex
homeassistant.exceptions.ConfigEntryNotReady: 'heat_source'

image

tomasmcguinness commented 8 months ago

I've just been away for 7 days and experienced exactly the same thing. Once I turned off holiday mode and restarted HA, everything was fine! You've reported the same thing, so I expect we had the same problem.

I suspect the holiday setting is the problem and I'll be taking a look!

tomasmcguinness commented 8 months ago

I've added a new release with support for Holiday mode

image image

Hopefully this will resolve the issue for you!

reedy commented 8 months ago

Thanks!

I updated the addon, did the necessary restart and the data seems to be back.. :)

tomasmcguinness commented 8 months ago

Super!