1
0
ansible-home-assistant/configuration/automations/bathroom-shower-motion.yaml

53 lines
1.4 KiB
YAML
Raw Normal View History

2021-01-01 02:59:21 +00:00
- id: bathroom-shower-motion-on
2021-01-07 00:48:14 +00:00
alias: '[Bathroom] Shower Motion On'
2021-01-01 02:59:21 +00:00
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.shower_motion
from: 'off'
to: 'on'
action:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'on'
sequence:
- service: light.turn_on
entity_id: light.shower_lights
data:
brightness_pct: 100
kelvin: 2000
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'off'
sequence:
- service: light.turn_on
entity_id: light.shower_lights
data:
brightness_pct: 100
kelvin: 3200
2021-05-10 10:24:31 +00:00
2021-01-01 02:59:21 +00:00
- id: bathroom-shower-motion-off
2021-01-07 00:48:14 +00:00
alias: '[Bathroom] Shower Motion Off'
2021-01-01 02:59:21 +00:00
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.shower_motion
for: '0:02:00'
2021-01-01 02:59:21 +00:00
from: 'on'
to: 'off'
- platform: state
entity_id: binary_sensor.bathroom_motion_occupancy
for: '0:05:00'
from: 'on'
to: 'off'
condition:
- condition: state
entity_id: binary_sensor.shower_motion
for: '0:02:00'
state: 'off'
2021-01-01 02:59:21 +00:00
action:
- service: light.turn_off
2021-01-26 08:32:34 +00:00
entity_id: light.shower_lights