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)?
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”}
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…
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?