panasonic_cc icon indicating copy to clipboard operation
panasonic_cc copied to clipboard

Error adding entities for domain sensor / Error while setting up panasonic CC platform

Open djoenez opened this issue 3 years ago • 0 comments

Hello,

I would like to use your integration for communication with my panasonic heatpump KIT-WC07H3E5. Could you help with below errors?

2022-01-22 09:33:26 ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform panasonic_cc 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/panasonic_cc/sensor.py", line 128, in state return round(self._api.daily_energy,2) TypeError: type NoneType doesn't define round method 2022-01-22 09:33:26 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 257, in _async_setup_platform await asyncio.gather(*pending) 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/panasonic_cc/sensor.py", line 128, in state return round(self._api.daily_energy,2) TypeError: type NoneType doesn't define round method

djoenez avatar Jan 22 '22 08:01 djoenez