I've tried to do this several ways now. I have a button that controls an automation -- and it will start the automation, to a point. But then if I add anything to the automation it won't work. Here's what I'm trying to do:
I want to press a button. It will turn on a light, leave it on for a specific time, then turn that light off. Then, at a specific time (say 10pm) I want the same light to turn back on. I know this is possible, but so far nothing I've tried works. I can get a light to turn on then off using either scripts or automations. But I can't get the thing to do the full cycle. Here's the latest in a string of automations I've tried:
alias: Testlights2
description: ""
triggers:
- trigger: state
entity_id:
- input_button.testlights
conditions: []
actions:
- action: light.turn_on
metadata: {}
data: {}
target:
entity_id: light.game_lights
- delay: "00:05:00"
- action: light.turn_off
metadata: {}
data: {}
target:
entity_id: light.game_lights
- wait_for_trigger:
- trigger: time
at: "15:25:00"
- action: light.turn_on
metadata: {}
data: {}
target:
entity_id: light.game_lights
mode: single
Any ideas why this doesn't work?