mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +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 (
|
||||
ATTR_POSITION,
|
||||
ATTR_TILT_POSITION,
|
||||
DEVICE_CLASS_WINDOW,
|
||||
DEVICE_CLASS_DAMPER,
|
||||
DEVICE_CLASS_SHADE,
|
||||
DOMAIN,
|
||||
SUPPORT_CLOSE,
|
||||
SUPPORT_CLOSE_TILT,
|
||||
@ -80,9 +81,9 @@ class DeconzCover(DeconzDevice, CoverEntity):
|
||||
def device_class(self):
|
||||
"""Return the class of the cover."""
|
||||
if self._device.type in DAMPERS:
|
||||
return "damper"
|
||||
return DEVICE_CLASS_DAMPER
|
||||
if self._device.type in WINDOW_COVERS:
|
||||
return DEVICE_CLASS_WINDOW
|
||||
return DEVICE_CLASS_SHADE
|
||||
|
||||
@property
|
||||
def current_cover_position(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user