1
0

Use hallway camera for person detection

This commit is contained in:
Przemek Grondek 2023-04-22 00:39:08 +02:00
parent 3058e54854
commit efee6df844
2 changed files with 15 additions and 26 deletions

View File

@ -1,22 +1,3 @@
- id: hallway-motion-reset
alias: '[Hallway] Super sensor reset'
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.hallway_motion_sensor
for: 00:00:05
from: 'off'
to: 'on'
action:
- service: zha.set_zigbee_cluster_attribute
data:
ieee: 00:15:8d:00:07:75:31:c0
endpoint_id: 1
cluster_id: 1280
cluster_type: in
attribute: 2
value: '0'
- id: hallway-button - id: hallway-button
alias: '[Hallway] Button single press' alias: '[Hallway] Button single press'
mode: single mode: single
@ -46,9 +27,10 @@
mode: restart mode: restart
trigger: trigger:
- platform: state - platform: state
entity_id: binary_sensor.hallway_motion_sensor entity_id:
from: 'off' - binary_sensor.hallway_motion_sensor
to: 'on' - binary_sensor.hallway_person_occupancy
to: "on"
condition: condition:
- condition: numeric_state - condition: numeric_state
entity_id: sensor.office_illuminance entity_id: sensor.office_illuminance
@ -61,10 +43,19 @@
mode: restart mode: restart
trigger: trigger:
- platform: state - platform: state
entity_id: binary_sensor.hallway_motion_sensor entity_id:
- binary_sensor.hallway_motion_sensor
- binary_sensor.hallway_person_occupancy
from: 'on' from: 'on'
to: 'off' to: 'off'
for: 00:00:05 for: 00:00:01
condition:
- condition: state
entity_id: binary_sensor.hallway_motion_sensor
state: "off"
- condition: state
entity_id: binary_sensor.hallway_person_occupancy
state: "off"
action: action:
- service: script.hallway_lights_off - service: script.hallway_lights_off

View File

@ -14,7 +14,6 @@ cctv_on:
- switch.living_room_detect - switch.living_room_detect
- switch.hallway_recordings - switch.hallway_recordings
- switch.hallway_snapshots - switch.hallway_snapshots
- switch.hallway_detect
- service: switch.turn_on - service: switch.turn_on
target: target:
entity_id: entity_id:
@ -36,7 +35,6 @@ cctv_off:
- switch.living_room_detect - switch.living_room_detect
- switch.hallway_recordings - switch.hallway_recordings
- switch.hallway_snapshots - switch.hallway_snapshots
- switch.hallway_detect
cctv_snapshot_all: cctv_snapshot_all:
alias: CCTV snapshot all alias: CCTV snapshot all