diff --git a/blueprints/automation/homeassistant/timed_switch.yaml b/blueprints/automation/homeassistant/timed_switch.yaml index 07a839d..df43a9e 100644 --- a/blueprints/automation/homeassistant/timed_switch.yaml +++ b/blueprints/automation/homeassistant/timed_switch.yaml @@ -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 + entity: + domain: input_button switch_target: - name: sw + name: Switch + description: Which switch will be activated selector: - target: - entity: - domain: switch - time: - name: tim + entity: + domain: switch + + 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 - entity_id: !input switch_target + target: + entity_id: !input switch_target - - delay: !input tim + - delay: !input duration - action: switch.turn_off - entity_id: !input switch_target + target: + entity_id: !input switch_target