How to shoot a calendar event with developer tools

Hi,

I’m lost there…
I’m trying yo debug a calendar event triggered automation. Shooting calendar events manually would make that so much easier than adding events manually.

I picked event_type: state_changed

data (copied from a captured event):

entity_id: calendar.teszt
old_state:
  entity_id: calendar.teszt
  state: "on"
  attributes:
    message: mb1 booked
    all_day: false
    start_time: "2023-10-20 22:35:00"
    end_time: "2023-10-20 23:00:00"
    location: ""
    description: ""
    friendly_name: local teszt cal
    supported_features: 7
  last_changed: "2023-10-20T20:35:11.159266+00:00"
  last_updated: "2023-10-20T20:35:11.159266+00:00"
  context:
    id: 01HD7CS45QKH3000J2H0RR39BG
    parent_id: null
    user_id: null
new_state:
  entity_id: calendar.teszt
  state: "off"
  attributes:
    friendly_name: local teszt cal
    supported_features: 7
  last_changed: "2023-10-20T21:00:11.191214+00:00"
  last_updated: "2023-10-20T21:00:11.191214+00:00"
  context:
    id: 01HD7E6X1QD4FS9KBPMMXGZWVT
    parent_id: null
    user_id: null

but the automation does not get triggered.
What data I need to send?

Or, is there any simpler way to debug a calendar based automation?

The Calendar event trigger is not based on the state object of the calendar entity… and AFAIK there isn’t currently a method to manually raise an event that would cause a Calendar event trigger to fire.

To test a calendar-based automation you should create a test event that starts (or ends depending on your goal) a few minutes in the future, taking into account any offsets you have included in your trigger. Then reload the automation so that the trigger listener is created and the calendar is reloaded. Wait for your automation to fire.

Keep in mind that the Calendar trigger listener only refreshes every quarter hour so you’ll need to reload the automation to pull in the recent data if you modify the calendar.

1 Like