spook icon indicating copy to clipboard operation
spook copied to clipboard

Updating state took 1.101 seconds

Open eikowagenknecht opened this issue 1 year ago • 5 comments

What version of Spook are you using?

2.2.2

What version of Home Assistant are you using?

2024.2.2

The problem

Getting errors in the logs.

Anything in the logs? Paste it here!

Logger: homeassistant.helpers.entity
Source: helpers/entity.py:1152
First occurred: February 23, 2024 at 04:54:44 (1 occurrences)
Last logged: February 23, 2024 at 04:54:44

Updating state for sensor.media_players (<class 'custom_components.spook.ectoplasms.homeassistant.sensor.HomeAssistantSpookSensorEntity'>) took 1.101 seconds. Please create a bug report at https://github.com/frenck/spook/issues

eikowagenknecht avatar Feb 25 '24 11:02 eikowagenknecht

A similar warning

Updating state for sensor.climate (<class 'custom_components.spook.ectoplasms.homeassistant.sensor.HomeAssistantSpookSensorEntity'>) took 0.768 seconds. Please create a bug report at https://github.com/frenck/spook/issues

DaN66O avatar Feb 26 '24 07:02 DaN66O

I was recently looking at a profile for a user and found the problem might be that when all the repairs fire and they all do a linear search of the entity registry to get the entity ids multiple times.

If the call to async_get_all_entity_ids only happened once instead of for every repair it would mostly solve the issue

Screenshot 2024-03-04 at 11 01 54 AM Screenshot 2024-03-04 at 11 09 04 AM

bdraco avatar Mar 04 '24 21:03 bdraco

Or maybe increase the debounce time as it was firing almost every 3s on the users system

bdraco avatar Mar 04 '24 21:03 bdraco

got a similar warning:

Logger: homeassistant.helpers.entity
Source: helpers/entity.py:1161
First occurred: 9:47:19 AM (1 occurrences)
Last logged: 9:47:19 AM

Updating state for sensor.weather (<class 'custom_components.spook.ectoplasms.homeassistant.sensor.HomeAssistantSpookSensorEntity'>) took 0.617 seconds. Please create a bug report at https://github.com/frenck/spook/issues

robinhood-code avatar Apr 18 '24 05:04 robinhood-code

@robinhood-code That was already reported above. You could consider just adding a 👍 to the start topic, instead repeating the same message 😉

frenck avatar Apr 18 '24 08:04 frenck