ksya / ha-nefiteasy

Nefit Easy connection for Home Assistant
74 stars 30 forks source link

Holiday mode automatically switched off after 1 minute #173

Open Wummeke opened 1 year ago

Wummeke commented 1 year ago

Last week I have updated the integration to the latest release (v0.3.0) and I noticed that when I set the Holiday mode with the switch, it is turned off automatically after (roughly) 1 minute.

In the logbook I have the following messages:

Holiday mode turned on triggered by service switch.turn_on
15:05:47 - 1 minute ago 

Hot water turned off
15:06:50 - Now

Holiday mode turned off
15:06:50 - Now

In my logfiles, I see the following:


2022-07-19 15:05:46 DEBUG (MainThread) [custom_components.nefiteasy.switch] Switch Nefit holiday_mode to on, endpoint=/heatingCircuits/hc1/holidayMode/status.
2022-07-19 15:05:47 DEBUG (MainThread) [custom_components.nefiteasy] Manually updated nefiteasy data
2022-07-19 15:06:50 DEBUG (MainThread) [custom_components.nefiteasy] Finished fetching nefiteasy data in 3.454 seconds (success: True)

Not really much, as you can see. But what I think is happening, is that the task to turn on holiday_mode is not actually sent to the thermostat, and one minute later HA is simply updated with the actual state of that setting.

I am using HA version 2022.7.5

altserg commented 1 year ago

It's because holiday end date. you can change it in the native nefit app, but not from the integration.

Wummeke commented 1 year ago

Good catch! I've set the end date of holiday mode to 12/31/2023, Lets see if I can keep using the holiday switch the next 1,5 years. That would be an okay workaround.

altserg commented 1 year ago

Is there any chance to fix the issue ? Maybe first as a workaround to set the holiday end date to +1 year from current date. Globally I can see in the source code what should be done ( create a subclass for holiday mode switch, override the turn_on method, and add there the date setting via holiday end endpoint). But I lack the Nefitaio knowledge to do it fast... I think that for the author it will take couple of hours, for me couple of weeks