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%"]]}
}
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”}}