mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 18:40:14 -04:00
69 lines
1.7 KiB
YAML
69 lines
1.7 KiB
YAML
alias: Frigate Cam04 Detect
|
|
id: automation_frigate_cam04_detect
|
|
mode: restart
|
|
|
|
trigger:
|
|
- platform: homeassistant
|
|
event: start
|
|
|
|
- id: motion
|
|
platform: state
|
|
entity_id: group.garage_motion
|
|
|
|
- id: doors
|
|
platform: state
|
|
entity_id: group.my_garage_doors
|
|
|
|
- id: occupancy
|
|
platform: state
|
|
entity_id: binary_sensor.frigate_cam04_person_occupancy
|
|
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: group.garage_motion
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: switch.frigate_cam04_detect
|
|
state: 'off'
|
|
sequence:
|
|
- service: switch.turn_on
|
|
data: {}
|
|
target:
|
|
entity_id:
|
|
- switch.frigate_cam04_detect
|
|
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: group.my_garage_doors
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: switch.frigate_cam04_detect
|
|
state: 'off'
|
|
sequence:
|
|
- service: switch.turn_on
|
|
data: {}
|
|
target:
|
|
entity_id:
|
|
- switch.frigate_cam04_detect
|
|
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: group.garage_motion
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: group.my_garage_doors
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: binary_sensor.frigate_cam04_person_occupancy
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: switch.frigate_cam04_detect
|
|
state: 'on'
|
|
sequence:
|
|
- service: switch.turn_off
|
|
data: {}
|
|
target:
|
|
entity_id:
|
|
- switch.frigate_cam04_detect |