Added Timed Switch blueprint
This commit is contained in:
@@ -1,29 +1,30 @@
|
||||
blueprint:
|
||||
name: timed_switch
|
||||
domain: switch
|
||||
description: Activate a switch for a cerrain timeation
|
||||
domain: automation
|
||||
description: Activate a switch for a certain time as action
|
||||
author: Tiziano Trabattoni
|
||||
input:
|
||||
button:
|
||||
name: bt
|
||||
name: Button
|
||||
description: Which button will activate the switch
|
||||
selector:
|
||||
target:
|
||||
entity:
|
||||
domain: input_button
|
||||
|
||||
switch_target:
|
||||
name: sw
|
||||
name: Switch
|
||||
description: Which switch will be activated
|
||||
selector:
|
||||
target:
|
||||
entity:
|
||||
domain: switch
|
||||
time:
|
||||
name: tim
|
||||
|
||||
duration:
|
||||
name: Duration
|
||||
description: How long the switch should remain on
|
||||
default:
|
||||
hours: 1
|
||||
selector:
|
||||
number:
|
||||
min: 0
|
||||
max: 300
|
||||
unit_of_measurement: seconds
|
||||
duration: {}
|
||||
|
||||
triggers:
|
||||
- trigger: state
|
||||
@@ -34,9 +35,11 @@ conditions: []
|
||||
|
||||
actions:
|
||||
- action: switch.turn_on
|
||||
target:
|
||||
entity_id: !input switch_target
|
||||
|
||||
- delay: !input tim
|
||||
- delay: !input duration
|
||||
|
||||
- action: switch.turn_off
|
||||
target:
|
||||
entity_id: !input switch_target
|
||||
|
||||
Reference in New Issue
Block a user