nordicopen / easee_hass

Custom component for Easee EV charger integration with Home Assistant
209 stars 34 forks source link

Update for sensor current fails #135

Closed gulli1986 closed 3 years ago

gulli1986 commented 3 years ago

Hello,

Firstly thanks for a great integration. I just got installed 2 Easee Home charger with a Ease Equalizer and get the following errors after integration to Home Assistant :

2021-08-17 19:41:13 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.garage_current fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 446, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 654, in async_device_update
raise exc
File "/config/custom_components/easee/entity.py", line 280, in async_update
self._state = self._state_func(self.data.state)
File "/config/custom_components/easee/const.py", line 178, in <lambda>
max(
TypeError: '>' not supported between instances of 'NoneType' and 'NoneType'
2021-08-17 19:46:11 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.driveway_current fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 446, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 654, in async_device_update
raise exc
File "/config/custom_components/easee/entity.py", line 280, in async_update
self._state = self._state_func(self.data.state)
File "/config/custom_components/easee/const.py", line 178, in <lambda>
max(
TypeError: '>' not supported between instances of 'NoneType' and 'NoneType'

It looks like there is something wrong with the current sensors on both Easee Home. I see that they are listed as "unavailable" in the entity list in HA

Any ideas what this might be? Is is just because no cars are currently charging?

Cheers.

gulli1986 commented 3 years ago

Closing this issue, I got it fixed after charging for the first time on both Easee Home. Then the error disappeared. Looks like some kind of a bug to me since the charger were not taken in use yet.