#Listen for updates to a calendar

1 messages · Page 1 of 1 (latest)

north socket
#

Hi all, I'd like to make an automation (or rather a templated sensor) that reflects whether today's calendar has any events matching a pattern (whether I am on the schedul to cook dinner). I know how to do this on a one-off basis using a service call and filtering the response; and I could certainly run the trigger on a time interval, but I feel the natural way to do this is when the calendar itself is updated. I am using Google Calendar integration. Is there a generic home assistant event that gets fired when an entity is updated (not a "calendar event" but an event signal)? Thanks for any ideas.🗓️

final wolf
#

I'm going to guess not. I have a local calendar, started listening to all events in developer tools, and on adding a new item to the calendar I found no event fired.

#

maybe google calendar has one that local calendar doesn't, but you'd have to test and see maybe

north socket
#

thank you for that check!

#

i'm still hoping that polling based integrations emit events on their updates, but my searching of the code hasn't shown me anything

final wolf
#

there is last_reported in the state object

#

might be an event for that, I am not sure

vague holly
north socket
#

Thanks for the idea @final wolf , but the following trigger did not fire:

entity_id:
  - calendar.family
attribute: last_reported```
and the folowing template renders as `null`:
```{{ state_attr("calendar.family", "last_reported") }}```
final wolf
#

last_reported is not an attribute

#

{{ states.calendar.family.last_reported }}

#

But as mekaneck said you can't trigger on it.