From 3796be6e6c61a82cccd365bbae1a2837a883ea7a Mon Sep 17 00:00:00 2001 From: jbouwh Date: Sat, 14 Feb 2026 13:41:25 +0000 Subject: [PATCH] Fix group check --- homeassistant/components/mqtt/entity.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/mqtt/entity.py b/homeassistant/components/mqtt/entity.py index 9a2199dc85f..5499be3696f 100644 --- a/homeassistant/components/mqtt/entity.py +++ b/homeassistant/components/mqtt/entity.py @@ -491,7 +491,7 @@ class MqttAttributesMixin(Entity): def attributes_prepare_discovery_update(self, config: DiscoveryInfoType) -> None: """Handle updated discovery message.""" - if self.group is not None and CONF_GROUP in config: + if hasattr(self, "group") and CONF_GROUP in config: self.group.included_unique_ids = config[CONF_GROUP] self._attributes_config = config self._attributes_prepare_subscribe_topics()