1
0
ansible-home-assistant/roles/automations/files/table-presence.yaml

26 lines
625 B
YAML
Raw Normal View History

- id: table_lights_on
2023-04-22 18:03:39 +00:00
alias: '[Table] Lights On'
mode: single
trigger:
- platform: state
entity_id: binary_sensor.presence_sensor_fp2_table
to: 'on'
action:
- choose:
- conditions:
- condition: numeric_state
entity_id: sensor.office_illuminance
below: '200'
sequence:
- service: script.table_lights_on
- id: table_lights_off
2023-04-22 18:03:39 +00:00
alias: '[Table] Lights Off'
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.presence_sensor_fp2_table
to: 'off'
action:
- service: script.table_lights_off