After 2022.4 some Switches transformed from toggle to 2-button

After upgrade from 2021.12 to 2022.5 (and 2022.5 - same effect) some Switches changed from accustomed toggle image to image

Declaration of same entities in config.yaml:

# Shelly SwimpoolBoiler switch
  - platform: mqtt
    name: "SwimpoolBoiler"
    state_topic: "shellies/shelly1pm-E09806A9F1F8/relay/0"
    command_topic: "shellies/shelly1pm-E09806A9F1F8/relay/0/command"
    payload_on: "on"
    payload_off: "off"
# Shelly SwimpoolProjector switch
  - platform: mqtt
    name: "SwimpoolProjector "
    state_topic: "shellies/shelly1l-E8DB84A1B187/relay/0"
    command_topic: "shellies/shelly1l-E8DB84A1B187/relay/0/command"
    payload_on: "on"
    payload_off: "off"

The former changed to 2-button switch, while the latter remains in toggle style.
Can’t find out the reason, please help to sort it out.

This changed quite a while back - if you search in the forum there are plenty of discussions re MQTT switches and binary sensors.

The default state was changed from off to unknown, the fix is to ensure that your device sets the retain flag. Depending on your device there are a bunch of methods to do this - see the forum discussions.