MindrustUK / Heatmiser-for-home-assistant

Heatmiser Neo-Hub / Neostat support for home-assistant.io
88 stars 33 forks source link

Possible issue with neohubapi timing at midnight 00:XX #73

Closed roscoegray closed 2 years ago

roscoegray commented 3 years ago

An issue I came across when restarting HA, which I think might be more related to the neohubapi rather than this integration. It looks like there is some timing issue at midnight with 00:XX being passed as 24:XX, see logs below. After 01:00 it would work again.

_Logger: homeassistant.components.climate Source: custom_components/heatmiserneo/climate.py:56 Integration: Climate (documentation, issues) First occurred: 0:37:58 (1 occurrences) Last logged: 0:37:58 Error while setting up heatmiserneo platform for climate Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 205, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/heatmiserneo/climate.py", line 56, in async_setupentry , devices = await hub.get_live_data() File "/usr/local/lib/python3.8/site-packages/neohubapi/neohub.py", line 380, in get_live_data thermostats.append(NeoStat(self, thermostat)) File "/usr/local/lib/python3.8/site-packages/neohubapi/neostat.py", line 98, in init _time = datetime.strptime(self.time, "%H:%M") File "/usr/local/lib/python3.8/_strptime.py", line 568, in _strptime_datetime tt, fraction, gmtoff_fraction = _strptime(data_string, format) File "/usr/local/lib/python3.8/_strptime.py", line 349, in strptime raise ValueError("time data %r does not match format %r" % ValueError: time data '24:00' does not match format '%H:%M'

roscoegray commented 3 years ago

raised an issue with the neohubapi . Looks like the heatmiser api does return 24:00, its mentioned a few times in the api document.

MindrustUK commented 2 years ago

Closing issue as this has been raised with NeohubAPI