hassio-addons
hassio-addons copied to clipboard
Delayed Home Assistant Startup
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
Yeah. I've noticed some slowness in startup as well. I'll look into it eventually, but don't really have the time now.
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)
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.
Thanks @balloob. I will look into it.
fixed in 1.1.0