hunterjm / hassio-addons

Control your Xbox One from your Home Assistant device.
MIT License
55 stars 50 forks source link

Delayed Home Assistant Startup #12

Open dshokouhi opened 5 years ago

dshokouhi commented 5 years ago

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
hunterjm commented 5 years ago

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

unknownskl commented 5 years ago

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

balloob commented 5 years ago

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.

hunterjm commented 5 years ago

Thanks @balloob. I will look into it.

tuxuser commented 5 years ago

fixed in 1.1.0