hassio-addons icon indicating copy to clipboard operation
hassio-addons copied to clipboard

Delayed Home Assistant Startup

Open dshokouhi opened this issue 6 years ago • 5 comments

I went to restart HA today after updating to 0.77.2 and got this error in the log. I noticed that HA was delayed startup until this error showed up.

2018-08-31 09:37:43 WARNING (MainThread) [homeassistant.helpers.entity] Updating state for media_player.xbox_den (<class 'custom_components.media_player.xboxone.XboxOneDevice'>) took 0.511 seconds. Please report platform to the developers at https://goo.gl/Nvioub

dshokouhi avatar Aug 31 '18 16:08 dshokouhi

Yeah. I've noticed some slowness in startup as well. I'll look into it eventually, but don't really have the time now.

hunterjm avatar Sep 01 '18 15:09 hunterjm

I've never seen this warning on a raspberry pi but I might have an idea what happens:

  • In Home Assistant it triggers the setup_platform function
  • In the component it will check the versions by calling the /versions endpoint. (Which adds the delay)

unknownskl avatar Sep 14 '18 07:09 unknownskl

This warning is happening when properties are fetched from the entity. Properties should never do I/O. Data should be fetched inside the update method.

balloob avatar Oct 02 '18 11:10 balloob

Thanks @balloob. I will look into it.

hunterjm avatar Oct 02 '18 11:10 hunterjm

fixed in 1.1.0

tuxuser avatar Oct 05 '18 13:10 tuxuser