Closed timolow closed 2 years ago
Hey Tim, to use these for the Energy Dashboard you'll need to add this to your configuration.yaml - be sure to change the sensor numbers to not conflict with any you may already have setup. I'll update the documentation with this. let me know if this solves your issues?
sensor 10:
- platform: integration
source: sensor.solarpower
name: energy_solar
method: left
# unit: kWh
unit_prefix: k
unit_time: h
round: 2
sensor 11:
- platform: integration
source: sensor.exporting
name: energy_exporting
method: left
# unit: kWh
unit_prefix: k
unit_time: h
round: 2
sensor 12:
- platform: integration
source: sensor.importing
name: energy_importing
method: left
# unit: kWh
unit_prefix: k
unit_time: h
round: 2
Now add those new sensors to the Energy Dashboard:
Howdy!
I went ahead and added the sensors to config.yaml, restarted, they show up under entities however they do not show up under the dropdown box for the energy dashboard. Trying to manually insert them will not allow me to save.
Uncommenting unit: kWh and restarting seems to have done the trick!
Might have been short lived, I don't see any data populated nor do I see the sensors anymore in entities. I do see this warning after adding the sensors to the energy dashboard.
Entity not defined
Check the integration or your configuration that provides:
sensor.energy_importing
sensor.energy_exporting
Ahh - I see the problem - you need to make a change to say that those sensors are set as device_class: energy
Firstly, comment out the unit: kWh for those sensors as it's no longer valid.
Next, please check if you have this code in configuration.yaml - be sure that it is formatted exactly as shown including the indents. Hopefully you already have it there, if not, add it.
homeassistant:
customize: !include customize.yaml
Now edit customize.yaml - if it doesn't exist then create it. Add the following lines:
sensor.energy_exporting:
device_class: energy
sensor.energy_solar:
device_class: energy
sensor.energy_importing:
device_class: energy
After restarting Home Assistant, go back and reselect the sensors in Energy Dashboard - they should not have errors afterwards and it should match the screenshot above. Note that it will take around 2 hours before the Energy dashboard will display anything, so be patient. Please let me know if this fixes it?
Perfect! That did it for me. Thank you for all the hard work you put into this plugin and helping me get this sorted!
Thanks @timolow, I'm glad it's working ok for you now - I'll update the Readme file to include this
@timolow - thanks for the donation, it wasn't expected but very much appreciated - cheers
Howdy,
I installed this extension into HA, I can see the metrics being imported into HA via the entities tab, however these entities do not show up under the energy tab in HA.
config.yaml