334 lines
8.7 KiB
YAML
334 lines
8.7 KiB
YAML
- alias: 'EUFY: Actionable notification for mobile'
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id:
|
|
- binary_sensor.doorbell_motion_detected
|
|
- binary_sensor.doorbell_person_detected
|
|
to: 'on'
|
|
id: sensor
|
|
- platform: event
|
|
event_type: mobile_app_notification_action
|
|
id: snooze
|
|
event_data:
|
|
action: SNOOZE
|
|
- platform: event
|
|
event_type: mobile_app_notification_action
|
|
id: alarm
|
|
event_data:
|
|
action: ALARM
|
|
condition: []
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: sensor
|
|
sequence:
|
|
- delay:
|
|
hours: 0
|
|
minutes: 0
|
|
seconds: 3
|
|
milliseconds: 0
|
|
- service: notify.mobile_app_vivo_1805
|
|
data:
|
|
message: Motion detected
|
|
data:
|
|
image: /api/image_proxy/image.doorbell_event_image
|
|
actions:
|
|
- action: ALARM
|
|
title: Alarm
|
|
- action: SNOOZE
|
|
title: Snooze
|
|
- conditions:
|
|
- condition: trigger
|
|
id: snooze
|
|
sequence:
|
|
- service: eufy_security.snooze
|
|
data:
|
|
snooze_time: 10
|
|
snooze_chime: false
|
|
snooze_motion: true
|
|
snooze_homebase: false
|
|
target:
|
|
entity_id: camera.doorbell
|
|
- conditions:
|
|
- condition: trigger
|
|
id: alarm
|
|
sequence:
|
|
- service: eufy_security.trigger_camera_alarm_with_duration
|
|
data:
|
|
duration: 1
|
|
target:
|
|
entity_id: camera.doorbell
|
|
mode: single
|
|
- alias: 'EUFY: When motion detection stops turn OFF camera'
|
|
description: ''
|
|
trigger:
|
|
- type: no_motion
|
|
platform: device
|
|
device_id: your_eufy_doorbell_device_id
|
|
entity_id: your_eufy_doorbell_entity_id
|
|
domain: binary_sensor
|
|
for:
|
|
hours: 0
|
|
minutes: 0
|
|
seconds: 30
|
|
condition: []
|
|
action:
|
|
- service: camera.turn_off
|
|
target:
|
|
device_id: your_eufy_doorbell_device_id
|
|
data: {}
|
|
mode: single
|
|
- alias: 'EUFY: View Front door camera on person motion detected in doorbell'
|
|
description: ''
|
|
trigger:
|
|
- type: motion
|
|
platform: device
|
|
device_id: your_eufy_doorbell_device_id
|
|
entity_id: your_eufy_doorbell_entity_id
|
|
domain: binary_sensor
|
|
condition: []
|
|
action:
|
|
- service: camera.turn_on
|
|
target:
|
|
device_id: your_eufy_doorbell_device_id
|
|
data: {}
|
|
enabled: true
|
|
- delay:
|
|
hours: 0
|
|
minutes: 0
|
|
seconds: 2
|
|
milliseconds: 0
|
|
enabled: true
|
|
- service: browser_mod.popup
|
|
data:
|
|
dismissable: true
|
|
autoclose: false
|
|
title: Front door
|
|
size: fullscreen
|
|
timeout: 30000
|
|
browser_id:
|
|
- iMac-safari
|
|
content:
|
|
type: custom:webrtc-camera
|
|
entity: camera.doorbell
|
|
enabled: true
|
|
mode: single
|
|
- alias: 'FRIGATE: Notify person detection'
|
|
description: Test script for frigate notifications
|
|
trigger:
|
|
- platform: mqtt
|
|
topic: frigate/events
|
|
condition:
|
|
- condition: template
|
|
value_template: '{{ trigger.payload_json[''after''][''label''] == ''person'' }}'
|
|
- condition: template
|
|
value_template: '{{ ''primary_zone'' in trigger.payload_json[''after''][''entered_zones'']
|
|
}}'
|
|
action:
|
|
- service: notify.mobile_app_vivo_1805
|
|
data_template:
|
|
message: A {{trigger.payload_json["after"]["label"]}} was detected.
|
|
title: Frigate
|
|
data:
|
|
image: http://HA_URL:8123/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg?format=android
|
|
tag: '{{trigger.payload_json["after"]["id"]}}'
|
|
when: '{{trigger.payload_json["after"]["start_time"]|int}}'
|
|
actions:
|
|
- action: URI
|
|
title: Open Image
|
|
uri: http://HA_URL:8123/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg?format=android
|
|
enabled: true
|
|
mode: single
|
|
- alias: 'EUFY: Notify when a face is matched on doorbell'
|
|
description: ''
|
|
triggers:
|
|
- trigger: state
|
|
entity_id:
|
|
- sensor.face_recog_matches
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ trigger.to_state.attributes.names | length > 0 }}'
|
|
actions:
|
|
- action: notify.mobile_app_v2046
|
|
metadata: {}
|
|
data:
|
|
message: Someone is there!
|
|
title: Eufy Doorbell
|
|
enabled: false
|
|
- action: notify.mobile_app_v2046
|
|
metadata: {}
|
|
data_template:
|
|
message: "{% if 'Unknown' in trigger.to_state.attributes.names[0] %}\n Someone\
|
|
\ is at the door\n{% else %}\n Hello {{trigger.to_state.attributes.names[0]}}!!\
|
|
\ I see you :)\n{% endif %}"
|
|
data:
|
|
image: http://192.168.1.1:8123{{state_attr('image.doorbell_event_image','entity_picture')}}
|
|
actions:
|
|
- action: URI
|
|
title: View Image
|
|
uri: http://192.168.1.1:8123{{state_attr('image.doorbell_event_image','entity_picture')}}
|
|
enabled: true
|
|
mode: single
|
|
- alias: 'NFC: From webhook'
|
|
description: ''
|
|
trigger:
|
|
- platform: webhook
|
|
allowed_methods:
|
|
- GET
|
|
local_only: true
|
|
webhook_id: -zCH00m2PHOAnNGWipJiKux9R
|
|
condition: []
|
|
action:
|
|
- service: light.toggle
|
|
metadata: {}
|
|
data: {}
|
|
target:
|
|
device_id: z5d19fd60e2e2f9a81c92db7f123456
|
|
mode: single
|
|
- alias: 'NFC: From webhook'
|
|
description: ''
|
|
trigger:
|
|
- platform: event
|
|
event_type: office_nfc_tag
|
|
condition: []
|
|
action:
|
|
- service: light.toggle
|
|
metadata: {}
|
|
data: {}
|
|
target:
|
|
device_id: z5d19fd60e2e2f9a81c92db7f123456
|
|
mode: single
|
|
- alias: 'EUFY-CAM: Publish doorbell image to mqtt'
|
|
description: ''
|
|
triggers:
|
|
- type: motion
|
|
device_id: yourdoorbelldeviceid
|
|
entity_id: yourdoorbellentityid
|
|
domain: binary_sensor
|
|
trigger: device
|
|
conditions: []
|
|
actions:
|
|
- delay:
|
|
hours: 0
|
|
minutes: 0
|
|
seconds: 1
|
|
milliseconds: 0
|
|
enabled: true
|
|
- action: mqtt.publish
|
|
metadata: {}
|
|
data:
|
|
topic: doorbell/snapshot
|
|
payload: '{"image":"http://192.168.1.1:8123{{state_attr(''image.doorbell_event_image'',''entity_picture'')
|
|
}}"}'
|
|
retain: true
|
|
evaluate_payload: false
|
|
mode: single
|
|
- alias: 'ALARM: Trigger Homebase alarm when door opens while ARMED'
|
|
description: ''
|
|
triggers:
|
|
- trigger: state
|
|
entity_id:
|
|
- binary_sensor.alarm_door_sensors
|
|
from: 'off'
|
|
to: 'on'
|
|
for:
|
|
hours: 0
|
|
minutes: 0
|
|
seconds: 0
|
|
- trigger: state
|
|
entity_id:
|
|
- alarm_control_panel.homebase
|
|
to: triggered
|
|
conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: alarm_control_panel.smart_alarm
|
|
state: armed_home
|
|
- condition: state
|
|
entity_id: alarm_control_panel.smart_alarm
|
|
state: armed_away
|
|
- condition: state
|
|
entity_id: alarm_control_panel.smart_alarm
|
|
state: armed_night
|
|
actions:
|
|
- action: alarm_control_panel.alarm_trigger
|
|
metadata: {}
|
|
data: {}
|
|
enabled: true
|
|
target:
|
|
entity_id: alarm_control_panel.home_alarm
|
|
- if:
|
|
- condition: not
|
|
conditions:
|
|
- condition: state
|
|
entity_id: alarm_control_panel.homebase
|
|
state: triggered
|
|
then:
|
|
- action: alarm_control_panel.alarm_trigger
|
|
metadata: {}
|
|
data: {}
|
|
target:
|
|
entity_id: alarm_control_panel.homebase
|
|
mode: single
|
|
- alias: 'ALARM: Update smart home alarm state when Homebase state changes'
|
|
description: ''
|
|
triggers:
|
|
- trigger: state
|
|
entity_id:
|
|
- alarm_control_panel.homebase
|
|
to: null
|
|
conditions: []
|
|
actions:
|
|
- if:
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: alarm_control_panel.homebase
|
|
state: armed_home
|
|
- condition: template
|
|
value_template: '{% if not is_state(''alarm_control_panel.smart_alarm'', ''armed_home'')
|
|
%}true{% endif %}'
|
|
then:
|
|
- action: alarm_control_panel.alarm_arm_home
|
|
metadata: {}
|
|
data: {}
|
|
target:
|
|
entity_id: alarm_control_panel.smart_alarm
|
|
- if:
|
|
- condition: and
|
|
conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: alarm_control_panel.homebase
|
|
state: disarmed
|
|
- condition: state
|
|
entity_id: alarm_control_panel.homebase
|
|
state: 'Off'
|
|
- condition: template
|
|
value_template: '{% if not is_state(''alarm_control_panel.smart_alarm'', ''disarmed'')
|
|
%}true{% endif %}'
|
|
then:
|
|
- action: script.turn_on
|
|
target:
|
|
entity_id: script.disarm_smart_home_alarm
|
|
data: {}
|
|
- if:
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: alarm_control_panel.homebase
|
|
state: triggered
|
|
- condition: template
|
|
value_template: '{% if not is_state(''alarm_control_panel.smart_alarm'', ''triggered'')
|
|
%}true{% endif %}'
|
|
then:
|
|
- action: alarm_control_panel.alarm_trigger
|
|
data: {}
|
|
target:
|
|
entity_id: alarm_control_panel.home_alarm
|
|
mode: single
|