1
0
ansible-home-assistant/configuration/automations/bedroom-motion.yaml
Przemek Grondek 48edc10df4 Bedroom automation changes
Change sleep/wakeup automation button to be held
Disable bedroom light when tv is on
Add bedroom bet tv scene
2022-08-06 23:41:47 +02:00

37 lines
900 B
YAML

- 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
- 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.home_alarm
state: disarmed
action:
- service: script.bedroom_lights_off