From f0e607869a7dc527da044fe5784a681b05f6addc Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 13 Sep 2023 19:25:33 -0500 Subject: [PATCH] Use shorthand attributes for supla cover device class (#100337) from #95315 --- homeassistant/components/supla/cover.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/supla/cover.py b/homeassistant/components/supla/cover.py index 53e57fe1854..cc3a5a4ed0c 100644 --- a/homeassistant/components/supla/cover.py +++ b/homeassistant/components/supla/cover.py @@ -95,6 +95,8 @@ class SuplaCoverEntity(SuplaEntity, CoverEntity): class SuplaDoorEntity(SuplaEntity, CoverEntity): """Representation of a Supla door.""" + _attr_device_class = CoverDeviceClass.GARAGE + @property def is_closed(self) -> bool | None: """Return if the door is closed or not.""" @@ -120,8 +122,3 @@ class SuplaDoorEntity(SuplaEntity, CoverEntity): async def async_toggle(self, **kwargs: Any) -> None: """Toggle the door.""" await self.async_action("OPEN_CLOSE") - - @property - def device_class(self) -> CoverDeviceClass: - """Return the class of this device, from component DEVICE_CLASSES.""" - return CoverDeviceClass.GARAGE