Finish cleanup of deprecated ring update service (#125810)
parent
70ebf2f5d8
commit
02e392e215
|
@ -99,21 +99,12 @@ async def async_setup_entry(hass: HomeAssistant, entry: RingConfigEntry) -> bool
|
|||
|
||||
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
|
||||
|
||||
if hass.services.has_service(DOMAIN, "update"):
|
||||
return True
|
||||
|
||||
return True
|
||||
|
||||
|
||||
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
"""Unload Ring entry."""
|
||||
unload_ok = await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
|
||||
|
||||
if len(hass.config_entries.async_loaded_entries(DOMAIN)) == 1:
|
||||
# This is the last loaded entry, clean up service
|
||||
hass.services.async_remove(DOMAIN, "update")
|
||||
|
||||
return unload_ok
|
||||
return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
|
||||
|
||||
|
||||
async def async_remove_config_entry_device(
|
||||
|
|
|
@ -37,10 +37,5 @@
|
|||
"default": "mdi:alarm-bell"
|
||||
}
|
||||
}
|
||||
},
|
||||
"services": {
|
||||
"update": {
|
||||
"service": "mdi:refresh"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue