mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 08:07:45 +00:00
Use shorthand attributes in garadget cover (#100207)
This commit is contained in:
parent
e2f7b3c6f8
commit
83ef5450e9
@ -92,6 +92,8 @@ def setup_platform(
|
|||||||
class GaradgetCover(CoverEntity):
|
class GaradgetCover(CoverEntity):
|
||||||
"""Representation of a Garadget cover."""
|
"""Representation of a Garadget cover."""
|
||||||
|
|
||||||
|
_attr_device_class = CoverDeviceClass.GARAGE
|
||||||
|
|
||||||
def __init__(self, hass, args):
|
def __init__(self, hass, args):
|
||||||
"""Initialize the cover."""
|
"""Initialize the cover."""
|
||||||
self.particle_url = "https://api.particle.io"
|
self.particle_url = "https://api.particle.io"
|
||||||
@ -174,11 +176,6 @@ class GaradgetCover(CoverEntity):
|
|||||||
return None
|
return None
|
||||||
return self._state == STATE_CLOSED
|
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):
|
def get_token(self):
|
||||||
"""Get new token for usage during this session."""
|
"""Get new token for usage during this session."""
|
||||||
args = {
|
args = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user