Hi,
I want to write an automation that triggers when the offset is reached of an event in a caldav calendar.
I can see in the dev tools that the calendar is set up correctly and the offset is parsed correctly.
Using the state changed event listener, I can observe the event where the offset attribute changes:
{
"event_type": "state_changed",
"data": {
"entity_id": "calendar.familie",
"old_state": {
"entity_id": "calendar.familie",
"state": "off",
"attributes": {
"message": "test calendar entry",
"all_day": false,
"start_time": "2022-02-18 11:35:00",
"end_time": "2022-02-18 12:05:00",
"location": null,
"description": null,
"offset_reached": false,
"friendly_name": "Familie"
},
"last_changed": "2022-02-18T10:09:43.293974+00:00",
"last_updated": "2022-02-18T10:29:44.038836+00:00",
"context": {
"id": "b5d8ef023c07360b9a612387c9352f42",
"parent_id": null,
"user_id": null
}
},
"new_state": {
"entity_id": "calendar.familie",
"state": "off",
"attributes": {
"message": "test calendar entry",
"all_day": false,
"start_time": "2022-02-18 11:35:00",
"end_time": "2022-02-18 12:05:00",
"location": null,
"description": null,
"offset_reached": true,
"friendly_name": "Familie"
},
"last_changed": "2022-02-18T10:09:43.293974+00:00",
"last_updated": "2022-02-18T10:32:43.316665+00:00",
"context": {
"id": "2d8797edf3787369e8fd42217b33dd66",
"parent_id": null,
"user_id": null
}
}
},
"origin": "LOCAL",
"time_fired": "2022-02-18T10:32:43.316665+00:00",
"context": {
"id": "2d8797edf3787369e8fd42217b33dd66",
"parent_id": null,
"user_id": null
}
}
But the following automation (build according to Automation Trigger - Home Assistant) never triggers:
Automation with attribute trigger:
alias: 'Notify: Family calendar offset reached (Duplicate)'
description: ''
trigger:
- platform: state
entity_id: calendar.familie
attribute: offset_reached
condition: []
action:
- service: logbook.log
data:
name: Calendar Offset reached
message: The calendar has reached the next offset
entity_id: calendar.familie
mode: single
setting from and/or to to false/true does not change anything.
Any help is appreciated. Also any tips on how to debug this further.