Tweetpine
(Mikkel Post)
November 17, 2022, 3:12pm
1
Hi all!
I’m trying to turn a switch off after I have pressed it. The wait time should be 2 seconds.
What I have created so far is this
How do i turn of the switch after 2 seconds?
wake_on_lan:
switch:
platform: wake_on_lan
mac: (MAC ADDRESS)
name: GamerPC
Tinkerer
(aka DubhAd on GitHub)
November 17, 2022, 3:58pm
2
First, please see the sticky post about code formatting.
Second, you’ll want an automation
Something very roughly like:
automation:
- alias: "Turn it off"
trigger:
- platform: state
entity_id: switch.gamer_pc
to: 'on'
for: '00:00:02'
action:
- service: switch.turn_off
data:
target: switch.gamer_pc
Tweetpine
(Mikkel Post)
November 18, 2022, 9:44am
3
Hi
Thanks for the help.
I will look into automation and the sticky post