Switch in custom banner card

Hi!

I’m trying to make a toggle switch in my custom banner card.
So pressing the name of the entity will send me to the dimmer function (which works)
and then I want an on/off switch just below.
Would this be possible?

image