home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.89k stars 30.96k forks source link

Integral max_sub_interval not working #130601

Open v8schlumpf opened 1 week ago

v8schlumpf commented 1 week ago

The problem

The Value is not updated for several hours, even if I use max_sub_interval.

What version of Home Assistant Core has the issue?

core-2024.11.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

integration

Link to integration documentation on our website

https://www.home-assistant.io/integrations/integration/

Diagnostics information

No response

Example YAML snippet

- name: ess calculated SOC helper Ah
  platform: integration
  unique_id: "ess_calculated_soc_helper_ah"
  source: sensor.ess_inverter_battery_current
  round: 3
  method: trapezoidal
  max_sub_interval:
    minutes: 1

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 week ago

Hey there @dgomes, mind taking a look at this issue as it has been labeled with an integration (integration) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `integration` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign integration` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


integration documentation integration source (message by IssueLinks)

dgomes commented 1 week ago

Hello, we will need some debug logging to trace any issue.

v8schlumpf commented 1 week ago

There is nothing to find in the logs (if i´m not doing it wrong)

dgomes commented 1 week ago

You need to activate Debug either in the configuration.yaml or through the UI:

Screenshot 2024-11-14 at 13 54 55
v8schlumpf commented 1 week ago

now i´ve got some logs home-assistant.log

dgomes commented 1 week ago

2024-11-14 16:46:05.245 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.ess_soc_ah_helper (<class 'homeassistant.components.utility_meter.sensor.UtilityMeterSensor'>) is using state class 'total_increasing' which is impossible considering device class ('current') it is using; expected None or one of 'measurement'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+utility_meter%22

It makes no sense to use utility_meter with a sensor such as current (therefore the error)

Looking at all your logs, I believe you need to fix rct_power firsts, before considering utility_meter to be the problem ;)

v8schlumpf commented 1 week ago

I had set up a new integration helper at 21:00 so only the lags after this are relevant. at 22:08:31 is a big jump in the value and this hapens all the time, when there is no new Data from the source. max_sub_interval should prevend this, am I right? this doesn´t work.

well.. there seems to be an issue with the RCT integration too, yes ;-)

dgomes commented 1 week ago

I see nothing wrong... I see integration sensor updating (although a very small amount)

All indicates to be about scale and a bad source.

v8schlumpf commented 1 week ago

So it is normal, that the Integral sensor is not being updated for a long time even if the max_sub_interval is set?

dgomes commented 1 week ago

It is being updated, I can see the updates in the log, but the amount it update is so small (0.002) that for a state value of 32 it seams as if it did not change