Hi,
i have tuya sensor in my mailbox which is linked to a tuya WiFi doorbell Gateway. Once the mailbox is opened an event is fired. I will use this trigger now to send a notification but struggling with the code.
I’ve captured the event via the event recorder but i am not able to add the information correctly as trigger in an automation
Here is the event:
event_type: state_changed
data:
entity_id: event.briefkasten_turklingel
old_state:
entity_id: event.briefkasten_turklingel
state: "2025-10-08T15:13:28.006+00:00"
attributes:
event_types:
- null
- ring
event_type: ring
message: Posteinwurf
device_class: doorbell
friendly_name: Briefkasten Türklingel
last_changed: "2025-10-08T15:13:28.008017+00:00"
last_reported: "2025-10-08T15:13:28.008017+00:00"
last_updated: "2025-10-08T15:13:28.008017+00:00"
context:
id: 01K7264TE8R90VXPYNGZAM8643
parent_id: null
user_id: null
And that’s my try try to add it as trigger
trigger: event
event_type: state_changed
event_data:
entity_id: event.briefkasten_turklingel
attributes:
event_type: ring
What’s wrong in my code?