diff --git a/homeassistant/components/group/__init__.py b/homeassistant/components/group/__init__.py index 1678b4816219..ff9c10d28c43 100644 --- a/homeassistant/components/group/__init__.py +++ b/homeassistant/components/group/__init__.py @@ -14,10 +14,15 @@ from homeassistant.const import ( SERVICE_RELOAD, # noqa: F401 ) from homeassistant.core import HomeAssistant -from homeassistant.helpers import config_validation as cv, entity_registry as er +from homeassistant.helpers import config_validation as cv +from homeassistant.helpers import entity_registry as er from homeassistant.helpers.group import ( expand_entity_ids as _expand_entity_ids, +) +from homeassistant.helpers.group import ( get_entity_ids as _get_entity_ids, +) +from homeassistant.helpers.group import ( get_group_entities, ) from homeassistant.helpers.typing import ConfigType @@ -40,6 +45,7 @@ from .const import ( # noqa: F401 ATTR_ORDER, ATTR_REMOVE_ENTITIES, CONF_ALL, + CONF_GROUP_TYPE, CONF_HIDE_MEMBERS, CONF_IGNORE_NON_NUMERIC, DATA_COMPONENT, diff --git a/homeassistant/components/min_max/__init__.py b/homeassistant/components/min_max/__init__.py index 263e53283c37..b2dce0f596f6 100644 --- a/homeassistant/components/min_max/__init__.py +++ b/homeassistant/components/min_max/__init__.py @@ -5,6 +5,7 @@ from types import MappingProxyType from homeassistant.components.group import ( CONF_ENTITIES, + CONF_GROUP_TYPE, CONF_HIDE_MEMBERS, CONF_IGNORE_NON_NUMERIC, DOMAIN as GROUP_DOMAIN, @@ -30,6 +31,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: config.pop(CONF_ROUND_DIGITS) config[CONF_HIDE_MEMBERS] = False config[CONF_IGNORE_NON_NUMERIC] = False + config[CONF_GROUP_TYPE] = SENSOR_DOMAIN # Create new config entry for group component and remove old entry new_config_entry = ConfigEntry( @@ -52,8 +54,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: if old_entity := entity_reg.async_get_entity_id( SENSOR_DOMAIN, DOMAIN, entry.entry_id ): - entity_reg.async_update_entity( - old_entity, config_entry_id=new_config_entry.entry_id + entity_reg.async_update_entity_platform( + old_entity, GROUP_DOMAIN, new_config_entry_id=new_config_entry.entry_id ) return True