How to create a sensor that counts up by 1 every time you press a button

I’m drawing a blank on how I would do this.

I want a card that shows a number. At midnight, this number would be reset to zero. When I press a button on the UI, it would add the value of an input number box to that value.

The function of this is to track a daily goal that we need to reach. Every time we move along that goal, we need to record the value so it’s added to the total.

I can’t for the life of me remember how I can do this.

Use the counter integration and have the button send a service call ‘increment’. Another automation to send the reset service call at midnight

3 Likes