mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Change device class of window covers to shade (#47129)
This commit is contained in:
parent
97b59023d1
commit
da309ce342
@ -2,7 +2,8 @@
|
|||||||
from homeassistant.components.cover import (
|
from homeassistant.components.cover import (
|
||||||
ATTR_POSITION,
|
ATTR_POSITION,
|
||||||
ATTR_TILT_POSITION,
|
ATTR_TILT_POSITION,
|
||||||
DEVICE_CLASS_WINDOW,
|
DEVICE_CLASS_DAMPER,
|
||||||
|
DEVICE_CLASS_SHADE,
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
SUPPORT_CLOSE,
|
SUPPORT_CLOSE,
|
||||||
SUPPORT_CLOSE_TILT,
|
SUPPORT_CLOSE_TILT,
|
||||||
@ -80,9 +81,9 @@ class DeconzCover(DeconzDevice, CoverEntity):
|
|||||||
def device_class(self):
|
def device_class(self):
|
||||||
"""Return the class of the cover."""
|
"""Return the class of the cover."""
|
||||||
if self._device.type in DAMPERS:
|
if self._device.type in DAMPERS:
|
||||||
return "damper"
|
return DEVICE_CLASS_DAMPER
|
||||||
if self._device.type in WINDOW_COVERS:
|
if self._device.type in WINDOW_COVERS:
|
||||||
return DEVICE_CLASS_WINDOW
|
return DEVICE_CLASS_SHADE
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def current_cover_position(self):
|
def current_cover_position(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user