Homeassistant: Ring.com Doorbell — a lot of head scratching

Homeassistant: Ring.com Doorbell — a lot of head scratching

I really love my homeassistant, but nothing drove me as nuts as the Ring.com Doorbell integration

Service States

The issue(s)

Over the course of the last weeks I would have described the main issue differently each time. But currently I am fairly convinced that the core issue was simple.

Service States

So, what definitely is going on, is that the doorbell.ding is a device state which changes when somebody presses the doorbell and the camera itself which holds all the video url and the snapshots and such, are totally unrelated.

By a lot of trying, I found out that this also means when somebody presses the doorbell button, the video_url is still the old one, so you can not send the video out just yet.

Let’s get the picture

It seems that the entity_picture is always up to date, I have seen changing tokens but it was always the latest snapshot, so for now I am using this one in an automation (to send via telegram)

as a trigger we simply take the state change, so the door becomes occupied:

type: occupied
platform: device
device_id: ...
entity_id: binary_sensor.haustur_ding
domain: binary_sensor
for:
hours: 0
minutes: 0
seconds: 2

and we do the following as an action:

service: telegram_bot.send_photo
data:
url: http://hass.local:8123{{ state_attr('camera.haustur', 'entity_picture')}}

But, I still want the video

As I still would like to store the video (or send it via telegram) anyway, I use another automation. Here we are using the state change of the video as a trigger:

platform: state
entity_id:
- camera.haustur
attribute: last_video_id

So whenever there is a new last_video_id, do the following:

service: telegram_bot.send_video
data:
url: "{{ state_attr('camera.haustur', 'video_url') }}"

That’s it for today, please leave a 👏 and be excellent to each other.