Switches look different in cards

Why are some switches (almost all) shown as the “Zapp MaxiCharge Start/Stop” in the image below, while some (in this case, ones from the custom Tesla integration) are shown as those weird “two side-by-side buttons”?

They are both, in fact, domain: `switch`:
type: entities
entities:
  - entity: switch.model_y_charger
  - entity: switch.model_y_heated_steering
  - entity: switch.zapp_maxicharger_start_stop

And both are set to Show as switch in the entity settings. I want it to be shown as the “Zapp” one, not like the “Model Y” one. Is there a way to do that?

The only thing I could find about this was this post with no replies/solutions.

The “side by side” button entities have no state feedback. Home assistant can’t tell what state the entity is in. So it gives you the option to turn on and off.

How were they added to home assistant (which integrations)?

You may be able to add state feedback.

Or if you can’t and these devices can’t be controlled outside of home assistant you may be able to operate them in “Optimistic mode”. In this mode home assistant just assumes that whatever the last command sent to the entity (e.g. turn_on) is the state and can then show a toggle. However if the device can be controlled by another method than home assistant (e.g. a hand held remote control) then the state will go out of sync and this method should not be used.

The one that appears as a toggle switch has state feedback so home assistant knows what state the switch is in and can show you.

They are from the Telsa custom component I linked in the first post.

If I click the entity, it opens this:

And if I look a the history, it really looks like it is state-aware:

Would this help in this case?

# To get toggle switches rather than power flashes in Lovelace -----------------

homeassistant:
  customize_domain:
    switch:
      assumed_state: false

Indeed it does. Thanks!

Weirdly, I added that to config and pressed “reload all yaml” from UI. It worked.

I deleted it from config again and pressed “reload all yaml” from UI (again). It did not change back, it’s still displayed correctly. Very odd, but at least it is as I would want it (without any customization in configuration.yaml).

Oops, spoke too soon. Sort of.

“reload yaml” works after I add

homeassistant:
  customize_domain:
    switch:
      assumed_state: false

to configuration.yaml, but after removing it, nothing changes until a HA restart (so “reload yaml” doesn’t change it back after removing those lines).

I ended up keeping:

homeassistant:
  customize:
    switch.model_y_charger:
      assumed_state: false

for each of the switches (to not apply globally to other switches that actually should be shows as the “side-by-side”)