Created
October 6, 2021 22:43
-
-
Save cerebrate/969280493a0402734f885fc41432ac47 to your computer and use it in GitHub Desktop.
The silliest thing I have yet programmed my smart home to do.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment