Hey,
I receive my meter reading via MQTT and want to display it in Home Assistant (HAS). Now I have the problem that my meter outputs “2314” as volts, but I need to add a comma so that it becomes “Value”: “231.4”. Here is my configuration:
- name: "Volt L1"
unique_id: mbusmeters.l1v
state_topic: "mbusmeters/260044692E280902"
unit_of_measurement: "V"
device_class: "VOLTAGE"
value_template: >
{%- for rec in value_json.MBusData.DataRecord -%}
{%- if (
( rec.Function == "Instantaneous value" )
and ( rec.StorageNumber == "0" )
and ( rec.Device == "1" )
and ( "1e-1 V" in rec.Unit )
) -%}
{{ rec.Value }}
{% endif -%}
{% endfor -%}
In Home Assistant (HAS), this value is displayed as 2,314 V.