Energy sensor values inaccurate

Hi,

I hope this post makes sense.

I’m monitoring my Solar Inverter via MQTT and the output that I get doesn’t look right, it appears to be missing a zero. It looks like this in MQTT too so I think I probably need a template.


This is what I see on my Inverter Cloud portal

image
This is how the data appears in Home Assistant.

Can someone please tell me what I need to do to add a trailing zero on the consumption sensor?

Once I’ve got that figured out I will work on the others.

 - platform: mqtt
   name: "PV Consumption"
   state_topic: "Sofar2mqtt/state"
   value_template: '{{ value_json.consumption  }}'
   unit_of_measurement: W
   device_class: energy

Thank you

I don’t know if this is the correct way to sort it but I have done this and I’m seeing the results I want.

 - platform: mqtt
   name: "PV Today Consumption_energy"
   state_topic: "Sofar2mqtt/state"
   value_template: '{{ value_json.today_consumption | multiply(0.01) | float }}'
   device_class: energy
   unit_of_measurement: kWh