I’ve created an automation that reads out values from our SMA PV system to me. Below is an example.
I’ve created an automation that reads out values from our SMA PV system to me. Below is an example.
It’s working fine so far, except that the values are recorded in Wh. However, I would like to have them read out in kWh. Does anyone have any ideas how I can proceed?
You’d need to add a check/translation into your message along these lines:
{% if states('sensor.sma_pv_gedo_battery_status_operating_mode') == 'charging battery' %}
Batterie wird geladen
{% endif %}
The safest way to get the correct string after the == is to find the sensor state in the Developer tools - states.
If you want use different states, e.g. ‘Batterie wird entladen’ or ‘Batterie Status unbekannt’, you’ll have to find out how these states are reported and add a few {% elif %} and/or {% else %} lines to the message.