Show last cat feed time in Home Assistant

HI, i am currently experimenting with a Aqara Vibration Sensor. I bought this a while ago without any particular purpose for it.
Since we have a cat that wants to eat whole day, i came up with the idea to but the sensor on the cat food box that we use to feed the cat with some dry food.
In that case the cat can’t be fooling us like she haven’t had food for hours :grin:
The vibration sensor can give different statuses , but i think the “drop” status is the one i am looking for. How can i make a sensor which tells me the last the the Aqara sensor measured a “drop” action/status ? In that case i can easily see in HA what the last time was when we we gave the cat some food?

Hi, I have exactly same setup. I made a helper which displays text in UI, automation just sends time to it. I’m using “tilt” as it’s more reliable than vibration and shake, also no false positives. Automation looks like this:

alias: Cat food
description: ''
trigger:
  - device_id: e9a17240d4ac47699657297319cd0fba
    domain: zha
    platform: device
    type: device_tilted
    subtype: device_tilted
condition: []
action:
  - service: input_text.set_value
    data:
      value: '{{ now().strftime(''%H:%M %d-%m'') }}'
    entity_id: input_text.kot
mode: single

Wow, that looks cool thanks! I see you are using zha, but i am a zigbee2mqtt user. How do i need to change the automation to let it work ? I don’t understand what you are meaning with the input text set? Using the tilt sounds as a good alternative btw!

I’m not familiar with mqtt unfortunately. “Tilt” is a trigger, you will need to extract it from zigbee2mqtt somehow. To create a helper go Configuration -> Helpers and add text helper. It creates an entity that displays text (mine is input_text.kot). Action in my automation just passes current time and date to it whenever trigger fires. Looks like this in UI:

Ok, i created this, but get the status unknown:

########## Laat zien wanneer kat eten heeft gehad ##########
- id: kat eet meter
  alias: kat eet meter
  trigger:
    - platform: state
      entity_id: sensor.vibratiesensor_action
      to: "tilt"
  condition: 
  action:
    - service: input_text.set_value
      data:
        value: '{{ now().strftime(''%H:%M %d-%m'') }}'
        entity_id: input_text.kat_voor_het_laatst_gegeten

After some restarts from HA it is working now ! Thanks @nevermind for the help!