home-assistant-libs / pychromecast

Library for Python 3 to communicate with the Google Chromecast.
MIT License
2.52k stars 378 forks source link

Increase homeassistant lovelace connect timeout and make it configurable #770

Closed cicchr closed 8 months ago

cicchr commented 9 months ago

I was having an issue where homeassistant dashboards would not always load correctly when casting. I also discovered I wasn't the only one experiencing this: https://github.com/home-assistant/core/issues/82823. I tracked down the source of the warning message and did some testing and confirmed the exceptions were always thrown after 10 seconds exactly. Increasing the timeout allows the dashboard to show correctly and the error messages are gone.

10 seconds seems somewhat arbitrary here and some cast devices can be slow to load. Also since a bunch of people are having this issue I think it makes sense to increase the default timeout.

Another option would be to make this configurable in the cast integration to allow users experiencing this issue to set a larger timeout.

smarthomefamilyverrips commented 9 months ago

@emontnemery can you look at this please.

andrelung commented 2 months ago

Just to clarify: you extended the timeout, but it is still not configurable from home assistant, right?