asantaga / lightwaverf_HA_EnergySensor

Home Assistant Sensor for the LightwaveRF energy monitor
MIT License
5 stars 3 forks source link

Error in HA log #11

Closed anthonywalker75 closed 10 months ago

anthonywalker75 commented 2 years ago

Hello

The following error (see below) has appeared in my home assistant log. The values are coming through. Although it was returning "Unknown" for a time.

Regards

Anthony

This error originated from a custom integration.

Logger: homeassistant Source: custom_components/lightwaverf_energy/sensor.py:108 Integration: Lightwave Energy Monitor First occurred: 4 January 2022, 19:36:22 (6 occurrences) Last logged: 23:27:13

Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 734, in _update_entity_states await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 492, in async_update_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/lightwaverf_energy/sensor.py", line 108, in state return int(self.today_usage) / 1000 TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

asantaga commented 2 years ago

My HA system has been down a bit, moving house etc, but I want to get this working again. I'll hunt this down this weel thanks

asantaga commented 2 years ago

Sorry for the long delay (like months), i got distracted by many other things,

Do you still have this issue?