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

39 lines
929 B
YAML
Raw Normal View History

- id: bedroom-motion-dark
alias: '[Bedroom] Motion day dark'
mode: single
trigger:
- platform: state
entity_id: binary_sensor.bedroom_motion_occupancy
from: 'off'
to: 'on'
condition:
- condition: numeric_state
entity_id: sensor.bedroom_motion_illuminance
2021-04-12 15:32:28 +00:00
below: '25'
- condition: state
entity_id: input_select.home_mode
state: Day
action:
- service: light.turn_on
entity_id: light.bedroom_lights
data:
brightness_pct: 60
2021-01-12 23:00:32 +00:00
kelvin: 2000
2021-05-10 10:24:31 +00:00
- id: bedroom-motion-off
alias: '[Bedroom] Motion Off'
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.bedroom_motion_occupancy
for: '0:02:00'
from: 'on'
to: 'off'
condition:
- condition: state
entity_id: alarm_control_panel.ha_alarm
state: disarmed
action:
- service: light.turn_off
entity_id: light.bedroom_lights