dreautall / ha-stromnetzgraz

Home Assistant Custom Component for Stromnetz Graz
MIT License
15 stars 1 forks source link

'<=' not supported between instances of 'datetime.datetime' and 'float' #4

Closed wieluk closed 1 year ago

wieluk commented 1 year ago

Hi, it worked for a short period of time but with shifted dates. Now Iam getting this error.

Unexpected error fetching Stromnetz Graz Sensor data: '<=' not supported between instances of 'datetime.datetime' and 'float'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 239, in _async_refresh
    self.data = await self._async_update_data()
  File "/config/custom_components/stromnetzgraz/sensor.py", line 166, in _async_update_data
    await self._insert_statistics()
  File "/config/custom_components/stromnetzgraz/sensor.py", line 257, in _insert_statistics
    if last_stats_time is not None and start <= last_stats_time:
TypeError: '<=' not supported between instances of 'datetime.datetime' and 'float'
dreautall commented 1 year ago

Hey, did you update to the latest version 0.1.6 released yesterday? Should be fixed with e7dbf27.

wieluk commented 1 year ago

Sorry and thanks. I updated but forgot to restart HA.