Monitor Baby Feed during night Graph

Hello there,
I’m familiar with Node-red, and custom:mini-graph-card. And I would like to combine both together.

So here is the idea.
We have a baby and we close her door at night when she goes to bed. I would like to track, during night, how many times we open that door and basically increase a boolean. At a certain time of the morning I want it to store that number (1,2,3,4,etc) and reset that boolean for the next night.

Basically I want to create a database of how many times per night, and then use mini-graph-card to create a graphic to display that per night.

Any help here would be awesome!