rcasula / kostalpiko-homeassistant

19 stars 15 forks source link

Last_reset not supported anymore? #18

Closed cevierix closed 1 year ago

cevierix commented 1 year ago

Dear rcasula! Seems the latest homeassistant (2022.8.7) there seems to be an issue with "last_reset":

Source: components/sensor/__init__.py:334
Integration: Sensor ([documentation](https://www.home-assistant.io/integrations/sensor), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+sensor%22))
First occurred: 17:03:37 (1 occurrences)
Last logged: 17:03:37

Entity sensor.kostal_piko_daily_energy (<class 'custom_components.kostal.sensor.PikoSensor'>) with state_class measurement has set last_reset. Setting last_reset for entities with state_class other than 'total' is not supported. Please update your configuration if state_class is manually configured, otherwise report it to the custom integration author.

Best, cevierx

jklerkx commented 1 year ago

I think have a related issue. I added daily_energy tomy Energy dashboard, but the energy flowing from my Kostal is not displayed. The sensors give correct readings.

I have an error in the settings of my Energy Dashboard:

Laatste reset ontbreekt
De volgende entiteiten hebben de statusklasse 'measurement', maar 'last_reset' ontbreekt:
sensor.kostal_piko_daily_energy
jklerkx commented 1 year ago

I seem to have resolved my issue by adding "kostal_piko Total energy" to my dashboard instead of Daily Energy.

pergolafabio commented 1 year ago

Guys, how do you use this into the energy management? Before I had an energy monitor to real real time power/consumption, but it broke.. Gonna now use the energy management in HA..

But to get realtime data, we need to use the daily or total sensors... The other sensors are useless imo because they are based on scan interval....

How do you inport to energy management? Do you use total or daily? I have the intention that daily only resets the next day and not at evening or at 00.00?

What about consumption, what do you use for that? I was thinking to buy a Shelly 3 EM

Thnx

pergolafabio commented 1 year ago

I seem to have resolved my issue by adding "kostal_piko Total energy" to my dashboard instead of Daily Energy.

If you add total energy, at what frequention is it added to HA?

pergolafabio commented 1 year ago

Hey @rcasula , is it possible to fix the daily sensor with last data, so it can be used in the energy management? I prefer the daily one, because it's also in decimals, gives better values then the total energy sensor