Hello,
i use HomeAssistant a long time but haven’t really gotten in programming. Now because i have an electric Car i want to get more stuff in my Energy Dashboard.
I installed the Cupra Connect plugin which gives me the Charge Power in kW and the location of the Car. I want only the loading at my wallbox in the Dashboard so i wrote the script below. Which seems to work it gives me the value in kW. Now i need to make the “Cupra_Born_Ladeleistung_Wallbox” into kWh to be used in the dashboard. I can select it but it gives me strange output seen in the Screenshot below. I have no idea what i am doing wrong. In the Screenshot “Stehlampe AZ” and “3D Drucker” are the same like the upper kwH yaml part and work fine.
The part of my yaml:
- name: "Wallbox"
unique_id: "Wallbox"
unit_of_measurement: "kWh"
device_class: "energy"
state_class: "total_increasing"
state: >-
{{ float(states('sensor.Cupra_Born_Ladeleistung_Wallbox')) | round(3) }}
- name: "Cupra Born Ladeleistung Wallbox"
unique_id: "Cupra_Born_Ladeleistung_Wallbox"
unit_of_measurement: "kW"
state_class: measurement
device_class: power
state: >
{% if states('device_tracker.cupra_born_tracker') == 'home' %}
{{ states('sensor.cupra_born_charge_power') | float(0) }}
{% else %}
0
{% endif %}
My Energy Dashboard
I really hope someone can help me, im a bit frustrated. Thank you in advance.