Tasmota device - Not showing a Tasmota switch (no relay) in the integration

Neither does specifically changing the icon, even though it’s the same as was specified by ESPHome…

Bug in HA 2022.7.5? or ESPHome integration??

Do you have any binary_sensors?

Before:

After:
ESPHome:

binary_sensor:
  - platform: gpio
    pin: 
      number: GPIO14    #D5
      mode: INPUT_PULLUP
#      inverted: True
    name: "Coffeemaker Status"
#    entity_category: config
    id: coffeemaker_status
#    icon: mdi:coffee-maker

Uploaded config to device, deleted it from HA, restarted HA and new device discovered.
No change in behavior.
Specifying the icon in the entity does not display it in lovelace entities card:

Time for an HA bug report??

I let things be and HA sorted itself out over time…
image

I know this is old but I spent an hour trying to figure out why I couldn’t see my “Switch” type Tasmota entries in HA and I wanted to keep the Tasmota firmware. The reason is because discovery will only create a binary_sensor type sensor if:

  1. The switches are discoverable. This requires SetOption114 ON
  2. SwitchMode<x> is not set to 0 (toggle). I set mine to 1 (follow), although 2 (invert follow) also works if the ON/OFF indicator is swapped.
  3. (optional) The resulting HA sensors are named using SwitchText<x>

This keys off the MQTT discovery message config.swc[]. If your values are -1, that means SetOption114 is off and Tasmota is not publishing them. If they are set to 0, that means you’ll only get HA triggers defined for them. If they are set to 1, you get HA sensors for them. The names are in the discovery config.swn[].

1 Like

I was struggling with this so matched your settings. I think I had to reboot the Tasmota to get HA to finally discover it.
Thank you.

After using

SetOption114 1

and

SwitchMode 1

and a reboot of the Tasmota device, the Switch1 became visible in Home Assistant.