Hi guys,
I have tried out all the other posts and solutions I could find but could not solve this simple thing so far . I have a SDM630 energy meter which is delivering its data to a Modbus Gateway, which publishes the data via mqtt.
SDM630 β RS485 β Modbus Gateway β Wifi β mqtt broker on Home Assistance.
Unfortunately the Modbus gateway sends the values together with the unit via mqtt.
My configuration file look like this:
sensor:
- name: sdm630_spannung_L1
state_topic: Gateway/SDM630/Spannung_L1-N
device_class: energy
- name: sdm630_wirkenergie_bezug
state_topic: Gateway/SDM630/Wirkenergie_Bezug
state_class: total_increasing
device_class: energy
- name: sdm630_gesamtleistung
state_topic: Gateway/SDM630/Gesamt_Leistung
device_class: energy
Here how the data look like:
As the unit is already in the values I canβt use the unit field properly. My actual issue is that the Energy dashboard refuses to show the consumption, saying that the value cannot be parsed as number:
Entity has non-numeric state
The following entities have a state that cannot be parsed as a number:
sensor.sdm630_wirkenergie_bezug (1.68kWh)
I tried tons of different variants using the value_template to try to strip the unit from the value, but none worked. Hope someone has a clue what to enter in value_template to strip the V, kWh and W from the sensor values getting the bare values as a result.
Thanks in advance for your support