MQTT - Sonoff T3 switch status (discovery vs yaml)

Hi dear community,

I flashed a Sonoff T3 (with 3 switches) with tasmota and set home assistant discovery on. I got the 3 switches and a status with information on boots, RSSI, … I then switched to the configuration with yaml entries. How can I enter that status information of the device (not switch stat) equivalent in yaml?

I changed to old fashion configuration.yaml because of frequent reboots, the discovery was not always setup or did not sync with the device.

TIA Mario

Create some MQTT switches. point to the right state topics and should be good to go.

Probably will want the json_attributes_topic. Not sure what ‘status information’ you are talking about though.

Tx Jim,
but the states of the 3 switch itself work. What I mean is the state of the Tasmota Chip. It was showing the wifi strength signal, the number of boots, … and other stuff.
It seems like a combination of the “sonoffs20c/stat/STATUS11” info but I don’t know how to get all that info in one card, like showing wifi % and then details when clicked.

It is not important for the functionality but it is nice to know.

Mario

You can probably just add this to your mqtt switch.

json_attributes_topic: "/sonoffs20c/stat/STATUS11"

It should just add all of the stats in that STATUS to the attributes of the switch assuming it’s valid json (which it should be).

Or, you can create a separate MQTT sensor and listen to those stat/STATUS11 topics if you wanted.

Hei Jim,

it worked! Tx pal … what a community! :stuck_out_tongue:

this is the config I used:

- platform: mqtt
  name: SonoffT1_3CH_A_status_keuken
  state_topic: "domotica/tasmota/SonoffT1_3CH_A/tele/HASS_STATE"
  json_attributes_topic: "domotica/tasmota/SonoffT1_3CH_A/tele/HASS_STATE"
  unit_of_measurement: 'dBm'
  value_template: "{{ value_json.RSSI }}"