Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lifetime_net_energy_consumption: state class total_increasing, but its state is not strictly increasing #167

Open
2112b opened this issue Oct 3, 2023 · 3 comments

Comments

@2112b
Copy link

2112b commented Oct 3, 2023

Hi, I just did the update from v0.0.18 to v0.0.19
HA and HACS are up to date
My metered Envoy Gateway is on v7.6.175

Now, after reboot, there is this entry in the logfile and its states that I should report it, so here it is... :-)

Thanks,
azu


Logger: homeassistant.components.sensor.recorder
Source: components/sensor/recorder.py:405
Integration: Sensor (documentation, issues)
First occurred: 15:51:26 (1 occurrences)
Last logged: 15:51:26
Entity sensor.enphase_envoy_lifetime_net_energy_consumption from integration enphase_envoy has state class total_increasing, but its state is not strictly increasing. Triggered by state 1934304 (1934308.0) with last_updated set to 2023-10-03T13:45:21.254365+00:00.
Please report it to the custom integration author.

@catsmanac
Copy link
Collaborator

Thanks for sharing @2112b, unless you observe more occurrences of this warning this is probably caused by getting this data from a different source in v0.0.19. Looks like there's a small difference in the values between old and new source.

@testuser7
Copy link
Contributor

I have these warnings in logs too:

2023-09-29 16:30:10.480 WARNING (Recorder) [homeassistant.components.sensor.recorder] Entity sensor.envoy_SERIAL_lifetime_energy_consumption_l3 from integration enphase_envoy has state class total_increasing, but its state is not strictly increasing. Triggered by state 882430 (882431.0) with last_updated set to 2023-09-29T14:29:43.827531+00:00. Please report it to the custom integration author.
2023-09-29 16:35:10.479 WARNING (Recorder) [homeassistant.components.sensor.recorder] Entity sensor.envoy_SERIAL_today_s_energy_consumption_l3 from integration enphase_envoy has state class total_increasing, but its state is not strictly increasing. Triggered by state 796 (797.0) with last_updated set to 2023-09-29T14:33:43.697819+00:00. Please report it to the custom integration author.
2023-10-02 09:15:10.420 WARNING (Recorder) [homeassistant.components.sensor.recorder] Entity sensor.envoy_SERIAL_lifetime_energy_consumption_l3 from integration enphase_envoy has state class total_increasing, but its state is not strictly increasing. Triggered by state 889853 (889854.0) with last_updated set to 2023-10-02T07:13:06.047158+00:00. Please report it to the custom integration author.
2023-10-03 08:40:10.322 WARNING (Recorder) [homeassistant.components.sensor.recorder] Entity sensor.envoy_SERIAL_lifetime_energy_consumption_l3 from integration enphase_envoy has state class total_increasing, but its state is not strictly increasing. Triggered by state 892150 (892151.0) with last_updated set to 2023-10-03T06:37:16.841352+00:00. Please report it to the custom integration author.

@catsmanac
Copy link
Collaborator

Almost looks like small rounding issues. According to HA dev pages these kind of entities are best set to total-increasing.

From the reading and looking in my HA statistics table I see that it builds the sum value from the change in values during the day for today_s_energy_production which is marked as TOTAL_INCREASING and does not substract from the running sum if value goes down. Looking at last 7 days which is a TOTAL entity, it will substract if new value is lower as previous value.

With that the question is what best strategy for the data is. I think when TOTAL-INCREASING it will ignore the negative step and then continue counting up in the statistics with the new increased values. When TOTAL it would reduce the running sum and then start adding changes again. Either can be ok, if we understand what the Envoy is actually meaning with the values being lower.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants