Automation question about temperature sensor

I have install on my baby’s room a temperature / humidity sensor. It works great.

I have create an automation to receive alerts & notify when humidity is over 70%.


However I don’t want the automation to run during the morning.
I want it to run between 16.00 - 01:00 and if the humidity is 70% and more for over 45 minutes.

Added the following condition to achieve it


My problem is that I never get a notification even if the humidity is over 70%.
The notify / alert works. I think something is wrong with my condition.

I checked the daily graph of the humidity sensor and it go over 70% on the specified time frame (16.00 - 01:00)


Any help would be much appreciated .

Unless I’m reading the graph wrong it went over 70 before 5am, but your conditions require it to be after 4pm. At no point after 4pm does it go above 70, it’s already there from the morning.

I suspect at the very least your trigger and conditions are the wrong way round.

Sounds like another thread (I’ll have to find it) that explores triggers / conditions like this and the timing of using ‘for’ xx amount of time as a TRIGGER. Ie. the TRIGGER only executes when the humidity goes FROM under 70 to OVER 70 and stays there for 45 minutes. It THEN checks the condition to see if it should continue. If the humidity then STAYS over 70 it won’t trigger again until it goes back BELOW 70 and then rises back ABOVE 70.

You’ll need to be really thoughtful in your TRIGGER (maybe have multiple triggers to handle different use cases) - or possibly even multiple automations w/ different trigger/condition combinations to execute exactly when you’d like.

Just gets complicated when you start using FOR in the TRIGGER and then a specific TIME as a CONDITION.

so basically you are saying that using FOR it gets things complicated.


Ok, I will remove it for now and see how it goes…
Would you please confirm, that the condition will allow to continue only if it’s 16:00 pm - 01: 00 am ??
Because I don’t want the automation to run the whole day.


Basically, please answer this query.
When using condition type = time, do I specify the time I want the automation to run or the time I don’t ?
is it after 16:00 and before 01:00
after 01:00 and before 16:00 ??

Awaiting the pleasure of your reply

When you want it to run…

You could accomplish this with 3 automations I think. Probably two but I’m not smart enough.

The first is your current automation without the time condition. Then set the initial state to “off”

The second is an automation that turns on your original automation at 16:00 and the third would turn it off at 1:00

I’m almost positive the on and off can be done with one automation but my templating skills are pretty remedial.

This may still succumb to the issue pointed out here

But it’s worth a real world test.