How to change the pop-up display of a switch

how do you change the pop-up displayed for a switch?
By default it displays a on/off graph.
Like this:
Screenshot_2020-07-25 Home Assistant

But I would like it to show 0/1 line graph.
Like this:
Screenshot_2020-07-25 Home Assistant(1)

You would have to create a template sensor and graph that.

How do you do that?

What is the pop-up called? a name to search for?

thanks

More information pop-up.