Improve generic event typing [rfxtrx] (#114733)

This commit is contained in:
Marc Mueller 2024-04-04 12:08:37 +02:00 committed by GitHub
parent 342e47dcc8
commit efde8400e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -25,7 +25,10 @@ from homeassistant.const import (
from homeassistant.core import Event, HomeAssistant, ServiceCall, callback
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.helpers import config_validation as cv, device_registry as dr
from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.device_registry import (
DeviceInfo,
EventDeviceRegistryUpdatedData,
)
from homeassistant.helpers.dispatcher import (
async_dispatcher_connect,
async_dispatcher_send,
@ -259,7 +262,7 @@ async def async_setup_internal(hass: HomeAssistant, entry: ConfigEntry) -> None:
devices.pop(device_id)
@callback
def _updated_device(event: Event) -> None:
def _updated_device(event: Event[EventDeviceRegistryUpdatedData]) -> None:
if event.data["action"] != "remove":
return
device_entry = device_registry.deleted_devices[event.data["device_id"]]