mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 10:30:14 -04:00
Changing camera names to ensure frigate, go2rtc, and home assistant all match
This commit is contained in:
@@ -1,149 +0,0 @@
|
||||
id: automation_frigate_person_back_yard
|
||||
alias: Frigate Person Back Yard
|
||||
description: "Fire a notification if a person is detected by Frigate in the back yard"
|
||||
mode: single
|
||||
max_exceeded: silent
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: frigate/events
|
||||
payload: frigate_cam14
|
||||
value_template: "{{ value_json['after']['camera'] }}"
|
||||
variables:
|
||||
id: "{{ trigger.payload_json['after']['id'] }}"
|
||||
camera: "{{ trigger.payload_json['after']['camera'] }}"
|
||||
camera_name: "{{ camera | replace('_', ' ') | title }}"
|
||||
object: "{{ trigger.payload_json['after']['label'] }}"
|
||||
label: "{{ object | title }}"
|
||||
entered_zones: "{{ trigger.payload_json['after']['entered_zones'] }}"
|
||||
type: "{{ trigger.payload_json['type'] }}"
|
||||
base_url: https://automation.clintweaver.com
|
||||
group_target: ""
|
||||
zone_only: false
|
||||
input_zones:
|
||||
- front_porch
|
||||
- driveway
|
||||
zones: "{{ input_zones | list }}"
|
||||
input_labels:
|
||||
- person
|
||||
labels: "{{ input_labels | list }}"
|
||||
presence_entity: person.clint
|
||||
condition:
|
||||
- "{{ type != 'end' }}"
|
||||
- "{{ not zone_only or entered_zones|length > 0 }}"
|
||||
- "{{ not zones|length or zones|select('in', entered_zones)|list|length > 0 }}"
|
||||
- "{{ not labels|length or object in labels }}"
|
||||
#- "{{ not presence_entity or not is_state(presence_entity, 'home') }}"
|
||||
- '{{ is_state("binary_sensor.patio_door_contact","off") }}'
|
||||
- "{{ is_state('input_boolean.outdoor_snapshots','on') }}"
|
||||
action:
|
||||
- choose:
|
||||
- conditions: "{{ not group_target }}"
|
||||
sequence:
|
||||
- device_id: 99193a9cdfd7a8cb893c54665d710e7d
|
||||
domain: mobile_app
|
||||
type: notify
|
||||
message: A {{ label }} was detected on the {{ camera_name }} camera.
|
||||
data:
|
||||
tag: "{{ id }}"
|
||||
group: frigate-notification-{{ camera }}
|
||||
image: /api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
|
||||
attachment:
|
||||
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
|
||||
|
||||
- action: persistent_notification.create
|
||||
data:
|
||||
title: A {{ label }} was detected on the {{ camera_name }} camera.
|
||||
message: 'A {{ label }} was detected on the {{ camera_name }} camera. '
|
||||
notification_id: "{{ id }}"
|
||||
default:
|
||||
- action: notify.{{ group_target }}
|
||||
data:
|
||||
message: A {{ label }} was detected on the {{ camera_name }} camera.
|
||||
data:
|
||||
tag: "{{ id }}"
|
||||
group: frigate-notification-{{ camera }}
|
||||
image: /api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
|
||||
attachment:
|
||||
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
|
||||
- repeat:
|
||||
sequence:
|
||||
- wait_for_trigger:
|
||||
- platform: mqtt
|
||||
topic: frigate/events
|
||||
payload: "{{ id }}"
|
||||
value_template: "{{ value_json['after']['id'] }}"
|
||||
timeout:
|
||||
minutes: 2
|
||||
continue_on_timeout: false
|
||||
- condition: template
|
||||
value_template: "{{ wait.trigger.payload_json['type'] == 'end' }}"
|
||||
- choose:
|
||||
- conditions: "{{ not group_target }}"
|
||||
sequence:
|
||||
- device_id: 99193a9cdfd7a8cb893c54665d710e7d
|
||||
domain: mobile_app
|
||||
type: notify
|
||||
message: A {{ label }} was detected on the {{ camera_name }} camera.
|
||||
data:
|
||||
tag: "{{ id }}"
|
||||
group: frigate-notification-{{ camera }}
|
||||
url: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
|
||||
clickAction: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
|
||||
image: >-
|
||||
/api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
|
||||
sound: none
|
||||
attachment:
|
||||
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
|
||||
actions:
|
||||
- action: URI
|
||||
title: View Clip
|
||||
uri: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
|
||||
- action: URI
|
||||
title: View Snapshot
|
||||
uri: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/snapshot.jpg
|
||||
- action: silence-{{ camera }}
|
||||
title: Silence Notifications
|
||||
destructive: true
|
||||
default:
|
||||
- action: notify.{{ group_target }}
|
||||
data:
|
||||
message: A {{ label }} was detected on the {{ camera_name }} camera.
|
||||
data:
|
||||
tag: "{{ id }}"
|
||||
group: frigate-notification-{{ camera }}
|
||||
url: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
|
||||
clickAction: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
|
||||
image: >-
|
||||
/api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
|
||||
sound: none
|
||||
attachment:
|
||||
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
|
||||
actions:
|
||||
- action: URI
|
||||
title: View Clip
|
||||
uri: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
|
||||
- action: URI
|
||||
title: View Snapshot
|
||||
uri: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/snapshot.jpg
|
||||
- action: silence-{{ camera }}
|
||||
title: Silence Notifications
|
||||
destructive: true
|
||||
until: "{{ wait.trigger.payload_json['type'] == 'end' }}"
|
||||
- wait_for_trigger:
|
||||
- platform: event
|
||||
event_type: mobile_app_notification_action
|
||||
event_data:
|
||||
action: silence-{{ camera }}
|
||||
timeout:
|
||||
seconds: 30
|
||||
continue_on_timeout: false
|
||||
- delay:
|
||||
minutes: 30
|
||||
@@ -6,7 +6,7 @@ max_exceeded: silent
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: frigate/events
|
||||
payload: frigate_cam19
|
||||
payload: doorbell_cam
|
||||
value_template: "{{ value_json['after']['camera'] }}"
|
||||
variables:
|
||||
id: "{{ trigger.payload_json['after']['id'] }}"
|
||||
|
||||
@@ -99,24 +99,7 @@ action:
|
||||
data:
|
||||
entity_id: media_player.computer_area_hub
|
||||
force: true
|
||||
url: http://192.168.1.7:1984/stream.html?src=cam01_sub
|
||||
# - action: media_player.play_media
|
||||
# target:
|
||||
# entity_id: media_player.computer_area_hub
|
||||
# data:
|
||||
# media:
|
||||
# media_content_id: media-source://camera/camera.frigate_cam01
|
||||
# media_content_type: image/jpeg
|
||||
# metadata:
|
||||
# title: Frigate Cam01
|
||||
# thumbnail: /api/camera_proxy/camera.frigate_cam01
|
||||
# media_class: video
|
||||
# children_media_class: null
|
||||
# navigateIds:
|
||||
# - {}
|
||||
# - media_content_type: app
|
||||
# media_content_id: media-source://camera
|
||||
# browse_entity_id: media_player.computer_area_hub
|
||||
url: http://192.168.1.7:1984/stream.html?src=boys_room_cam
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
@@ -128,27 +111,9 @@ action:
|
||||
data:
|
||||
entity_id: media_player.front_room_hub
|
||||
force: true
|
||||
url: http://192.168.1.7:1984/stream.html?src=cam01_sub
|
||||
# - action: media_player.play_media
|
||||
# target:
|
||||
# entity_id: media_player.front_room_hub
|
||||
# data:
|
||||
# media:
|
||||
# media_content_id: media-source://camera/camera.frigate_cam01
|
||||
# media_content_type: image/jpeg
|
||||
# metadata:
|
||||
# title: Frigate Cam01
|
||||
# thumbnail: /api/camera_proxy/camera.frigate_cam01
|
||||
# media_class: video
|
||||
# children_media_class: null
|
||||
# navigateIds:
|
||||
# - {}
|
||||
# - media_content_type: app
|
||||
# media_content_id: media-source://camera
|
||||
# browse_entity_id: media_player.front_room_hub
|
||||
url: http://192.168.1.7:1984/stream.html?src=boys_room_cam
|
||||
|
||||
- delay: "00:10:00"
|
||||
|
||||
- action: media_player.turn_off
|
||||
entity_id: media_player.front_room_hub, media_player.computer_area_hub
|
||||
|
||||
|
||||
@@ -99,33 +99,7 @@ action:
|
||||
data:
|
||||
entity_id: media_player.computer_area_hub
|
||||
force: true
|
||||
url: http://192.168.1.7:1984/stream.html?src=cam03_sub
|
||||
|
||||
# - action: media_player.play_media
|
||||
# target:
|
||||
# entity_id: media_player.computer_area_hub
|
||||
# data:
|
||||
# media:
|
||||
# media_content_id: media-source://camera/camera.frigate_cam03
|
||||
# media_content_type: image/jpeg
|
||||
# metadata:
|
||||
# title: Frigate Cam03
|
||||
# thumbnail: /api/camera_proxy/camera.frigate_cam03
|
||||
# media_class: video
|
||||
# children_media_class: null
|
||||
# navigateIds:
|
||||
# - {}
|
||||
# - media_content_type: app
|
||||
# media_content_id: media-source://camera
|
||||
# browse_entity_id: media_player.computer_area_hub
|
||||
|
||||
# - action: webrtc.dash_cast
|
||||
# data:
|
||||
# entity_id: media_player.computer_area_hub
|
||||
# url: cam08_sub
|
||||
# force: true
|
||||
# extra:
|
||||
# mode: webrtc
|
||||
url: http://192.168.1.7:1984/stream.html?src=girls_room_cam
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
@@ -137,68 +111,10 @@ action:
|
||||
data:
|
||||
entity_id: media_player.front_room_hub
|
||||
force: true
|
||||
url: http://192.168.1.7:1984/stream.html?src=cam03_sub
|
||||
# - action: media_player.play_media
|
||||
# target:
|
||||
# entity_id: media_player.front_room_hub
|
||||
# data:
|
||||
# media:
|
||||
# media_content_id: media-source://camera/camera.frigate_cam08
|
||||
# media_content_type: image/jpeg
|
||||
# metadata:
|
||||
# title: Frigate Cam08
|
||||
# thumbnail: /api/camera_proxy/camera.frigate_cam08
|
||||
# media_class: video
|
||||
# children_media_class: null
|
||||
# navigateIds:
|
||||
# - {}
|
||||
# - media_content_type: app
|
||||
# media_content_id: media-source://camera
|
||||
# browse_entity_id: media_player.front_room_hub
|
||||
|
||||
# - action: webrtc.dash_cast
|
||||
# data:
|
||||
# entity_id: media_player.front_room_hub
|
||||
# url: cam08_sub
|
||||
# force: true
|
||||
# extra:
|
||||
# mode: webrtc
|
||||
url: http://192.168.1.7:1984/stream.html?src=girls_room_cam
|
||||
|
||||
- delay: "00:10:00"
|
||||
|
||||
- action: media_player.turn_off
|
||||
entity_id: media_player.front_room_hub, media_player.computer_area_hub
|
||||
|
||||
# - alias: "Flash some lights"
|
||||
# repeat:
|
||||
# count: 6
|
||||
# sequence:
|
||||
# - delay: 1
|
||||
# - action: light.toggle
|
||||
# target:
|
||||
# entity_id:
|
||||
# - light.entryway_hue
|
||||
# - light.computer_area_hue
|
||||
# - light.front_room_hue
|
||||
#- delay: '00:00:02'
|
||||
|
||||
# - alias: "Fix computer area lights"
|
||||
# action: automation.trigger
|
||||
# target:
|
||||
# entity_id: "automation.computer_area_lights_to_{{ computer_area }}"
|
||||
# data:
|
||||
# skip_condition: true
|
||||
|
||||
# - alias: "Fix front room lights"
|
||||
# action: automation.trigger
|
||||
# target:
|
||||
# entity_id: "automation.front_room_lights_to_{{ front_room }}"
|
||||
# data:
|
||||
# skip_condition: true
|
||||
|
||||
# - alias: "Fix entryway lights"
|
||||
# action: automation.trigger
|
||||
# target:
|
||||
# entity_id: "automation.entryway_lights_to_{{ entryway }}"
|
||||
# data:
|
||||
# skip_condition: true
|
||||
|
||||
Reference in New Issue
Block a user