andyjacobs
(Andrew Jacobs)
June 23, 2020, 8:40pm
1
I have created an automation through Lovelace with a trigger that looks like this:
This is supposed to turn a light off after 5 minutes. I left it 20 minutes and the light didn’t turn off. I then clicked on ‘Execute’ and the light turned off. From what I’ve read, this means that the action is working but the trigger isn’t.
Can anyone point me in the right direction please.
Hellis81
(Hellis81)
June 23, 2020, 8:46pm
2
Can you show us what the entity is called and how it looks from the states page?
Also what the different states are.
andyjacobs
(Andrew Jacobs)
June 23, 2020, 9:06pm
3
Strangely, I just checked it again and the lights have turned off. Does it take a bit of time for HA to sync itself when something new is created?
Hellis81
(Hellis81)
June 23, 2020, 9:43pm
4
Depends on how long it takes you to restart Home Assistant or reload the automations yaml
1 Like
andyjacobs
(Andrew Jacobs)
June 23, 2020, 10:56pm
5
Ah! I didn’t do either. Lesson learned
bobt
June 24, 2020, 12:50am
6
I have a similar problem with the following automation i made. It does not seem to trigger. Any suggestions?
alias: Fountain Timer
description: Turns off pump in 1 hour
trigger:
- entity_id: switch.sonoff_1000b7c31b
for: 3 minutes
from: 'off'
platform: state
to: 'on'
condition: []
action:
- data: {}
entity_id: switch.sonoff_1000b7c31b
service: switch.turn_off
Troon
(Troon)
June 24, 2020, 2:01pm
7
I think it’s your for:
that is wrong. You need either:
for: "00:03:00"
or:
for:
minutes: 3
Reference
1 Like