Finish cleanup of deprecated ring update service (#125810)

pull/125821/head
Steven B. 2024-09-12 11:50:46 +01:00 committed by GitHub
parent 70ebf2f5d8
commit 02e392e215
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 15 deletions

View File

@ -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(

View File

@ -37,10 +37,5 @@
"default": "mdi:alarm-bell"
}
}
},
"services": {
"update": {
"service": "mdi:refresh"
}
}
}