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

61 lines
1.6 KiB
YAML
Raw Normal View History

- id: kitchen_lights_on
alias: '[Kitchen] Lights On'
2021-01-12 23:34:38 +00:00
mode: single
trigger:
2023-04-22 18:03:39 +00:00
# - platform: state
# entity_id: binary_sensor.kitchen_motion_sensor
# from: 'off'
# to: 'on'
# - platform: state
# entity_id: binary_sensor.kitchen_tabletop_motion_detection
# to: 'on'
2021-01-12 23:34:38 +00:00
- platform: state
2023-04-22 18:03:39 +00:00
entity_id: binary_sensor.presence_sensor_fp2_kitchen
2022-04-24 00:20:47 +00:00
to: 'on'
2021-01-12 23:34:38 +00:00
action:
2022-08-13 17:22:24 +00:00
- choose:
- conditions:
- condition: numeric_state
entity_id: sensor.office_illuminance
2023-05-21 19:28:06 +00:00
below: '350'
2022-08-13 17:22:24 +00:00
sequence:
- service: script.kitchen_lights_on
2021-05-10 10:24:31 +00:00
- id: kitchen_lights_off
alias: '[Kitchen] Lights Off'
2021-01-12 23:34:38 +00:00
mode: restart
trigger:
- platform: state
2023-04-22 18:03:39 +00:00
entity_id: binary_sensor.presence_sensor_fp2_kitchen
2022-04-24 17:50:50 +00:00
to: 'off'
for:
seconds: 5
2023-04-22 18:03:39 +00:00
# - platform: state
# entity_id: binary_sensor.kitchen_motion_sensor
# for: '0:02:00'
# from: 'on'
# to: 'off'
# - platform: state
# entity_id: binary_sensor.kitchen_sink_motion_sensor
# to: 'off'
# for: '0:02:00'
# - platform: state
# entity_id: binary_sensor.kitchen_tabletop_motion_detection
# to: 'off'
# for: '0:02:00'
# condition:
# - condition: state
# entity_id: binary_sensor.kitchen_motion_sensor
# state: 'off'
# for: '0:02:00'
# - condition: state
# entity_id: binary_sensor.kitchen_sink_motion_sensor
# state: 'off'
# for: '0:02:00'
# - condition: state
# entity_id: binary_sensor.kitchen_tabletop_motion_detection
# state: 'off'
# for: '0:02:00'
2021-01-12 23:34:38 +00:00
action:
2022-08-04 22:09:51 +00:00
- service: script.kitchen_lights_off