Grandor
(Thomas)
February 15, 2022, 7:35pm
1
Hi,
I have a PV system and would like to see the data in the Energy Dashboard.
Which sensor do I have to specify in energy board?
current value
daily value
totally
The values always have to be in “kWh”, right? because my “current value” returns “Wh”.
Does that mean I have to change the value to “kWh” and divide the value by 1000 or what?
Here is my sensor config:
configuration.yaml - has only
homeassistant:
customize_glob:
sensor.energy*:
last_reset: '1970-01-01T00:00:00+00:00'
sensor.yaml - I need help here to change “Wh” to kWh".
I’ve already tried that - without success.
value_template: "{{ states('sensor.energy_garage') | float / 1000 | round(2) }}"
Result: 0.0
# Solarman MQTT
- platform: mqtt
name: "sensor.energy_garage"
state_topic: "solarmanpv/station/generationPower"
unique_id: "generatedPower"
unit_of_measurement: "kWh"
value_template: "{{ (value | float | round(2)) / 1000 }}"
device_class: energy
state_class: measurement
Where is my mistake - thanks…
Grandor
(Thomas)
February 16, 2022, 10:24am
2
I managed to get the value in “kWh”.
I now have “three” sensors, MQTT, sensor & template.
None shows data in the Energy Dashboard - solar values just stay at 0 kWh.
Integration MQTT sensor:
- platform: mqtt
name: "sensor.energy_garage_pv"
state_topic: "solarmanpv/station/generationPower"
unique_id: "generatedPower"
unit_of_measurement: "kWh"
value_template: "{{ (value | float | round(2)) / 1000 }}"
device_class: energy
state_class: measurement
Integration Sensor:
- platform: template
sensors:
energy_garage:
entity_id: sensor.energy_pvg
friendly_name: 'PVG'
value_template: "{{ states('sensor.energy_garage_pv') }}"
unit_of_measurement: "kWh"
device_class: energy
Integration Template:
- name: "Garage-PV"
unique_id: "solarman_energy_live"
unit_of_measurement: 'Wh'
state: "{{ state_attr('sensor.solarmanpv_inverter', 'Total_AC_Output_Power(Active)') }}"
device_class: energy
state_class: measurement
attributes:
last_reset: '1970-01-01T00:00:00+00:00'
All sensors get data…but no data in the Energy Dashboard
Grandor
(Thomas)
February 16, 2022, 4:11pm
3
I think the problem ist the “last reset” value.
The sensor gets values, but no current date.
Entity:
unit_of_measurement: kWh
device_class: energy
friendly_name: energy_gpv
state_class: measurement
last_reset: '1970-01-01T00:00:00+00:00'
MQTT raw data:
"Year": "22",
"Month": "2",
"Day": "16",
"Hour": "16",
"Minute": "56",
"Seconds": "30",
Do you still have to transfer it as “last reset”
Grandor
(Thomas)
February 17, 2022, 4:39pm
4
I found the solution myself.
Problem is probably the “state_class”.
It always said it had to be “measurement”, but since version 2021.8 this has been omitted. It is now enough “total_increasing”.
Now I finally have my solar statistics in the Energy Dashboard
Hi, I have the same problem (I have Solarman integration). Do you have an idea what I could do?