Custom device entities from Tasmota device

Using the Tasmota integration. SO19 0 so device is discovered.

22:04:46.757 CMD: mem
22:04:46.865 MQT: stat/b571cb0223c94d8088dab406a39b8758/RESULT = {"Mem1":"Variable1","Mem2":"Variable2","Mem3":"","Mem4":"","Mem5":"","Mem6":"","Mem7":"","Mem8":"","Mem9":"","Mem10":"","Mem11":"","Mem12":"","Mem13":"","Mem14":"","Mem15":"","Mem16":""}

Anyone have a solution to expose, as an entity with attributes of mem1, …, mem16, the tasmota mem variables using discovery?

Something like…

sensor.device_mem (not sure what the state should be)
attrs:
  mem1: Variable1
  mem2: Variable2
  ...
  mem16: ''

Hello GAHA,

If you have the tasmota discovery integration, you should see it in your system already. Look at the integrations tab for tasmota.

Open your Home Assistant instance and show an integration.

I see the device in the Tasmota integration. Switches, sensors, etc show up.

I need to create custom entity with mem variables as attributes and assign to device, using discovery.

Figured something like this would work…

rule1 on system#boot do 
publish2 tasmota/discovery/%macaddr%/config 
// publish to the same topic used for tasmota discovery
{
"name":"%topic%_mem",
"state_topic":"stat/%topic%/RESULT",
"value_template":"-",
"json_attributes_topic": "stat/%topic%/RESULT",
"availability_topic":"tele/%topic%/LWT",
"payload_available":"Online",
"payload_not_available":"Offline",
"unique_id":"%topic%_mem",
"device": {
  "connections":[["mac","%macaddr%"]]}
}

Entity isn’t created :frowning:

What am I missing here?

Tasmota Discovery don’t work like that.

Use old homeassistant discovery in rules only

Publish2 homeassistant/sensor/nikito7-EB1/pfactor/config {“name”:“Power Factor”,“uniq_id”:“EB1_PowFac”,“stat_t”:“tele/edpbox1/SENSOR”,“val_tpl”:“{%% set x = value_json.EB1.PF|float(0) %%} {%% if x > -1 %%} {{ x }} {%% endif %%}”,“dev_cla”:“power_factor”,“stat_cla”:“measurement”,“dev”:{“ids”:“nikito7-EB1”}}