From ed9c4e0c0dcb806aefb9426ada40cbdc5cea77e7 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Wed, 31 Jul 2024 12:41:10 +0200 Subject: [PATCH] Fix implicit-return in landisgyr_heat_meter (#122912) --- homeassistant/components/landisgyr_heat_meter/__init__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/landisgyr_heat_meter/__init__.py b/homeassistant/components/landisgyr_heat_meter/__init__.py index 4e52e246d81..a2fc1320c2b 100644 --- a/homeassistant/components/landisgyr_heat_meter/__init__.py +++ b/homeassistant/components/landisgyr_heat_meter/__init__.py @@ -3,13 +3,14 @@ from __future__ import annotations import logging +from typing import Any import ultraheat_api from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_DEVICE, Platform from homeassistant.core import HomeAssistant, callback -from homeassistant.helpers.entity_registry import async_migrate_entries +from homeassistant.helpers.entity_registry import RegistryEntry, async_migrate_entries from .const import DOMAIN from .coordinator import UltraheatCoordinator @@ -55,7 +56,9 @@ async def async_migrate_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> device_number = config_entry.data["device_number"] @callback - def update_entity_unique_id(entity_entry): + def update_entity_unique_id( + entity_entry: RegistryEntry, + ) -> dict[str, Any] | None: """Update unique ID of entity entry.""" if entity_entry.platform in entity_entry.unique_id: return { @@ -64,6 +67,7 @@ async def async_migrate_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> f"{device_number}", ) } + return None await async_migrate_entries( hass, config_entry.entry_id, update_entity_unique_id