Aqara vibration sensor notification when mailboks tilted

Hi,

I made an automation that should send a notification to my iPhone when someone opens the mailbox

I have put a Aqara vibration sensor in the mailbox

I have used the trigger “device tilted” but nothing happens?

When a use the trigger vibration it works fine?

But the problem is, that the mailbox have vibration when large vehicles is driving by?

This is the automation (im danish, if you dont understand the messages :smile:)

alias: Postkasse
description: ''
trigger:
  - device_id: xxxxxx
    domain: zha
    platform: device
    type: device_tilted
    subtype: device_tilted
condition: []
action:
  - device_id: xxxxxx
    domain: mobile_app
    type: notify
    message: Så er der dælme post!
    title: Postkasse
  - device_id: xxxx
    domain: mobile_app
    type: notify
    message: Så er der dælme post!
    title: Postkasse
  - device_id: xxxxx
    domain: mobile_app
    type: notify
    message: Så er der dælme post!
    title: ''
mode: single

If you are using ZHA I am not sure that the TILT or DROP are exposed through the entity and you will instead need to check the zha_event.

My recommendation is to go to Developer Tools > Events and start listening to zha_event then tilt your sensor to find the proper element you need.

Ok, tilt shows up in the drop down in trigger sektion of automation and yes I’m using ZHA.

I Will try your solution

Thanks

Fik du det til at virke?.

I think the tilt sensor detects rotational movement, not leaning. I have it mounted the the lock mechanism on my safe. So the sensor rotates when I turn the handle. Ill get notification based on the rotation.
Im using ZHA.
If you have it mounted to the door, it would just lean. Maybe that tilt doesnt work.