Well, I don’t know to be honest. I’m not sure why it’s failing for you. I was just giving a possible solution. To be quite honest, it should work without fail.
@123@petro Sorry, but the automation still doesn’t work… this morning the motion sensor was triggered before 8:30 and after 8:30 and in both cases the automation did not started…
I see i had a custom_ui to put in the attributes of all automations the value of the last time it was triggered. I removed it but still doesn’t work. I also see (without custom_ui) the last_triggered attribute was set to ‘null’ after a restart of HA.
What do you think ?
Well yeah, thats because you don’t have a last triggered on that automation: automation.meteo_ed_agenda. So your problem is with that automation, not with the automation we helped you with.
So, if your automation triggers, when you check the condition now()-last_triggered will always be zero. We fixed your issue but now your own logic is causing the problem. Last_triggered is not the 2nd to last trigger. It’s literally the last time the automation was triggered, which is now().
Hmmm… the automation did not started as expected… i restarted many times HA and since last time the last_triggered attribute is always null… maybe i don’t understand you completely, sorry for my poor english…
I just want the automation work as expected…
Hmmm good question… i just copied this automation from another user and tried to make it working for my automation… Please, if you have time, correct my automation to work as i expect…