MQTT Switch shows wrong switch icon

Working with a external T-SIM7600 which as a ESP32 and SIM7600 modem build into the one board.

Remotely monitors a property and sends MQTT to Home Assistant.

Q. How or why is the Reboot and Deep Sleep not showing a switch versus the

image

switch:
#LED Internal Blue
- name: “LED Internal Blue”
command_topic: “protect/led”
state_topic: “protect/led”

#Restart
- name: “Restart”
command_topic: “protect/Restart”
state_topic: “protect/RestartStatus”
unique_id: “BPRestart”
payload_on: “1234”
payload_off: “OFF”

assumed_state boolean (Optional, default: true)

For switches with an assumed state two buttons are shown (turn off, turn on) instead of a switch. By setting assumed_state to false you will get the default switch icon.

default switch icon isnt supported for MQTT switch?

A lot of my MQTT switches do that after a HA restart. After a few minutes (when they received their status), they show the normal icon. You can force the normal icon on HA restart by having the status as a retained message, or as said above, assumed_state. I don’t care for that small amount of time that I have other icons.

Thanks but assumed_state is not supported with MQTT switch and for some reason retain: true doesnt seem to make a difference?

Published a mqtt.publish(topicRestart, "0"); but still no difference and it use to work some time after a reboot.

1 Like

Don’t put assumed_state on your MQTT switch definition, but in configuration.yaml

homeassistant:
  customize_domain:
    switch:
      assumed_state: false