Skip to content

Commit ff25809

Browse files
authored
Do not unregister google_mail services (home-assistant#158431)
1 parent 245f47c commit ff25809

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

homeassistant/components/google_mail/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,4 @@ async def async_setup_entry(hass: HomeAssistant, entry: GoogleMailConfigEntry) -
5959

6060
async def async_unload_entry(hass: HomeAssistant, entry: GoogleMailConfigEntry) -> bool:
6161
"""Unload a config entry."""
62-
if not hass.config_entries.async_loaded_entries(DOMAIN):
63-
for service_name in hass.services.async_services_for_domain(DOMAIN):
64-
hass.services.async_remove(DOMAIN, service_name)
65-
6662
return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)

tests/components/google_mail/test_init.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ async def test_setup_success(
3030
await hass.config_entries.async_unload(entries[0].entry_id)
3131
await hass.async_block_till_done()
3232

33-
assert not hass.services.async_services().get(DOMAIN)
34-
3533

3634
@pytest.mark.parametrize("expires_at", [time.time() - 3600], ids=["expired"])
3735
async def test_expired_token_refresh_success(

0 commit comments

Comments
 (0)