I don’t understand the association perfectly yet, I only learn as a complete layman.
My request:
when the humidity in the “sensor.terarium_humidity” terrarium is less than 60%;
and
not more than 65%;
and
there is enough water in the tank “switch.level - off”
and
in the terrarium, the temperature of “sensor.terarium_temperature” is greater than 26
and
is the time of day between 8:00 and 18:00
turn on the “switch.th_meter” switch 1 per hour for 15 seconds
I can’t handle that cycle of 15 seconds 1 per hour
first things first:
Your automation triggers whenever the humidity drops below 60%.
The first thing you check is if the humidity is below 65%, so that’s a bit redundant.
The automation won’t fire between 61-65%, so there’s not much point in that
Also, your ‘and’ condition is redundant, you can either leave the “and” part since all conditions are “and” per default (automation only executes actions when ALL conditions are met).
As far as turning on the switch (the action): So you want this to turn on for 15sec, turn off and then, even if the humidity is lower than 60%. only turn on a hour later?
If that’s the case there’s two ways I can see this working:
Either use a time pattern trigger, so the automation executes every full hour. Then it checks against all of the conditions, if they are met it turns on the switch for 15s.
Downside: If the terrarium reaches 50% humidity at 14:01 it will be 59min before HA checks for that again.
You could use a timer. A little more complicated, but basically:
Automation trigger: Humidity drops below 60% or timer finished.
Conditions: all conditions (including humidity, including “timer not running”),
Action: start a timer (counting down for 1h), turn on switch, delay 15s, turn off switch
OK
I need to keep the humidity between 60 and 65% during the day from 8:00 to 18:00 using the “switch.th_meter” switch in case there is enough water in the “switch.level” tank.
starting the pump at 1 hour intervals for 15 seconds is OK. Humidity does not increase immediately, so an interval of 1 hour. 15 seconds is also enough - I don’t need to have a water tank in the tria.
I have already verified this interval and it suits …
I think it can be solved the way I wrote, either with a timer (automation triggers when timer finishes AND when humidity drops) + Condition to check for both
Or just run the script each hour (time pattern) and check for humidity