Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- blueprint:
- name: Timer
- description: Timer to turn on/off at a given time
- domain: automation
- input:
- device:
- name: Entity to turn on/off.
- description: Entity that timer turns on/off at a given time.
- selector:
- entity:
- turn_on:
- name: Turn on
- description: Time to turn on.
- selector:
- time:
- turn_off:
- name: Turn off
- description: Time to turn off.
- selector:
- time:
- vacation_active:
- name: Active during vacation.
- description: Toggle to indicate if automation is active during vacation mode.
- default: false
- selector:
- boolean:
- variables:
- vacation_active: !input vacation_active
- trigger:
- - platform: time
- at: !input turn_on
- id: turn_on
- - platform: time
- at: !input turn_off
- id: turn_off
- condition:
- - condition: or
- conditions:
- - condition: state
- entity_id: input_boolean.disable_automations
- state: 'off'
- - condition: template
- value_template: '{{ vacation_active == true }}'
- action:
- - choose:
- - conditions:
- - condition: template
- value_template: '{{ trigger.id == "turn_on" }}'
- sequence:
- - service: homeassistant.turn_on
- target:
- entity_id: !input device
- - conditions:
- - condition: template
- value_template: '{{ trigger.id == "turn_off" }}'
- sequence:
- - service: homeassistant.turn_off
- target:
- entity_id: !input device
- default: []
- mode: single
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement