I need help with simple automation please

Hi, I’m looking for help with simple automation as I’m not too good at programming, just a regular user.
I created automation:

When:
When hot water temp is below 40
And if:
If the time is after 5:00 and before 22:00
Then do:
Switch ‘Turn on’ Boiler Heater 1

and it works perfectly fine, but obviously during the night when water temp falls below 40, the condition time is not met and the automation stops until the temp falls again to below 40, so in the morning I have to manually turn the boiler heater on. I would like it to turn on at 5:00 automatically. I know I can create another separate automation triggered by the time, but I want to make it simple and want to be able to turn that automation on and off from the panel, ie. when I’m away for the day. I don’t want to have 2 separate automations for 1 task on my panel. Can it be done?

Thanks a lot in advance.

Yes, just add a 05:00 time trigger to your existing automation.

And, if you need it, a numeric state condition to check if the temperature is below 40.

Neither addition will affect your current triggers and conditions.

So you suggest:
When:
When hot water temp is below 40
When the time is equal to 5:00
And if:
If the time is after 5:00 and before 22:00
Then do:
Switch ‘Turn on’ Boiler Heater 1

That won’t work, because at say 23:00 temp drops below 40 but other conditions (time 5:00-22:00) are not met and the automation stops until the temp drops below 40 again. It does not keep checking until the time condition is met. By adding time trigger at 5:00 the heater will turn on, but it will not turn on again through the day.

My other solution is to create another separate automation for turning the heater on at 5:00 but then somehow link the first automation to the 2nd one so I can turn it on and off using 1 switch on the panel- can this be done?

You only asked for it to be turned on at 5am.

No it doesn’t.

It will trigger at 5am and it will still be below 40 so the boiler will turn on.

Then if it falls below 40 during the day (after 5:00 and before 22:00) it will turn on again because of the other trigger and condition.

Triggers are OR logic, not AND logic.

try using the temp as a state trigger (automation triggers when temp changes) and as conditions the temp below 40 and time between 5:00 and 22:00.
or if you want the automation to trigger at 5:00 as well, add it as a trigger also.

They already are:

Or just set it up as a generic thermostat.
Then in the automation turn on or off the termostat at 05 or 22.
Removes all the logic from the automation and creates a nicer interface to work with.

This can be a zone condition/trigger or a vacation boolean you turn on when you are away.

1 Like

That’s what I was thinking yesterday, that there’s a hidden ‘OR’ in triggers.
Thanks a lot, I will be testing later but it should work now.

For future reference, from the documentation for Automation Trigger, an automation begins processing when any of its triggers becomes true.