Interpretation of MQTT Topic to create Sensors in Configuration.yaml

Hello there,
I tried to enable my new smartmeter into Homeassistant, but failed. The old one was quite straight forward.
I have the Iskra eHZ-MT681-D4A52-K0p smartmeter and tried this script

>D
>B
=>sensor53 r
>M 1
+1,3,s,0,9600,
1,77070100010800ff@1000,Verbrauch,kWh,Bezug_Gesamt,4
1,77070100020800ff@1000,Erzeugung,kWh,Total_out,4
1,77070100100700ff@1,Leistung,W,Power_cur,0
1,77070100240700ff@1,Leistung P1,W,Power_p1,0
1,77070100380700ff@1,Leistung P2,W,Power_p2,0
1,770701004c0700ff@1,Leistung P3,W,Power_p3,0
1,77070100000009ff@#,Service ID,,Meter_id,0|
#

unfortunately this results in the following MQTT message

tele/Smartmeter/SENSOR = {"Time":"2024-10-16T19:34:56","":{"Bezug_Gesamt":2.0000,"Total_out":16.0000,"Power_cur":0,"Power_p1":0,"Power_p2":0,"Power_p3":0,"Meter_id":"090149534b000564e1bd"}}

but it is not splitted into different values.
Any idea how I can split them to homeassistant to get seperate values?
Thanks a lot.

okay I figured out, this could be a string, which I need to split. But the MQTT example is quite confusing. :frowning:

I got it somehow over the tasmota integration.

mqtt:
  sensor:
    - name: ""Bezug_Gesamt
      state_topic: "tele/Smartmeter/SENSOR"
      value_template: "{{value_json.bezug_gesamt }}"

Try this. You might have to set unit_of_measurement: ''Whatever" You may also have to stick in a |float in the value template.