muppet3000 / homeassistant-grott

Home Assistant Integration for Grott - MQTT
MIT License
76 stars 17 forks source link

BUG: SPH4600 Entity sensor.npcs123_load_consumption_energy_ac_today_calculated has state class total_increasing & same for ac_today_calculated #97

Open typxxi opened 3 months ago

typxxi commented 3 months ago

SPH4600 Here is an error I found in the log where it claims that 2 sensors have the wrong state class (total_increasing) where I guess total should be right.

image

Entity sensor.npcs123_load_consumption_energy_ac_today_calculated has state class total_increasing, but its state is negative. Triggered by state -2.8 with last_updated set to 2024-09-03T18:54:59.999999+00:00.

Entity sensor.npcs123_load_consumption_energy_pv_today_calculated from integration grott has state class total_increasing, but its state is negative. Triggered by state -0.1 with last_updated set to 2024-09-04T07:29:49.743083+00:00.

muppet3000 commented 2 months ago

I'm a bit confused by how those values are showing as negative. For example the AC one is the sum of the energy consumed from the grid and the amount charged into the battery, both of which cannot have negative values (at least on my system). The exact calculation is: "Import from Grid Energy - Today" - "Battery AC Charge Energy - Today"

All energy consumed from the grid should be greater than (or equal to) the AC charge energy put into the battery.

I'd be interested to see the value of those other 2 sensors at the same time.

BobC76 commented 2 months ago

Duplicate of #94 ?

typxxi commented 2 months ago

Here ist the graph of the first sensor.

image

and the second one is way off for whatever reason - 429 million kWh load per day? image

BUT: if I check the graph values over the day I can see the value is decreasing for example 3rd of september in the evening is lower /429.496.690,7) than image

in the morning 429.496.726,8 image

Hope that it helps a bit but so far the "error message" might be right.

typxxi commented 2 months ago

Duplicate of #94 ?

Duplicate of #94 ?

not really convinced cause you had shown a different graph while my first sensor is alternating from negative to positive and what not, which fits to the description in the log