From 83ef5450e9d11dd299e767351147e0b5c620445f Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 12 Sep 2023 10:05:31 -0500 Subject: [PATCH] Use shorthand attributes in garadget cover (#100207) --- homeassistant/components/garadget/cover.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/garadget/cover.py b/homeassistant/components/garadget/cover.py index 826f21e9f88..6d9705cee75 100644 --- a/homeassistant/components/garadget/cover.py +++ b/homeassistant/components/garadget/cover.py @@ -92,6 +92,8 @@ def setup_platform( class GaradgetCover(CoverEntity): """Representation of a Garadget cover.""" + _attr_device_class = CoverDeviceClass.GARAGE + def __init__(self, hass, args): """Initialize the cover.""" self.particle_url = "https://api.particle.io" @@ -174,11 +176,6 @@ class GaradgetCover(CoverEntity): return None return self._state == STATE_CLOSED - @property - def device_class(self) -> CoverDeviceClass: - """Return the class of this device, from component DEVICE_CLASSES.""" - return CoverDeviceClass.GARAGE - def get_token(self): """Get new token for usage during this session.""" args = {