Disable polling Sonos switches by default (#58705)

This commit is contained in:
jjlawren 2021-10-29 14:43:59 -05:00 committed by GitHub
parent a4a5a2e782
commit 6e7fe13d51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 39 additions and 0 deletions

View file

@ -136,6 +136,7 @@ class SonosSwitchEntity(SonosEntity, SwitchEntity):
self._attr_icon = FEATURE_ICONS.get(feature_type)
if feature_type in POLL_REQUIRED:
self._attr_entity_registry_enabled_default = False
self._attr_should_poll = True
async def _async_poll(self) -> None: