core icon indicating copy to clipboard operation
core copied to clipboard

Updating state for sensor.pv_power_a (<class 'homeassistant.components.sma.sensor.SMAsensor'>) took 0.426 seconds.

Open tomlut opened this issue 1 year ago • 5 comments
trafficstars

The problem

Was asked to report this logged warning:

Logger: homeassistant.helpers.entity Source: helpers/entity.py:1108 First occurred: 17:36:22 (1 occurrences) Last logged: 17:36:22

Updating state for sensor.pv_power_a (<class 'homeassistant.components.sma.sensor.SMAsensor'>) took 0.426 seconds. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+sma%22

What version of Home Assistant Core has the issue?

core-2024.1.3

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

SMA Solar

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

Could be related to this:

Logger: homeassistant.components.sma Source: helpers/update_coordinator.py:332 Integration: SMA Solar (documentation, issues) First occurred: 15 January 2024 at 11:26:01 (4 occurrences) Last logged: 11:03:28

Error fetching sma data: Could not connect to SMA at https://10.1.1.230: [Errno None] Can not write request body for https://10.1.1.230/dyn/getValues.json?sid=w40fsWVPd3APaWlD

Which I used to see once a week when the inverter automatically rebooted. However I have been seeing it more often (every few days) for the past month or so.

tomlut avatar Jan 16 '24 07:01 tomlut

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

Code owner commands

Code owners of sma 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 sma 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)


sma documentation sma source (message by IssueLinks)

home-assistant[bot] avatar Jan 16 '24 07:01 home-assistant[bot]

saw similar issue today in the logs

Logger: homeassistant.helpers.entity Source: helpers/entity.py:1108 First occurred: 12:46:18 (1 occurrences) Last logged: 12:46:18 Updating state for sensor.sn_xxxxxxxxxxxxx_metering_active_power_feed_l3 (<class 'homeassistant.components.sma.sensor.SMAsensor'>) took 0.499 seconds. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+sma%22

Nokius avatar Jan 28 '24 11:01 Nokius

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Its likely you have an integration blocking the event loop

  1. Install profiler integration https://my.home-assistant.io/redirect/config_flow_start/?domain=profiler
  2. Enable asyncio debug service as soon as possible after startup https://www.home-assistant.io/integrations/profiler/#service-profilerset_asyncio_debug
  3. Watch logs for RuntimeError: Non-thread-safe operation and long asyncio delays
  4. Download and post logs with full trace

For 2024.5.x and later Home Assistant debug mode can also be enabled in configuration.yaml

homeassistant:
  debug: true

bdraco avatar Apr 27 '24 12:04 bdraco

Nothing in home-assistant.log.fault on 2024.5.0b1.

I'm not seeing the original error at the moment.

Will keep monitoring and close the issue if it does not show up by the time 2024.5.0 is released.

tomlut avatar Apr 27 '24 22:04 tomlut

Have not seen the issue again since that report.

tomlut avatar May 01 '24 22:05 tomlut