Hi all,
i’m a new home assitant user and i’m glad to meet this great community.
i made an automation , realy 2 automaitons and no one of them is triggering and working.
The easy one is this below:
Firstly the above is very difficult to read as it is not formatted correctly. When pasting code like this try to wrap the code with these ``` either side, or at the begining and end of the code if you please!
You say you can run the automation manual and it works - the important part to remember here is when running manually the automation will skip or ignore all triggers AND conditions. So you know instantly you have either a trigger issue and/or a condition issue.
It is worth looking at the automations trace to see if it actually did trigger but the condition was not true and also to see if any error text is present also.
However I suspect (can read the yaml correctly due to the above mentioned formatting) that the automation may be OK, you have to remember that using a numerical trigger (above or below) will only ever trigger when (in your case) the humidity sensor goes from any value below 69 to any value above 69. It has to cross the threshold so to speak.
So going from 68 to 70 would cross it, but going for 70-72 would not. So if the value is already above 69 no trigger will occur.
So its worth checking what the current sensor value is before hand. You can also use the developer tools / states / set states to override the actual humidity for testing.
Try to debug your automation by accessing traces inside your automation (Top right, when editing your automation or click the dots in the information overview).
Then check if your automation trigger did not fire or a condition was not met.
The automation would also show as not triggered if the condition is not met, even when the actual trigger is. Not very intuitive, but thats how it is.
If there are not traces its the trigger, if there are traces its the condition.
Looking at traces will allow you to check if it was the trigger OR the condition and then fix the actual problem. Always better to check than to assume when debugging and its just one click away.
So three triggers (fires when ANY of these happens):
Humidity goes above 70%
Time becomes “during the day” (however you define that)
You leave the home
(and perhaps an extra one for Home Assistant restart)
And three conditions (requires ALL of these to be true to proceed):
Humidity is above 70%
Time is “during the day”
You are not at home
That way, the automation will trigger when any one of those things happens, but only continue to the action if all three are true. In other words, it’ll run when the third of the three things becomes true.
Example scenario:
It becomes daytime. Automation triggers, but humidity is only 60% and you’re home. Condition fails, action not run.
Next, you leave home. Automation triggers, it is daytime, but humidity is only 64%. Condition fails, action not run.
Finally, humidity rises above 70%. Automation triggers, it is daytime, you’re out and humidity is high. Condition passes, HVAC runs.
You then might need a separate automation to catch when any of those things stops being true.