43 lines
753 B
YAML
43 lines
753 B
YAML
blueprint:
|
|
name: timed_switch
|
|
domain: switch
|
|
description: Activate a switch for a cerrain timeation
|
|
author: Tiziano Trabattoni
|
|
input:
|
|
button:
|
|
name: bt
|
|
selector:
|
|
target:
|
|
entity:
|
|
domain: input_button
|
|
|
|
switch_target:
|
|
name: sw
|
|
selector:
|
|
target:
|
|
entity:
|
|
domain: switch
|
|
time:
|
|
name: tim
|
|
selector:
|
|
number:
|
|
min: 0
|
|
max: 300
|
|
unit_of_measurement: seconds
|
|
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: !input button
|
|
id: start_now
|
|
|
|
conditions: []
|
|
|
|
actions:
|
|
- action: switch.turn_on
|
|
entity_id: !input switch_target
|
|
|
|
- delay: !input tim
|
|
|
|
- action: switch.turn_off
|
|
entity_id: !input switch_target
|