I’m not sure that the the for: condition works like this. I think it works like this:
Automation triggered -> check if sensor was off in the last 30 seconds -> if true send message
But that’s not what OP wants, OP wants:
Automation triggered -> if sensor is off and stays off for 30 seconds after trigger -> send message
I think OP needs a wait_for_trigger as I explained to him in a different topic, but didn’t have the time to test and reply yet. @Rodrigo_Michineau_Ro please be a bit more patient and don’t open a second topic with the same question.