From 5d096a657f35676e28457ba89363d09bbec316ff Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Tue, 18 Jul 2023 09:59:32 +0200 Subject: [PATCH] Migrate Brunt to has entity name (#96565) --- homeassistant/components/brunt/cover.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/brunt/cover.py b/homeassistant/components/brunt/cover.py index 3fb328ab7fb..9f916e5751f 100644 --- a/homeassistant/components/brunt/cover.py +++ b/homeassistant/components/brunt/cover.py @@ -60,6 +60,10 @@ class BruntDevice( Contains the common logic for all Brunt devices. """ + _attr_has_entity_name = True + _attr_name = None + _attr_device_class = CoverDeviceClass.BLIND + _attr_attribution = ATTRIBUTION _attr_supported_features = ( CoverEntityFeature.OPEN | CoverEntityFeature.CLOSE @@ -83,12 +87,9 @@ class BruntDevice( self._remove_update_listener = None - self._attr_name = self._thing.name - self._attr_device_class = CoverDeviceClass.BLIND - self._attr_attribution = ATTRIBUTION self._attr_device_info = DeviceInfo( identifiers={(DOMAIN, self._attr_unique_id)}, # type: ignore[arg-type] - name=self._attr_name, + name=self._thing.name, via_device=(DOMAIN, self._entry_id), manufacturer="Brunt", sw_version=self._thing.fw_version,