mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 00:37:13 +00:00
Use short handle attributes for device class in netatmo cover (#100228)
This commit is contained in:
parent
693a271e40
commit
cc252f705f
@ -51,6 +51,7 @@ class NetatmoCover(NetatmoBase, CoverEntity):
|
|||||||
| CoverEntityFeature.STOP
|
| CoverEntityFeature.STOP
|
||||||
| CoverEntityFeature.SET_POSITION
|
| CoverEntityFeature.SET_POSITION
|
||||||
)
|
)
|
||||||
|
_attr_device_class = CoverDeviceClass.SHUTTER
|
||||||
|
|
||||||
def __init__(self, netatmo_device: NetatmoDevice) -> None:
|
def __init__(self, netatmo_device: NetatmoDevice) -> None:
|
||||||
"""Initialize the Netatmo device."""
|
"""Initialize the Netatmo device."""
|
||||||
@ -98,11 +99,6 @@ class NetatmoCover(NetatmoBase, CoverEntity):
|
|||||||
"""Move the cover shutter to a specific position."""
|
"""Move the cover shutter to a specific position."""
|
||||||
await self._cover.async_set_target_position(kwargs[ATTR_POSITION])
|
await self._cover.async_set_target_position(kwargs[ATTR_POSITION])
|
||||||
|
|
||||||
@property
|
|
||||||
def device_class(self) -> CoverDeviceClass:
|
|
||||||
"""Return the device class."""
|
|
||||||
return CoverDeviceClass.SHUTTER
|
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def async_update_callback(self) -> None:
|
def async_update_callback(self) -> None:
|
||||||
"""Update the entity's state."""
|
"""Update the entity's state."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user