jwillemsen / daikin_onecta

Home Assistant Integration for devices supported by the Daikin Onecta App
https://github.com/jwillemsen/daikin_onecta
GNU General Public License v3.0
295 stars 9 forks source link

[Issue]: Problem with the energy page and the data sent by daikin_onecta #307

Closed aurel-f closed 1 month ago

aurel-f commented 1 month ago

I use your connector, everything is going well, the data is synchronized between HA and Onecta.

In red the 2 pieces of information that I would like to use in the HA energy page. So I configured my energy page with these 2 values ​​as a consumption source :

CleanShot 2024-10-01 at 22 29 19@2x

I have a result that is surprising. I have negative, and the hours do not match ... However the consumption meters increment as they should during the day.

But the energy page does not seem to know how to read them correctly.

CleanShot 2024-10-01 at 22 34 16@2x

jwillemsen commented 1 month ago

You can better use the yearly value, those increment through the year, maybe HA gets confused because the daily usage resets to zero each nights

aurel-f commented 1 month ago

Yes I thought about it too, but the result is the same. HA does not interpret the values ​​correctly. I have the same behavior, negative value + consumption time that do not match ...

jwillemsen commented 1 month ago

I have no idea, the data provided by Daikin is provided to HA. Maybe something to ask in a HA forum about the energy page?

aurel-f commented 1 month ago

Yes that's what I think too, it's HA that is clearly mismanaging the interpretation of the data.

I posted on a HA forum, but for the moment no response. That's why I was trying my luck here :)

BigFoot2020 commented 1 month ago

Since I do not have consumption data via Onecta for may device, I cannot really verify this, but:

Is there correct "last_reset" attribute on these sensors?

Please check here: https://developers.home-assistant.io/docs/core/entity/sensor/#entities-representing-a-total-amount

aurel-f commented 1 month ago

I'm not sure I understand what you're explaining.

And if I "format" the Onecta data in a sensor template before adding them as data sources in the energy page, could that solve my problem? But how can I do it?

Sorry, I'm new to HA..

jwillemsen commented 1 month ago

The energy sensors use state class total_increasing

BigFoot2020 commented 1 month ago

Sorry, my bad. I think logic has been changed since the last time I read that (which was definitley more than year ago). Based on current logic "total_increasing" without "last_reset" should work correctly.

@aurel-f Could you also add a screenshot of history of the same sensor from same timeframe? To compare actual value of sensor with Energy Dashboard.

aurel-f commented 1 month ago

Here is the view of the sensor "sensor.plancher_chauffant_climatecontrol_heating_daily_electrical_consumption", history of the day (there is also yesterday we can clearly see the reset to 0 at 00h). This sensor corresponds to the consumption of my heating system (underfloor heating)

CleanShot 2024-10-04 at 14 25 31@2x

Then the view of my energy page without this sensor. Everything is consistent, the general consumption at the top and below the distribution by equipment that I track

CleanShot 2024-10-04 at 14 26 48@2x

Then I add the sensor "sensor.plancher_chauffant_climatecontrol_heating_daily_electrical_consumption" (in pink) as an individual device. And everything goes haywire on the page. There's nothing coherent anymore.

CleanShot 2024-10-04 at 14 27 37@2x

Thank you for your help

BigFoot2020 commented 1 month ago

In my understanding HA is showing what it should based on sensors ... Should "Shelly General" show energy consumption for whole house? Including energy consumed by heat-pump? Because based on these screenshots is does not.

Simple example: during hour 10-11, Shelly consumption (total for house) is 0,5 kWh, at 11 PC changes from 2 to 4, so consumption would be 2kWh. Result is 1,5kWh of untracked negative consuption (0,5 - 2). So coherent, not haywire.

BigFoot2020 commented 1 month ago

Maybe we should continue in HA forum as it is most likely not related to Onecta integration? Could you share a link?

aurel-f commented 1 month ago

Yep :

https://forum.hacf.fr/t/probleme-daikin-onecta-pompe-a-chaleur-et-page-energie/48646/2

BigFoot2020 commented 1 month ago

Sorry, made wrong assumption about "forum". Unfortunately, I don't speak French and do not have account on that site, so cannot answer there. Either we continue here (if you still need help) or you post on "official" HA Community forum (https://community.home-assistant.io/).

aurel-f commented 1 month ago

@BigFoot2020

I just opened a topic on the official forum :

https://community.home-assistant.io/t/negative-and-inconsistent-value-on-my-energy-page-for-my-heat-pump-and-hot-water-tank/780127