mirror of
https://github.com/jbowdre/runtimeterror.git
synced 2024-12-22 19:02:18 +00:00
update post
This commit is contained in:
parent
12ed77705a
commit
b2ab429061
1 changed files with 3 additions and 1 deletions
|
@ -48,7 +48,7 @@ notify:
|
|||
|
||||
The Reolink integration exposes a number of entities for each camera. For triggering a notification on motion detection, I'll be interested in the [binary sensor](https://www.home-assistant.io/integrations/binary_sensor/) entities named like `binary_sensor.$location_$type` (like `binary_sensor.backyard_person` and `binary_sensor.driveway_vehicle`), the state of which will transition from `off` to `on` when the selected motion type is detected.
|
||||
|
||||
So I'll craft start with a simple automation which will push out a notification whenever any of the listed cameras detect a person (or vehicle):
|
||||
So I'll begin by crafting a simple automation which will push out a notification whenever any of the listed cameras detect a person or vehicle[^vehicle]:
|
||||
```yaml
|
||||
# torchlight! {"lineNumbers": true}
|
||||
# exterior_motion.yaml
|
||||
|
@ -73,6 +73,8 @@ action:
|
|||
message: "{{ trigger.to_state.attributes.friendly_name }}"
|
||||
```
|
||||
|
||||
[^vehicle]: Hopefully I only need to worry about vehicles in the driveway. _Please don't drive through my backyard, thanks._
|
||||
|
||||
{{% notice tip "Templating" %}}
|
||||
That last line is taking advantage of Jinja templating and [trigger variables](https://www.home-assistant.io/docs/automation/templating/#state) so that the resulting notification displays the friendly name of whichever `binary_sensor` triggered the automation run. This way, I'll see something like "Backyard Person" instead of the entity ID listed earlier.
|
||||
{{% /notice %}}
|
||||
|
|
Loading…
Reference in a new issue