Energy Dashboard
Checklist
- [X] I need support with using the integration.
- [X] My issue is not a feature request
- [X] I'm not avoiding to fill out the bug report form.
Describe the issue
Hi, can anybody give a hint, how to integrate the battery into the Energy Dashboard?
https://www.home-assistant.io/docs/energy/battery/
I mean, do I really need a extra energy sensor to measure In and Out values? Or can anybody give a hint how to create a template?
Regards, Thomas
You can use for power out a template sensor:
{{ [states("sensor.smartbat_..._power") | float(0) *-1, 0] | max}}
and for power in:
{{ [states("sensor.smartbat_..._power") | float(0), 0] | max}}
both with
Unit of measurement W
Device class power
State class measurement
Then create via the helpers an integration sensor for each of the above template sensors.
You can then add the template sensors as in/out to the energy dashboard in the category battery.
ok, Step 1 looks like this:
- sensor:
- name: "DWCE00531J-029 Leistung Rein"
unique_id: "dwce00531j_029_leistung_in"
state: '{{ [states("sensor.dwce00531j_029_leistung") | float(0) *-1, 0] | max}}'
unit_of_measurement: "W"
device_class: "power"
state_class: "measurement"
- name: "DWCE00531J-029 Leistung Raus"
unique_id: "dwce00531j_029_leistung_out"
state: ' {{ [states("sensor.dwce00531j_029_leistung") | float(0), 0] | max}}'
unit_of_measurement: "W"
device_class: "power"
state_class: "measurement"
But how I should do the helper with the integral sensor?
And should the Items not be of unit_of_measurement: (K)Wh and state_class: total_increasing?
Ok, schaut gut aus. :+1:
You could have done it using the GUI, but YAML works as well. Next is to generate one integration sensor for each, or via YAML. This will then result in (k)Wh so you can add to the energy dashboard.
This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 15 days.
This issue was closed because it has been stalled for 15 days with no activity.