2021-01-11 03:49:34 +00:00
|
|
|
- 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-12-12 22:19:49 +00:00
|
|
|
below: '16'
|
2021-01-11 03:49:34 +00:00
|
|
|
- condition: state
|
|
|
|
entity_id: input_select.home_mode
|
|
|
|
state: Day
|
|
|
|
action:
|
2022-04-27 21:42:10 +00:00
|
|
|
- choose:
|
|
|
|
- conditions:
|
|
|
|
- condition: state
|
|
|
|
entity_id: media_player.bedroom_tv
|
|
|
|
state: 'on'
|
|
|
|
sequence:
|
|
|
|
- choose:
|
|
|
|
- conditions:
|
|
|
|
- condition: state
|
|
|
|
entity_id: sensor.bedroom_tv_media_input_source
|
|
|
|
state: HDMI2
|
|
|
|
- condition: not
|
|
|
|
conditions:
|
|
|
|
- condition: state
|
|
|
|
entity_id: media_player.bedroom_atv
|
|
|
|
state: playing
|
|
|
|
sequence:
|
|
|
|
- service: script.bedroom_lights_on
|
|
|
|
default:
|
|
|
|
- service: script.bedroom_lights_on
|
2021-05-10 10:24:31 +00:00
|
|
|
|
2021-01-11 03:49:34 +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'
|
2021-01-18 22:28:54 +00:00
|
|
|
condition:
|
|
|
|
- condition: state
|
|
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
|
|
state: disarmed
|
2021-01-11 03:49:34 +00:00
|
|
|
action:
|
2021-11-12 01:56:26 +00:00
|
|
|
- service: script.bedroom_lights_off
|