Query entity status and display some data

Hi there,

apologies for my ignorance but Home Assitant is still quite complicated for me to use. I would love to do more scripting but it is just hard for me to understand how everything works.

Right now I would like to do something very simple. I am using a pet feeder which communicates via zigbee. It collects several data, the most important to me is how many potions were dispensed today.

Unfortunately I cannot just use that data as-is, because the time zone is wrong as described here Aqara pet feeder C1 potions dispensed in wrong time zone
So I wanted to instead write a little script that gets that data, corrects the time zone, counts how many times this was triggered and then just shows one big fat number of feeding potions on my home screen.
How would I be able to go about that? I don’t need someone write me the code but I need help with a) making such a tile and b) how to get the data into that tile?

  1. Set up a Counter helper.
  2. Create an automation with 2 triggers and a Choose action
    a. When the existing feeder sensor’s state value increases, increase the Counter.
    b. At midnight, reset the Counter.

This could also be done with a trigger-based Template sensor.

Awesome, thank you so much!! Will try it out and see how far I get.

Unfortunately this did not work. It works sometimes but even though the trigger value (weight dispensed today) is accurate and counts up, it does not always trigger this counter :confused: