Hi folks!
Re: using Ring doorbell AND spotlight cameras to trigger events, WORKING, programmed through GUI, NOT yaml.
I spent way too long trying to figure this out, and information provided by others just didn’t work for me. Here’s what I’ve figured out:
Note that the Doorbell and Spotlight have to be configured DIFFERENTLY. The doorbell (my first trigger) uses a “switch” entity. I have a separate routine that manually turns the doorbell “switch” off once it has been on for 10 seconds allowing it to be switched on again whenever it detects motion the next time. The Spotlights don’t have this problem but they do have to be configured differently, and triggered by an entity->state change, whenever any state or attribute is changed. This catches the “xxxx Last Activity” updates.
While other topics indicate this cannot be set up through the GUI and it has to be configured through YAML by editing configuration.yaml, this IS NOT true (at least 99%–will explain shortly). I programmed this to work through the GUI, and it triggers other smart lights (TP-Link KASA) to come on for 2.5 mins, then turns the lights off.
The “mode: restart” command makes it so that, if motion is detected again before the 2.5 mins are up, it restarts the timer and does not toggle my lights until the new time is reached.
The weird numbers for the first device/entity is my doorbell, the others are spotlight cams.
The conditional for back room door light is a separate smart switch that I can manually turn on. It gives me an easy way to disable the motion sensing routine for a time. I have another routine that turns off this switch at 1am, effectively allowing the motion sensing routines to resume functioning normally.
Hope this helps someone else. Cheers!
Thanks!
–Mark
See my YAML config after the other pics:
Note that I was able to enter the spotlight cam triggers through the GUI, but did have to switch to YAML to add the not_from qualifiers. White this is not absolutely necessary, not adding it will result in cameras triggering a false motion event, for instance, if they lose wi-fi:
(edit: sorry, they are not letting me post more than one picture here)
alias: Motion triggered lights
description: “”
triggers:
- type: turned_on
device_id: a4e026c3d774f570884084b107919f8b
entity_id: 3ffff0b8274831c567f45f72d094832c
domain: switch
trigger: device - trigger: state
entity_id:- event.breezeway_motion
not_from: - unknown
- unavailable
- event.breezeway_motion
- trigger: state
entity_id:- event.back_deck_motion
not_from: - unknown
- unavailable
- event.back_deck_motion
- trigger: state
entity_id:- event.driveway_motion
not_from: - unknown
- unavailable
- event.driveway_motion
- trigger: state
entity_id:- event.front_door_motion
not_from: - unknown
- unavailable
- event.front_door_motion
- trigger: state
entity_id:- event.garage_rear_upstairs_motion
not_from: - unknown
- unavailable
- event.garage_rear_upstairs_motion
- trigger: state
entity_id:- event.garage_front_motion
not_from: - unknown
- unavailable
- event.garage_front_motion
- trigger: state
entity_id:- event.front_porch_motion
not_from: - unknown
- unavailable
conditions:
- event.front_porch_motion
- condition: and
conditions:- condition: device
type: is_off
device_id: 4c1c9aacff2463a9f86f8b3e1a9f3946
entity_id: e551e2f1dc780200291b9101e8dc1797
domain: switch - condition: or
conditions:- condition: sun
before: sunrise - condition: sun
after: sunset
actions:
- condition: sun
- condition: device
- type: turn_on
device_id: 3f5e4c251779dafe27df5b7f5f977ad7
entity_id: 236c5c6a38b38e609d774504370d78bc
domain: switch - type: turn_on
device_id: bde58244f3bfbdbf78ba37ce55e5d681
entity_id: 246cf9786962c2b10a3e6518616d9107
domain: switch - type: turn_on
device_id: f05fa1d176a6aaba258bcd554a7bbed3
entity_id: 0cabce147876c3f758be4ee6d6f98abc
domain: switch - type: turn_on
device_id: 604012bcae44ee5f581e0d1a66ffd928
entity_id: b035f367b3b707576ec033b5c8b74878
domain: switch - type: turn_off
device_id: a4e026c3d774f570884084b107919f8b
entity_id: 3ffff0b8274831c567f45f72d094832c
domain: switch - delay:
hours: 0
minutes: 2
seconds: 30
milliseconds: 0 - type: turn_off
device_id: 3f5e4c251779dafe27df5b7f5f977ad7
entity_id: 236c5c6a38b38e609d774504370d78bc
domain: switch - type: turn_off
device_id: bde58244f3bfbdbf78ba37ce55e5d681
entity_id: 246cf9786962c2b10a3e6518616d9107
domain: switch - type: turn_off
device_id: f05fa1d176a6aaba258bcd554a7bbed3
entity_id: 0cabce147876c3f758be4ee6d6f98abc
domain: switch - type: turn_off
device_id: 604012bcae44ee5f581e0d1a66ffd928
entity_id: b035f367b3b707576ec033b5c8b74878
domain: switch
mode: restart
