bob1de / hass-apps

Some useful apps and snippets to empower Home Assistant and AppDaemon even more.
Apache License 2.0
85 stars 23 forks source link

[schedy] Add delay for adjusting temperatur on open window #44

Closed chbndrhnns closed 4 years ago

chbndrhnns commented 4 years ago

Hi, I am wondering if it was possible to introduce a delay for the operation that is scheduled after an opened window has been detected. Only if this delay passes and the window is still open, the adjustment should be performed. This is to catch very short open/close cycles and save an adjustment cycle on the thermostate (which usually run on battery). I saw this setting on my Homematic IP components and quite liked it.

bob1de commented 4 years ago

Hi,

This (or delayed actions in general) has been requested some times already. The problem about is that it's not trivial to support delayed reactions to state changes in the way Schedy works. The reasons lie in the internals and changing this would be a massive undertaking and would make the software much more complex.

I suggest in such cases to use an input_boolean that is turned on with an automation X seconds after window was opened and back off when it's closed again. Then, the input_boolean could be used as the window sensor in Schedy.

A method that requires less code (although I don't exactly know if it's possible) would be to create a template binary sensor in HA that is on as long as the window is open for more than X seconds.

Best regards Robert

hackex commented 1 year ago

Hi, I am wondering if it was possible to introduce a delay for the operation that is scheduled after an opened window has been detected. Only if this delay passes and the window is still open, the adjustment should be performed. This is to catch very short open/close cycles and save an adjustment cycle on the thermostate (which usually run on battery). I saw this setting on my Homematic IP components and quite liked it.

Did you solve it? Which of the mentioned option did you use?

chbndrhnns commented 1 year ago

I haven't tried.