diff --git a/homeassistant/helpers/device_registry.py b/homeassistant/helpers/device_registry.py index dbc2bb553ed6..7ee500b56719 100644 --- a/homeassistant/helpers/device_registry.py +++ b/homeassistant/helpers/device_registry.py @@ -4932,8 +4932,8 @@ def async_get_device_and_config_entry_for_domain( device_id: str, *, domain: str, - include_child_devices: Literal[True] = True, - include_main_devices: Literal[True] = True, + include_child_devices: bool = True, + include_main_devices: bool = True, ) -> tuple[AnyDeviceEntry | None, ConfigEntry | None]: ... diff --git a/homeassistant/helpers/service.py b/homeassistant/helpers/service.py index 65ce7bc92cac..f1c6b18d6ad1 100644 --- a/homeassistant/helpers/service.py +++ b/homeassistant/helpers/service.py @@ -1487,8 +1487,8 @@ def async_get_device_and_config_entry( domain: str, device_id: str, *, - include_child_devices: Literal[True] = True, - include_main_devices: Literal[True] = True, + include_child_devices: bool = True, + include_main_devices: bool = True, ) -> tuple[device_registry.AnyDeviceEntry, ConfigEntry]: ... @@ -1511,10 +1511,7 @@ def async_get_device_and_config_entry( as does a composite-device id, because both the splits of a composite and the restored composite itself are main devices. """ - device: device_registry.AnyDeviceEntry | None - config_entry: ConfigEntry | None - # The flags are plain bools here, which matches none of the Literal overloads - device, config_entry = device_registry.async_get_device_and_config_entry_for_domain( # type: ignore[call-overload] + device, config_entry = device_registry.async_get_device_and_config_entry_for_domain( hass, device_id, domain=domain,