Store sensor data after a push of a button?

We have a bluetooth scale that is supported in esphome. That means that we can log our weight and other measures.
The problem is that we use one scale with two persons and there’s no way of adding the person to the data. Our weight is too close to each other to make a distinction based on that.
I’m thinking of installing a button (or two) in the bathroom and only save the data after a push on one of these buttons.
The problem is that i don’t have a clue on where to start… Is there an easy way to achieve this? Or do i need to write a custom component?

Just create a triggered template sensor that uses the trigger as one of the button pushes. then have the template sensor read in the current state of the scale weight to the template sensor.

then another sensor that uses the other button as the trigger. so it then reads in the current state of the scale weight to the second template sensor.

the scale weight will be recorded for both people into one sensor but the two template sensors will only have the weight recorded for the person associated with that persons button.

Thanks for the quick reply. I’ll test that.