Shelly1 with Tasmota 8.2 -> MQTT Discovery for switch (not relay)

Hello all,

I try to move the automation intelligence (AI) to HA only and reduce the manual config files. Therefore I use MQTT autodiscovery (setoption19 1, setoption 30 1 for light), which works fine, BUT the switches (typically one switch) per Shelly are not shown - only relay and wifi-state (see picture):

I wish the switch state shows as a binary sensor, then I can work with it for example in Node-Red.
Via MQTT the Tasmota sends:
stat/sh-eg-gaeste/SWITCH1 = {“STATE”:“ON”}
14:45:21 MQT: stat/sh-eg-gaeste/RESULT = {“POWER”:“ON”}
14:45:21 MQT: stat/sh-eg-gaeste/POWER = ON
14:45:23 MQT: stat/sh-eg-gaeste/SWITCH1 = {“STATE”:“OFF”}

but mqtt discovery obviously does not consider it a sensor to show.

I don’t know - is it a Tasmota configuration problem (where to search?) or is it a HA MQTT Discovery Issue (where to search)?

Thanks for your help,
br Florian

1 Like

What version of tasmota are you running ? My shelly1’s run 6.6.0, but don’t send a /SWITCH1 message.

Don’t worry, I saw in your screenshot. 8.2.0.

Yes, 8.2 - funny, on another shelly following comes up:
16:18:22 MQT: stat/sh-eg-arbeits/SWITCH2T = {“TRIG”:“TOGGLE”}
16:18:23 MQT: stat/sh-eg-arbeits/SWITCH2T = {“TRIG”:“TOGGLE”}

But still not autodiscovery-sensor…

My question: You said “option 30 1” for light, you want to see your switch als light.
It’s what I can see on your screenshot. So you can’t see a switch…

Do I miss something?

… sometimes a mqtt restart helps.

It seems tasmota 8.2.0 does send a SWITCHx statement.

I have tasmota 8.2 running, but with other devices. They send SWITCHx statement.

Check the device configuration in tasmota. Is it configured as a shelly 1?

No you don’t miss something, maybe I was not precise enough:

switch → I mean in terms of the wall-switch (input SW on shelly device), I can see the relay (as on screenshot). restarted several times of course.
Do you have the binarysensor.switch available with a shelly and Mqtt discovery?

you are right, I configured it from generic to shelly:

did it that way, that the hardware-switch-input does NOT trigger the relay…

is it possible, that this is not recognized by HA yet?

You have to check if Tasmota actually sends a discovery message for the SWITCHx topic.

If not, you will have to create a sensor for it manually in HA

Nice hint - mqtt explorer I didn’t know yet, great tool.
seems, that Tasmota does not signal to HA/MQTT discovery enough:

Status and light has a config-file
Bildschirmfoto 2020-04-17 um 19.02.17 Bildschirmfoto 2020-04-17 um 19.02.30

binary_switch/switch has not (its empty).
Bildschirmfoto 2020-04-17 um 19.02.38

So it seems I have to continue my search in the Tasmota community?
Thanks for your support to find the root of the problem!