Adding a custom state to a badge

Hi all,

I have a switch badge which I use to turn on my coffee machine. It shows the state (on/off). How can I add to show when the switch was turned on next to the on/off state, similar to below screenshot:

CleanShot 2025-03-10 at 10.44.18@2x

I want to be able to see if enough time has passed since I turned on the switch for my coffee machine to get to the right temperature.