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

37 lines
900 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
below: '16'
- condition: state
entity_id: input_select.home_mode
state: Day
- condition: state
entity_id: media_player.bedroom_tv
state: 'off'
action:
- service: script.bedroom_lights_on
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
2022-04-30 16:05:15 +00:00
entity_id: alarm_control_panel.home_alarm
state: disarmed
action:
- service: script.bedroom_lights_off