Please tell me where I could have made a mistake? There is automation of automatic switching on of the light. The light turns on, but the delay of 3 minutes does not work, for some reason the light does not turn off.
Conditions are evaluated immediately. Since your automation is triggered by the motion sensor, there is no way that it will register no motion for 3 minutes immediately after it registered motion… The better method is to use multiple triggers.
Tested automation. For some reason, your option does not work. ( ( Turns it on, but does not turn it off.
It seems that something is wrong with the system itself, since another automation has stopped working normally.
An example of a simple automation that suddenly stopped working.
How are you writing these automations — through the HA UI or manually into a file? Are there any errors in your logs?
There is a trace feature in the UI so that you can debug your automations, but for that to work for manually-written ones, you must have a unique id for each one, like this:
alias: Автоматическое включение светом над раковиной
id: bb229a3c-78eb-494c-9c96-f1bd54a1640d
trigger:
- platform: state
The ID just needs to be unique on your system. I use this tool to avoid having to think up new ones.
Then you can inspect each run of your automation in a visual tool:
I am writing automation through the Home Assistant user interface. But unfortunately I don’t know how to use the tracing function. I didn’t find a tutorial video. (((
This automation has three triggers, shown by the three circles at the top. For this run, it was the middle one that fired: by clicking on it, I can see that it was triggered by the time being 09:00 (bottom right).
It then passed through two conditions (the A/B icons), which I can click on to see the details. Here’s the second one, which is a condition that the time is after 07:00:
…but the action is then blocked by the third condition (A/B, directing the flow to the X), that there is no-one at home — as there are two people at home, the action does not run:
You can use that to work out why your switch is not turning off after three minutes without motion — is it not triggering or is it being blocked by a condition?