mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Use CoverDeviceClass in soma (#69264)
This commit is contained in:
parent
4b89b2f5d8
commit
18866e4e39
@ -4,8 +4,6 @@ from __future__ import annotations
|
|||||||
from homeassistant.components.cover import (
|
from homeassistant.components.cover import (
|
||||||
ATTR_POSITION,
|
ATTR_POSITION,
|
||||||
ATTR_TILT_POSITION,
|
ATTR_TILT_POSITION,
|
||||||
DEVICE_CLASS_BLIND,
|
|
||||||
DEVICE_CLASS_SHADE,
|
|
||||||
SUPPORT_CLOSE,
|
SUPPORT_CLOSE,
|
||||||
SUPPORT_CLOSE_TILT,
|
SUPPORT_CLOSE_TILT,
|
||||||
SUPPORT_OPEN,
|
SUPPORT_OPEN,
|
||||||
@ -14,6 +12,7 @@ from homeassistant.components.cover import (
|
|||||||
SUPPORT_SET_TILT_POSITION,
|
SUPPORT_SET_TILT_POSITION,
|
||||||
SUPPORT_STOP,
|
SUPPORT_STOP,
|
||||||
SUPPORT_STOP_TILT,
|
SUPPORT_STOP_TILT,
|
||||||
|
CoverDeviceClass,
|
||||||
CoverEntity,
|
CoverEntity,
|
||||||
)
|
)
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
@ -49,7 +48,7 @@ async def async_setup_entry(
|
|||||||
class SomaTilt(SomaEntity, CoverEntity):
|
class SomaTilt(SomaEntity, CoverEntity):
|
||||||
"""Representation of a Soma Tilt device."""
|
"""Representation of a Soma Tilt device."""
|
||||||
|
|
||||||
_attr_device_class = DEVICE_CLASS_BLIND
|
_attr_device_class = CoverDeviceClass.BLIND
|
||||||
_attr_supported_features = (
|
_attr_supported_features = (
|
||||||
SUPPORT_OPEN_TILT
|
SUPPORT_OPEN_TILT
|
||||||
| SUPPORT_CLOSE_TILT
|
| SUPPORT_CLOSE_TILT
|
||||||
@ -123,7 +122,7 @@ class SomaTilt(SomaEntity, CoverEntity):
|
|||||||
class SomaShade(SomaEntity, CoverEntity):
|
class SomaShade(SomaEntity, CoverEntity):
|
||||||
"""Representation of a Soma Shade device."""
|
"""Representation of a Soma Shade device."""
|
||||||
|
|
||||||
_attr_device_class = DEVICE_CLASS_SHADE
|
_attr_device_class = CoverDeviceClass.SHADE
|
||||||
_attr_supported_features = (
|
_attr_supported_features = (
|
||||||
SUPPORT_OPEN | SUPPORT_CLOSE | SUPPORT_STOP | SUPPORT_SET_POSITION
|
SUPPORT_OPEN | SUPPORT_CLOSE | SUPPORT_STOP | SUPPORT_SET_POSITION
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user