68 lines
1.7 KiB
YAML
68 lines
1.7 KiB
YAML
- id: hallway-button
|
|
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
|
|
|
|
- id: hallway-button-double
|
|
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
|
|
|
|
- id: hallway-motion-on
|
|
alias: '[Hallway] Motion On'
|
|
mode: restart
|
|
trigger:
|
|
- platform: state
|
|
entity_id:
|
|
- binary_sensor.hallway_motion_sensor
|
|
- binary_sensor.hallway_person_occupancy
|
|
- binary_sensor.presence_sensor_fp2_hallaway
|
|
to: "on"
|
|
condition:
|
|
- condition: numeric_state
|
|
entity_id: sensor.office_illuminance
|
|
below: '200'
|
|
action:
|
|
- service: script.hallway_lights_on
|
|
|
|
- id: hallway-motion-off
|
|
alias: '[Hallway] Motion Off'
|
|
mode: restart
|
|
trigger:
|
|
- platform: state
|
|
entity_id:
|
|
- binary_sensor.hallway_motion_sensor
|
|
- binary_sensor.hallway_person_occupancy
|
|
- binary_sensor.presence_sensor_fp2_hallaway
|
|
from: 'on'
|
|
to: 'off'
|
|
for:
|
|
seconds: 5
|
|
condition:
|
|
- condition: state
|
|
entity_id: binary_sensor.hallway_motion_sensor
|
|
state: "off"
|
|
- condition: state
|
|
entity_id: binary_sensor.hallway_person_occupancy
|
|
state: "off"
|
|
- condition: state
|
|
entity_id: binary_sensor.presence_sensor_fp2_hallaway
|
|
state: "off"
|
|
action:
|
|
- service: script.hallway_lights_off
|
|
|