- id: '1633409486743' | |
alias: 'Snapshot: called when front door snapshot updates' | |
description: '' | |
trigger: | |
- platform: state | |
entity_id: camera.front_door_snapshot | |
attribute: timestamp | |
condition: [] | |
action: | |
- service: image_processing.scan | |
target: | |
entity_id: image_processing.doods_front_door_snapshot | |
mode: single | |
- id: '1633559907506' | |
alias: 'Frontage: dog announcement' | |
description: '' | |
trigger: | |
- platform: state | |
entity_id: binary_sensor.dog_out_front | |
to: 'on' | |
condition: | |
- condition: state | |
entity_id: input_boolean.day_mode | |
state: 'on' | |
action: | |
- service: notify.loud | |
data: | |
message: There's a dog out front! Go look at the doggo! | |
mode: single | |
security_recognition_package: | |
# Image recognition using DOODS. | |
# Gods, I hate that acronym. | |
image_processing: | |
- platform: doods | |
url: "http://doods.homeassistant.svc.cluster.local" | |
detector: default | |
source: | |
- entity_id: camera.front_door_snapshot | |
file_out: | |
- "/config/www/doods/{{ camera_entity.split('.')[1] }}_latest.jpg" | |
labels: | |
- dog | |
scan_interval: 1000000 | |
template: | |
- binary_sensor: | |
- name: "Dog out Front" | |
state: '{{ states("image_processing.doods_front_door_snapshot") }}' | |
icon: > | |
{% if is_state("binary_sensor.dog_out_front", "on") %} | |
mdi:dog-side | |
{% else %} | |
mdi:circle-outline | |
{% endif %} |