Fix WiZ bulb being offline if kelvin limits cannot be obtained (#66305)

This commit is contained in:
J. Nick Koston 2022-02-11 09:33:39 -06:00 committed by GitHub
parent 212c3b7c10
commit 768de8d515
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 16 deletions

View File

@ -48,19 +48,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
try:
scenes = await bulb.getSupportedScenes()
await bulb.getMac()
# ValueError gets thrown if the bulb type
# cannot be determined on the first try.
# This is likely because way the library
# processes responses and can be cleaned up
# in the future.
except WizLightNotKnownBulb:
# This is only thrown on IndexError when the
# bulb responds with invalid data? It may
# not actually be possible anymore
_LOGGER.warning("The WiZ bulb type could not be determined for %s", ip_address)
return False
except (ValueError, *WIZ_EXCEPTIONS) as err:
raise ConfigEntryNotReady from err
except (WizLightNotKnownBulb, *WIZ_EXCEPTIONS) as err:
raise ConfigEntryNotReady(f"{ip_address}: {err}") from err
async def _async_update() -> None:
"""Update the WiZ device."""

View File

@ -8,7 +8,7 @@
],
"dependencies": ["network"],
"documentation": "https://www.home-assistant.io/integrations/wiz",
"requirements": ["pywizlight==0.5.5"],
"requirements": ["pywizlight==0.5.6"],
"iot_class": "local_push",
"codeowners": ["@sbidy"]
}

View File

@ -2057,7 +2057,7 @@ pywemo==0.7.0
pywilight==0.0.70
# homeassistant.components.wiz
pywizlight==0.5.5
pywizlight==0.5.6
# homeassistant.components.xeoma
pyxeoma==1.4.1

View File

@ -1282,7 +1282,7 @@ pywemo==0.7.0
pywilight==0.0.70
# homeassistant.components.wiz
pywizlight==0.5.5
pywizlight==0.5.6
# homeassistant.components.zerproc
pyzerproc==0.4.8