mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Add push updates support to WiZ (#65987)
This commit is contained in:
parent
3c5a667d97
commit
9c82dcdee7
@ -81,6 +81,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
hass, _LOGGER, cooldown=REQUEST_REFRESH_DELAY, immediate=False
|
||||
),
|
||||
)
|
||||
|
||||
await bulb.start_push(lambda _: coordinator.async_set_updated_data(None))
|
||||
await coordinator.async_config_entry_first_refresh()
|
||||
|
||||
hass.data.setdefault(DOMAIN, {})[entry.entry_id] = WizData(
|
||||
@ -93,5 +95,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
"""Unload a config entry."""
|
||||
if unload_ok := await hass.config_entries.async_unload_platforms(entry, PLATFORMS):
|
||||
hass.data[DOMAIN].pop(entry.entry_id)
|
||||
data: WizData = hass.data[DOMAIN].pop(entry.entry_id)
|
||||
await data.bulb.async_close()
|
||||
return unload_ok
|
||||
|
@ -8,7 +8,7 @@
|
||||
],
|
||||
"dependencies": ["network"],
|
||||
"documentation": "https://www.home-assistant.io/integrations/wiz",
|
||||
"requirements": ["pywizlight==0.5"],
|
||||
"iot_class": "local_polling",
|
||||
"requirements": ["pywizlight==0.5.1"],
|
||||
"iot_class": "local_push",
|
||||
"codeowners": ["@sbidy"]
|
||||
}
|
||||
|
@ -2051,7 +2051,7 @@ pywemo==0.7.0
|
||||
pywilight==0.0.70
|
||||
|
||||
# homeassistant.components.wiz
|
||||
pywizlight==0.5
|
||||
pywizlight==0.5.1
|
||||
|
||||
# homeassistant.components.xeoma
|
||||
pyxeoma==1.4.1
|
||||
|
@ -1276,7 +1276,7 @@ pywemo==0.7.0
|
||||
pywilight==0.0.70
|
||||
|
||||
# homeassistant.components.wiz
|
||||
pywizlight==0.5
|
||||
pywizlight==0.5.1
|
||||
|
||||
# homeassistant.components.zerproc
|
||||
pyzerproc==0.4.8
|
||||
|
Loading…
x
Reference in New Issue
Block a user