panasonic_cc icon indicating copy to clipboard operation
panasonic_cc copied to clipboard

Error after updating to HA 2023.7.0

Open robinostlund opened this issue 1 year ago • 68 comments

2023-07-06 08:32:21.862 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up panasonic_cc platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 361, in _async_setup_platform await asyncio.gather(*pending) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 504, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 788, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in add_to_platform_finish self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 742, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 809, in _async_write_ha_state state = self._stringify_state(available) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 748, in _stringify_state if (state := self.state) is None: ^^^^^^^^^^ File "/config/custom_components/panasonic_cc/sensor.py", line 142, in state return round(self._api.daily_energy,2) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: type NoneType doesn't define round method

robinostlund avatar Jul 06 '23 06:07 robinostlund

The issue is present on HA 2023.7.1 as well. I have 3 devices and usually 1 or 2 of them becomes unavailable after HA is restarted.

After updating to HA 2023.7.0 and after several restarts it managed to find all 3 devices but it seems totally random after every restart which one of them becomes unavailable.

bakoscsaba avatar Jul 07 '23 06:07 bakoscsaba

I can confirm this behavio @bakoscsaba. Same issue on my side.

elninosi avatar Jul 07 '23 06:07 elninosi

confirmed... 1 or two out of three devices become unavailable after HA restart. When removing and configuring the integration completely new, all three devices are working. after the next restart, same behavior: 1 or 2 devices become unavailable.

nicx avatar Jul 07 '23 07:07 nicx

Unfortunately - same here 🤔 2-3 (randomly, changing) out of 6 AC's unavailable. The original Panasonic app works as usual. THX

Herbi-1966 avatar Jul 07 '23 15:07 Herbi-1966

Same here for 2023.7.1. 2 out of 2 are unavailable now.

rleongcs avatar Jul 07 '23 17:07 rleongcs

Same for me after updating 2023.7.1 my AC unavailable after most reboots, but works sometimes….

MagnusHass avatar Jul 07 '23 18:07 MagnusHass

Same here, I have 1 outdoor unit connected to two indoor units. One is constantly unavailable.

erikaugl avatar Jul 07 '23 20:07 erikaugl

Same here for 2023.7.1. 2 out of 2 are unavailable now.

After few reboots, 1 out of 2 working.

rleongcs avatar Jul 08 '23 06:07 rleongcs

Ditto same issue after update to 2023.7.1

jwinterton avatar Jul 08 '23 06:07 jwinterton

Same issue here but other version

Home Assistant 2023.6.3 Supervisor 2023.07.1

My error is also different but same behaviour 2/3 devices are loaded.



`Error unloading entry for panasonic_cc

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 543, in async_unload
    result = await component.async_unload_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/panasonic_cc/__init__.py", line 102, in async_unload_entry
    await asyncio.wait(
  File "/usr/local/lib/python3.11/asyncio/tasks.py", line 415, in wait
    raise TypeError("Passing coroutines is forbidden, use tasks explicitly.")
TypeError: Passing coroutines is forbidden, use tasks explicitly.

TimBE1989 avatar Jul 08 '23 08:07 TimBE1989

I think it has nothing to do with the HA version, but the problem is from Panasonic's side with the newer version of the app

Home Assistant 2023.5.4 Supervisor 2023.07.1 Operating System 10.1

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 554, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 779, 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'

herky999 avatar Jul 09 '23 09:07 herky999

I think it has nothing to do with the HA version, but the problem is from Panasonic's side with the newer version of the app

Home Assistant 2023.5.4 Supervisor 2023.07.1 Operating System 10.1

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 554, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 779, 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'

Maybe it could be a timing problem?

Herbi-1966 avatar Jul 09 '23 10:07 Herbi-1966

After a full restart (OS) of HA it was resolved for me.

galletn avatar Jul 09 '23 12:07 galletn

After a full restart (OS) of HA it was resolved for me.

Hi, how many indoor/outdoor units do you run? What about a second, third () HA restart? In my case, randomly 2-3 out of 6 indoor AC's are not recognized (2 outdoor units).

Herbi-1966 avatar Jul 09 '23 14:07 Herbi-1966

After a full restart (OS) of HA it was resolved for me.

After full restart OS is ok, thanks

herky999 avatar Jul 09 '23 17:07 herky999

Unfortunately even a complete shutdown and restart of my NUC, running HAssOS, didn't help in my case...

Herbi-1966 avatar Jul 09 '23 18:07 Herbi-1966

a complete shutdown/restart helps not in my case.

nicx avatar Jul 09 '23 18:07 nicx

Dear all,

a hint from @aceindy (thank you very much!) in the Homeassistant 'Panasonic Comfort Cloud' community made it for me:

Delete the integration and re-install it.

And all works fine again! :-)

Regards Herbi

Herbi-1966 avatar Jul 10 '23 15:07 Herbi-1966

no, doesnt help here neither. its the same as a new reconfiguration: it works only one time, after a restart the problem reappears.

nicx avatar Jul 10 '23 15:07 nicx

Just checked it with a full (system) restart and the integration 'survived' -strange...

Herbi-1966 avatar Jul 10 '23 16:07 Herbi-1966

i thinks it has not only to do with the integration, but also with the panasonic server side. maybe a combination. sometimes a fresh reboot or reinstallation helps, sometimes not. sometimes after a ha restart some devices are failing, sometimes not.

nicx avatar Jul 10 '23 16:07 nicx

I can well imagine that, maybe a timing problem. The Panasonic server has delays, the integration queries are coming too quickly (...?). I will watch...

Herbi-1966 avatar Jul 10 '23 16:07 Herbi-1966

I have the same issue and restart don't help. However, disabling the daily energy sensor solve the issue. But it would be nice to be able to have those sensor.

ParalaX002 avatar Jul 11 '23 06:07 ParalaX002

I have the same issue and restart don't help. However, disabling the daily energy sensor solve the issue. But it would be nice to be able to have those sensor.

Disable Daily Energy + restart fixed. Hopefully, this can be fixed

krism23 avatar Jul 11 '23 09:07 krism23

Disabling Daily Energy didn't help me. After restart 2 of 3 or 1 of 3 devices are unavailable. I also tried disabling Current Power and Outside Temperature sensors but still behaves the same.

I'm on HA 2023.7.2

bakoscsaba avatar Jul 14 '23 15:07 bakoscsaba

Did you try to delete and reinstall the Integration?

Herbi-1966 avatar Jul 15 '23 06:07 Herbi-1966

My bad... I disabled the entities one by one. If daily energy is disabled from the configuration menu it works. Of course it would be very nice to have energy info back.

As workaround would it work to create daily energy as a separate integration?

bakoscsaba avatar Jul 15 '23 12:07 bakoscsaba

same here

slaygirlz avatar Jul 16 '23 12:07 slaygirlz

The Panasonic units doesn’t really give reliable consumption data, so you have to take it with a pitch of salt. The daily seems trustworthy but the power sensor is just a random number generator.

kongjudas avatar Jul 20 '23 20:07 kongjudas

so is there currently any reliable solution to this problem or do we need to wait for a bugfix? :)

nicx avatar Jul 21 '23 05:07 nicx