I have a binary sensor for my ring doorbell.
In automation.yaml I have a trigger that should send a message to my google home mini when the doorbell is pressed.
For some reason however the automation is not triggered. When I set the state of the sensor manually, the message is played, so I assume the automation part is correct.
Now I have two questions :
Can I put the binary sensor in sensors.yaml ?
Do I have to set the state of a sensor back to 0 after the bell is pressed ?
This code I have in configuration.yaml
binary_sensor:
- platform: ring
name: ring_frontdoor_bell
And this in automations.yaml
- alias: ring_voordeur
trigger:
- platform: state
entity_id: binary_sensor.ring_front_door_ding
from: '0'
to: '1'
action:
- service: tts.google_say
data:
entity_id: media_player.family_room_speaker
message: "There is someone at your frontdoor"
entity_id: media_player.googlehome7626
message: "There is someone at your frontdoor"
Tried what? To be clear, you should change your automation trigger to:
trigger:
- platform: state
entity_id: binary_sensor.ring_front_door_ding
from: 'off'
to: 'on'
EDIT: Also, check binary_sensor.ring_front_door_ding on the States page. What does it show for its state (when it has updated itself, not after you’ve manually changed the state)?