feat: Add Guest Mode

This commit is contained in:
2024-09-02 10:35:18 -07:00
parent 2665413b60
commit f21c85d996
2 changed files with 50 additions and 10 deletions

View File

@@ -45,6 +45,8 @@ input_boolean:
name: Automatically Disarm Alarm on Presence Change
disable_camera_events:
name: Disable Camera Events
guest_mode:
name: Guest Mode
binary_sensor:
@@ -414,15 +416,14 @@ automation:
topic: frigate/doorbell/detect/set
payload: 'ON'
- alias: Pause Backyard Event Detection when Garage Door Open
- alias: Pause Backyard Event Detection when Garage Door Opens
trigger:
- platform: state
entity_id: binary_sensor.garage_door
to: 'on'
condition:
condition: state
entity_id: alarm_control_panel.ha_alarm
state: disarmed
- "{{ is_state('alarm_control_panel.ha_alarm', 'disarmed') }}"
- "{{ is_state('input_boolean.guest_mode', 'off') }}"
mode: restart
action:
- service: mqtt.publish
@@ -430,7 +431,7 @@ automation:
topic: frigate/backyard/detect/set
payload: 'OFF'
- alias: Start Backyard Event Detection when Garage Door Closes
- alias: Resume Backyard Event Detection when Garage Door Closes
trigger:
- platform: state
entity_id: binary_sensor.garage_door
@@ -438,13 +439,41 @@ automation:
- platform: state
entity_id: alarm_control_panel.ha_alarm
not_to: disarmed
condition:
- "{{ is_state('input_boolean.disable_camera_events', 'off') }}"
- "{{ is_state('input_boolean.guest_mode', 'off') }}"
mode: restart
action:
- delay: 60 # Why?
- service: mqtt.publish
data:
topic: frigate/backyard/detect/set
payload: 'ON'
- alias: Pause Backyard Event Detection in Guest Mode
trigger:
- platform: state
entity_id: input_boolean.guest_mode
to: 'on'
mode: restart
action:
- service: mqtt.publish
data:
topic: frigate/backyard/detect/set
payload: 'OFF'
- alias: Resume Backyard Event Detection from Guest Mode
trigger:
- platform: state
entity_id: input_boolean.guest_mode
to: 'off'
condition:
condition: state
entity_id: input_boolean.disable_camera_events
state: 'off'
mode: restart
action:
- delay: 60
- delay: 60 # Why?
- service: mqtt.publish
data:
topic: frigate/backyard/detect/set