Climate generic: how to put in dashboard operation mode switch?

Hi I have configured a climate.generic. I want control in my dashboard the operation mode of the climate (off/heat) like as switch.
What is the correct way to do this?
Thanks

Edit double post