skelgaard / homeassistant-apsystems

An APsystems Sensor for Home Assistant
Apache License 2.0
25 stars 9 forks source link

Energy Dashboard statistics? #20

Closed RacerBas closed 1 year ago

RacerBas commented 1 year ago

I'm trying to add the solar panels to the energy dasboard but it doesn't seem to be supported?

https://developers.home-assistant.io/docs/core/entity/sensor#long-term-statistics

Is this possible perhaps?

skelgaard commented 1 year ago

mine is in my dashboard... what are you missing ?

RacerBas commented 1 year ago

on the built-in energy dashboard you cannot add it into the solar production category. It's just not listed image

If you click add solar production it's not listed

skelgaard commented 1 year ago

ah i can se i have this in my configuration... i will look into if i can get that set by default in the sensors homeassistant:

customize_glob:

sensor.apsystems_energy_day:

  device_class: energy

  state_class: total_increasing
Bittabola commented 1 year ago

Hi, has this been resolved? I don’t see the APsystems sensors in the dropdown when I click Add Solar Production. Thanks!

icecreamfarmer commented 1 year ago

Hi, has this been resolved? I don’t see the APsystems sensors in the dropdown when I click Add Solar Production. Thanks!

For me the same. Have been trying different yaml configs but I'll keep getting errors that the device class is not valid.

icecreamfarmer commented 1 year ago

Hi, has this been resolved? I don’t see the APsystems sensors in the dropdown when I click Add Solar Production. Thanks!

I Think you need to add that line or device class somewhere in here: /config/custom_components/apsystems/sensor.py

Bu i can't get it to work.

skelgaard commented 1 year ago

have you tried the code in configuration.yaml ? i have not found out how to add this into the code, so that code in configuration is not needed.

icecreamfarmer commented 1 year ago

have you tried the code in configuration.yaml ? i have not found out how to add this into the code, so that code in configuration is not needed.

Yes and keep getting errors like: Invalid domain sensor.apsystems_energy_day

BTW I am now making a scraping integration from the local webserver.

icecreamfarmer commented 1 year ago

have you tried the code in configuration.yaml ? i have not found out how to add this into the code, so that code in configuration is not needed.

Let's put it this way. What exactly did you put into the config.yaml and where?

Bittabola commented 1 year ago

I added the following code to configutation.yaml in the config folder:

`sensor:

skelgaard commented 1 year ago

Seems i have fixed this in the next version that i will proberly release tomorrow... just doing final testings of it