Fix modem callerid callback (#58275)

* fix async_on_hass_stop

* fix
This commit is contained in:
Robert Hillis 2021-10-23 09:15:43 -04:00 committed by GitHub
parent a4641a91ff
commit cbf236b2f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,7 +12,7 @@ from homeassistant.const import (
EVENT_HOMEASSISTANT_STOP, EVENT_HOMEASSISTANT_STOP,
STATE_IDLE, STATE_IDLE,
) )
from homeassistant.core import HomeAssistant, callback from homeassistant.core import Event, HomeAssistant, callback
from homeassistant.helpers import config_validation as cv, entity_platform from homeassistant.helpers import config_validation as cv, entity_platform
from homeassistant.helpers.typing import DiscoveryInfoType from homeassistant.helpers.typing import DiscoveryInfoType
@ -63,7 +63,7 @@ async def async_setup_entry(
] ]
) )
async def _async_on_hass_stop() -> None: async def _async_on_hass_stop(event: Event) -> None:
"""HA is shutting down, close modem port.""" """HA is shutting down, close modem port."""
if hass.data[DOMAIN][entry.entry_id][DATA_KEY_API]: if hass.data[DOMAIN][entry.entry_id][DATA_KEY_API]:
await hass.data[DOMAIN][entry.entry_id][DATA_KEY_API].close() await hass.data[DOMAIN][entry.entry_id][DATA_KEY_API].close()