panasonic_cc icon indicating copy to clipboard operation
panasonic_cc copied to clipboard

Error updating energy sensors

Open unimatrixx0 opened this issue 2 years ago • 2 comments

Has anyone this error in HomeAssistant: How to fix it?

Logger: homeassistant.helpers.entity Source: custom_components/panasonic_cc/panasonic.py:133 Integration: Panasonic Comfort Cloud (documentation) First occurred: 7. Juli 2023 um 14:27:01 (5603 occurrences) Last logged: 12:58:22

Update for sensor.buro_1_og_daily_energy fails Update for sensor.buro_1_og_current_power fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 695, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 940, in async_device_update await self.async_update() File "/config/custom_components/panasonic_cc/sensor.py", line 164, in async_update await self._api.update_energy() File "/config/custom_components/panasonic_cc/panasonic.py", line 70, in update_energy await self.do_update_energy() File "/config/custom_components/panasonic_cc/panasonic.py", line 133, in do_update_energy c_energy = data['parameters']['energyConsumption'] ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ KeyError: 'energyConsumption'

unimatrixx0 avatar Jul 19 '23 11:07 unimatrixx0

This has been broken for me for at least a week, probably a few weeks. Initially it felt like it would sometimes break on rebooting homeassistant and had a chance of working/not working on every home assistant reboot, but eventually I was never able to get any sensors or controls working after a lot of manual reboots.

Today I found this issue and tried to manually apply the pull request https://github.com/sockless-coding/panasonic_cc/pull/116 . This seems to immediately have fixed this issue for me! The daily energy sensor is available as well, and without the fix no sensors or controls were available.

AnonymousRetard avatar Aug 15 '23 11:08 AnonymousRetard

I believe this is fixed now?

codyc1515 avatar Jan 09 '24 20:01 codyc1515