New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use subscription callbacks to discover Sonos speakers #85411
Use subscription callbacks to discover Sonos speakers #85411
Conversation
Hey there @cgtobi, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
If I unplug/turn off the relay for a speaker and restart
That may be expected though |
Not exactly expected, but not caused by this PR. I forget why now, but I included |
Retesting this now after I've had the relay off all night.... |
The bootseq issue didn't reappear in testing this morning 👍 This looks good to go and the other trace issue is existing which you mentioned taking care of in a followup so LGTM |
Proposed change
Polling Sonos devices for the ZoneGroupState (which describes the device topology of the whole system) can fail with large installations of many speakers. It appears that this is a firmware limitation on the Sonos devices. This prevents the integration from starting once there are 20+ devices.
Subscription callbacks can be used instead to obtain the same information without errors. This changes the behavior of discovery to avoid polling and rely on subscriptions whenever possible.
Type of change
Additional information
Checklist
black --fast homeassistant tests
)To help with the load of incoming pull requests: