MQTT message with time stamp and multiple sensors value

Hello
i am using an esp8266 with tasmota to read out my NORAX3D electricity meter.
works fine.
the result are sent by MQTT to my Broker
The topic is “tele/NORAX3D/SENSOR”
and i get the follwing results
{“Time”:“2022-03-07T22:32:04”,“Norax3D”:
{
“Total_Sum”:6299.925,
“Power_curr”:582.000,
“Curr_p1”:1.800,
“Curr_p2”:0.680,
“Curr_p3”:0.970,
“Volt_p1”:224.700,
“Volt_p2”:225.900,
“Volt_p3”:227.600}
}

works fine, but the message payload is a String

how can i put the different sensordata to Home Assistant (later to the INFLUXDB) ?

must it all defined in configuration.yaml ?

sensor:

  • platform: mqtt
    state_topic: “tele/NORAX3D/SENSOR”

#But how to devide the string into sensor data ?
i found information here :
MQTT Sensor - Home Assistant (home-assistant.io)
Is that the way ?
in germany we would say : “stand on the hose”
Can anybody help? ;-(

regards Oliver from cologne

The payload is actually json but you will have to create individual mqtt sensors using a value_template. e.g.

sensor:
  - platform: mqtt
    state_topic: "tele/NORAX3D/SENSOR"
    value_template: "{{ value_json.Norax3D.Total_Sum }}"
  - platform: mqtt
    state_topic: "tele/NORAX3D/SENSOR"
    value_template: "{{ value_json.Norax3D.Power_curr }}"
  - platform: mqtt
    state_topic: "tele/NORAX3D/SENSOR"
    value_template: "{{ value_json.Norax3D.Volt_p1 }}"

…etc

I’ll leave the icons, names and units up to you to add.

etc…

thx…
not to see the forest for the trees , sorry

but how did it take an unique ID ? for these entities ?

https://www.home-assistant.io/integrations/sensor.mqtt/#unique_id