Hi guys,
I need some help with templating. I just bought a new power consumption meter. It came with a mqtt feature build in. The problem is that only publish in a single topic all the 5 sensors included. The meter send for example the current consumption in W, in sequence he send the energy output to grid in kwW, and so on. He keep rewriting the same topic all over again.
Here you guys can see the messages sent by the unit:
05/11/2022 13:31:27
{"variable":"EPT_C", "value":1.38,"unit":"kWh"}
05/11/2022 13:31:27(-0 seconds)
{"variable":"EPT_G", "value":9.34,"unit":"kWh"}
05/11/2022 13:31:27(-0 seconds)
{"variable":"IA", "value":24.56,"unit":"A"}
05/11/2022 13:31:27(-0.04 seconds)
{"variable":"UA", "value":242.35,"unit":"V"}
05/11/2022 13:31:27(-0.05 seconds)
{"variable":"PA", "value":-5986.25,"unit":"W"}
The variables he send is: EPT_C, EPT_G, IA, UA and PA.
Do you guys know how can i integrate that inside a mqtt sensor inside HA?
Currently stuck in this:
- platform: mqtt
name: medidor1_pa
device_class: power
unit_of_measurement: "W"
state_topic: 'sensor/medidor1'
value_template: >-