Heatmiser-for-home-assistant icon indicating copy to clipboard operation
Heatmiser-for-home-assistant copied to clipboard

Bug: '24:00' does not match format '%H:%M'

Open funks81 opened this issue 1 year ago • 6 comments

My thermostats all seem to go offline for an hour between 0000 and 0100 as the time seems to be in the format 24:00 rather than 00:00.

Error log as follows:

This error originated from a custom integration.

Logger: custom_components.heatmiserneo Source: helpers/update_coordinator.py:290 Integration: Heatmiser Neo Climate (documentation) First occurred: 00:47:29 (13 occurrences) Last logged: 00:59:37

Unexpected error fetching neostat data: time data '24:00' does not match format '%H:%M' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 246, in _async_update_data return await self.update_method() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/heatmiserneo/init.py", line 41, in async_update_data _, devices_data = await hub.get_live_data() ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/neohubapi/neohub.py", line 449, in get_live_data thermostats.append(NeoStat(self, thermostat)) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/neohubapi/neostat.py", line 97, in init _time = datetime.strptime(self.time, "%H:%M") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/_strptime.py", line 568, in _strptime_datetime tt, fraction, gmtoff_fraction = _strptime(data_string, format) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/_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'

funks81 avatar Oct 16 '23 09:10 funks81

Thanks for reporting this bug @funks81 ! I have verified I can see the same outage in my own system. I'm currently doing a near entire re-write of the integration. I'll look to address this as part of one of the up coming releases.

MindrustUK avatar Oct 16 '23 09:10 MindrustUK

Issue reported in neohubapi library here: https://gitlab.com/neohubapi/neohubapi/-/issues/8

MindrustUK avatar Nov 21 '23 16:11 MindrustUK

Looks like this has now been fixed upstream in neohubapi. https://gitlab.com/neohubapi/neohubapi/-/merge_requests/30 @MindrustUK possible to pull the new neohubapi?

cros13 avatar May 01 '24 06:05 cros13

Bumped in Dev branch: https://github.com/MindrustUK/Heatmiser-for-home-assistant/commit/ca1599f48f46ac8bac71c96dc7330a11056bc935 NeoHubAPI Version 2 and above are not compatible with master main branch so will not fix in the current release. I'm concentrating on a fix forward approach due to lack of time to concentrate on this project.

MindrustUK avatar May 01 '24 08:05 MindrustUK

Thanks for this - what's the state of the dev branch? Is it in a working state just not fully tested, or is there functionality broken etc.?

stever29 avatar May 02 '24 23:05 stever29

Hi @stever29 Excellent question. There's a laundry list of enhancement, fixes, and quality of life changes that I'd like to get to, but for a short summary;

  • NeoPlugs are non functional.
  • Hold functionality is overly verbose in terms of GUI controls, it needs polish and to be configurable (I.e. I'd like to make the GUI options suit the users preference). Things like hours and minutes don't persist quite properly but once set they are honoured on executing a hold.
  • Sensors, NeoStats and time clocks should all be working without issue.
  • Lots of fixes in terms of consistent naming, sensors for battery devices, modes for heating, cooling etc.

When I get back to working on this; configuration options are top of my list to finish followed by fixing NeoPlug functionality.

MindrustUK avatar May 03 '24 09:05 MindrustUK