How to change switch to display a toggle icon

switch: 
  - platform: command_line
    switches:
      car_charger:
        command_on: "curl --digest -u 10XXX794:Password https://s4.myenergi.net/cgi-zappi-mode-Z1X01XXX6-1-0-0-0000"
        command_off: "curl --digest -u 10XXX794:Password https://s4.myenergi.net/cgi-zappi-mode-Z1X0XXX6-4-0-0-0000"

How do I change this to a slider switch (instead of the zap icons) in lovelace

I looked through my yaml and other configurations but could not find anything else than that I have changed the icon.
Maybe that is the only thing needed?