Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- timer_christian:
- timer:
- sluk_blaesevejr:
- name: Sluk Blæsevejr
- input_boolean:
- start_blaesevejr:
- name: Start blæsevejr
- input_number:
- blaesevejr_i:
- name: Blæsevejr i X antal sekunder
- initial: 300
- min: 1
- max: 900
- step: 1
- automation:
- - alias: "Ventilator - timer"
- initial_state: true
- mode: single
- trigger:
- - platform: state
- entity_id:
- - input_boolean.start_blaesevejr
- to: "on"
- action:
- - service: switch.turn_on
- data:
- entity_id: switch.sonoff_laura_switch
- - service: timer.start
- data:
- entity_id: timer.sluk_blaesevejr
- duration: "{{ states('input_number.blaesevejr_i') | multiply(60) | int }}"
- - alias: "Sluk ventilator"
- initial_state: true
- mode: single
- trigger:
- platform: event
- event_type: timer.finished
- event_data:
- entity_id: timer.sluk_blaesevejr
- action:
- - service: switch.turn_off
- data:
- entity_id: switch.sonoff_laura_switch
- - service: input_boolean.turn_off
- data:
- entity_id: input_boolean.start_blaesevejr
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement