Skip to content

Instantly share code, notes, and snippets.

@WoLpH WoLpH/etc.yaml
Created Oct 21, 2018

Embed
What would you like to do?
# - alias: close curtains
# trigger:
# - event: sunset
# platform: sun
# condition: []
# action:
# - data:
# entity_id: cover.qubino_zmnhod1_flush_shutter_dc_level
# service: automation.turn_off
- alias: hallway_0_off
initial_state: True
trigger:
platform: event
event_type: timer.finished
event_data:
entity_id: timer.hallway_0
condition: []
action:
- service: homeassistant.turn_off
data:
entity_id: light.hallway_0
- alias: hallway_1_off
initial_state: True
trigger:
platform: event
event_type: timer.finished
event_data:
entity_id: timer.hallway_1
condition: []
action:
- service: homeassistant.turn_off
data:
entity_id: light.hallway_1
- alias: hallway_2_off
initial_state: True
trigger:
platform: event
event_type: timer.finished
event_data:
entity_id: timer.hallway_2
condition: []
action:
- service: homeassistant.turn_off
data:
entity_id: light.hallway_2
- alias: bathroom_0_off
initial_state: True
trigger:
platform: event
event_type: timer.finished
event_data:
entity_id: timer.bathroom_0
condition: []
action:
- service: homeassistant.turn_off
data:
entity_id: light.bathroom_0
- alias: bathroom_0_on
initial_state: True
trigger:
- entity_id: sensor.bathroom_0_motion
platform: state
to: '8'
condition: []
action:
- service: homeassistant.turn_on
data_template:
entity_id:
- light.bathroom_0
brightness_pct: '{% if now().hour < 10 or now().hour > 20 %}30{% else %}100{% endif %}'
- service: timer.cancel
data:
entity_id:
- timer.bathroom_0
- alias: bathroom_0_no_motion
initial_state: True
trigger:
- entity_id: sensor.bathroom_0_motion
platform: state
from: '8'
condition: []
action:
- service: timer.start
data:
duration: '00:20:00'
entity_id:
- timer.bathroom_0
- alias: hallway_0_on
initial_state: True
trigger:
- entity_id: binary_sensor.hallway_0
platform: state
from: 'off'
to: 'on'
- entity_id: binary_sensor.doorbell, binary_sensor.front_door
platform: state
condition: []
action:
- service: homeassistant.turn_on
data_template:
entity_id:
- light.hallway_0
- light.hallway_1
brightness_pct: '{% if now().hour < 10 or now().hour > 20 %}30{% else %}100{% endif %}'
- alias: hallway_0_on_no_motion
initial_state: True
trigger:
- entity_id: binary_sensor.hallway_0
platform: state
from: 'on'
to: 'off'
- entity_id: binary_sensor.doorbell
platform: state
- entity_id: binary_sensor.front_door
platform: state
from: 'on'
to: 'off'
condition: []
action:
- service: timer.start
data:
duration: '00:05:00'
entity_id:
- timer.hallway_0
- timer.hallway_1
- alias: hallway_2_on
initial_state: True
trigger:
- entity_id: light.bathroom_0
platform: state
from: 'on'
to: 'off'
- entity_id: binary_sensor.hallway_2
platform: state
from: 'off'
to: 'on'
condition: []
action:
- service: timer.start
data:
duration: '00:05:00'
entity_id:
- timer.hallway_1
- timer.hallway_2
- service: homeassistant.turn_on
data_template:
entity_id:
- light.hallway_1
- light.hallway_2
brightness_pct: '{% if now().hour < 10 or now().hour > 20 %}30{% else %}100{% endif %}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.