Hi everybody,
I currently need to turn on an infrared heater every x minutes, then turn it off for y minutes, then turn it back on for x minutes, and so forth.
As I haven’t changed my Home Assistant configuration in quite a while, I don’t know what’s currently the best way to do this (as some things that used to be difficult have seemed to improve a lot!).
I thought of creating
- input_boolean.onofftimer => use this entity’s state to trigger the automation
- input_datetime.onoff_durationon => how long should the switch be on off
- input_datetime.onoff_durationoff => how long should the switch be off for
Whether or not the switch is currently off can be determined via switch.onofftimer. This is the tasmota smart outlet I use to control the infrared heater.
I just don’t know how to write the automation in order to
- IF
input_boolean.onofftimer
is on, then - turn on
switch.onofftimer
-
delay
for time defined viainput_datetime.onoff_durationon
- turn off
switch.onofftimer
-
delay
for time defined viainput_datetime.onoff_durationoff
-
repeat until
input_boolean.onofftimer
is switched off
The automation itself is easy, but I don’t know how to loop it until input_boolean.onofftimer
is switched off.
I thought of calling the automation itself at the very end (after the “off” delay)… but if I do this, it will constantly run, even when input_boolean.onofftimer
is switched off, correct? Because once the loop starts, it will no longer check whether or not the boolean is still switched on.
Can you please help me create this automation? There is moisture in a brick wall in my house and I need to manually do this at the moment. Which is fine, but automating it without having to worry that I leave it on too long (or forgot to turn it back on at all) would be really nice.
Thank you in advance for your ideas
1 post - 1 participant