2023-06-12 23:56:22 +02:00
|
|
|
- id: hallway_button
|
2021-11-12 02:35:44 +01:00
|
|
|
alias: '[Hallway] Button single press'
|
|
|
|
mode: single
|
|
|
|
trigger:
|
|
|
|
- device_id: cc4f08a2e2f0e5aebc43b87164378795
|
|
|
|
domain: zha
|
|
|
|
platform: device
|
|
|
|
type: remote_button_short_press
|
|
|
|
subtype: remote_button_short_press
|
|
|
|
action:
|
|
|
|
- service: script.hallway_lights_toggle
|
|
|
|
|
2023-06-12 23:56:22 +02:00
|
|
|
- id: hallway_button_double
|
2021-11-12 02:35:44 +01:00
|
|
|
alias: '[Hallway] Button double press'
|
|
|
|
mode: single
|
|
|
|
trigger:
|
|
|
|
- device_id: cc4f08a2e2f0e5aebc43b87164378795
|
|
|
|
domain: zha
|
|
|
|
platform: device
|
|
|
|
type: remote_button_double_press
|
|
|
|
subtype: remote_button_double_press
|
|
|
|
action:
|
|
|
|
- service: script.leave_home
|
|
|
|
|
2023-06-12 23:56:22 +02:00
|
|
|
- id: hallway_motion_on
|
2021-11-12 02:35:44 +01:00
|
|
|
alias: '[Hallway] Motion On'
|
|
|
|
mode: restart
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
2023-04-22 00:39:08 +02:00
|
|
|
entity_id:
|
|
|
|
- binary_sensor.hallway_motion_sensor
|
|
|
|
- binary_sensor.hallway_person_occupancy
|
2023-04-25 01:44:05 +02:00
|
|
|
- binary_sensor.presence_sensor_fp2_hallaway
|
2023-04-22 00:39:08 +02:00
|
|
|
to: "on"
|
2022-04-21 23:22:34 +02:00
|
|
|
condition:
|
|
|
|
- condition: numeric_state
|
2022-05-03 01:34:47 +02:00
|
|
|
entity_id: sensor.office_illuminance
|
2023-04-25 17:17:03 +02:00
|
|
|
below: '400'
|
2021-11-12 02:35:44 +01:00
|
|
|
action:
|
|
|
|
- service: script.hallway_lights_on
|
|
|
|
|
2023-06-12 23:56:22 +02:00
|
|
|
- id: hallway_motion_off
|
2021-11-12 02:35:44 +01:00
|
|
|
alias: '[Hallway] Motion Off'
|
|
|
|
mode: restart
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
2023-04-22 00:39:08 +02:00
|
|
|
entity_id:
|
|
|
|
- binary_sensor.hallway_motion_sensor
|
|
|
|
- binary_sensor.hallway_person_occupancy
|
2023-04-25 01:44:05 +02:00
|
|
|
- binary_sensor.presence_sensor_fp2_hallaway
|
2021-11-12 02:35:44 +01:00
|
|
|
from: 'on'
|
|
|
|
to: 'off'
|
2023-04-25 14:58:41 +02:00
|
|
|
for:
|
|
|
|
seconds: 5
|
2023-04-22 00:39:08 +02:00
|
|
|
condition:
|
|
|
|
- condition: state
|
|
|
|
entity_id: binary_sensor.hallway_motion_sensor
|
|
|
|
state: "off"
|
|
|
|
- condition: state
|
|
|
|
entity_id: binary_sensor.hallway_person_occupancy
|
|
|
|
state: "off"
|
2023-04-23 01:55:11 +02:00
|
|
|
- condition: state
|
2023-04-25 01:44:05 +02:00
|
|
|
entity_id: binary_sensor.presence_sensor_fp2_hallaway
|
2023-04-23 01:55:11 +02:00
|
|
|
state: "off"
|
2021-11-12 02:35:44 +01:00
|
|
|
action:
|
|
|
|
- service: script.hallway_lights_off
|
|
|
|
|