mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Use new DeviceClass enums in lutron_caseta (#61887)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
b5d54d9bb1
commit
232d793661
@ -2,7 +2,7 @@
|
|||||||
from pylutron_caseta import OCCUPANCY_GROUP_OCCUPIED
|
from pylutron_caseta import OCCUPANCY_GROUP_OCCUPIED
|
||||||
|
|
||||||
from homeassistant.components.binary_sensor import (
|
from homeassistant.components.binary_sensor import (
|
||||||
DEVICE_CLASS_OCCUPANCY,
|
BinarySensorDeviceClass,
|
||||||
BinarySensorEntity,
|
BinarySensorEntity,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ class LutronOccupancySensor(LutronCasetaDevice, BinarySensorEntity):
|
|||||||
@property
|
@property
|
||||||
def device_class(self):
|
def device_class(self):
|
||||||
"""Flag supported features."""
|
"""Flag supported features."""
|
||||||
return DEVICE_CLASS_OCCUPANCY
|
return BinarySensorDeviceClass.OCCUPANCY
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_on(self):
|
def is_on(self):
|
||||||
|
@ -3,12 +3,12 @@ import logging
|
|||||||
|
|
||||||
from homeassistant.components.cover import (
|
from homeassistant.components.cover import (
|
||||||
ATTR_POSITION,
|
ATTR_POSITION,
|
||||||
DEVICE_CLASS_SHADE,
|
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
SUPPORT_CLOSE,
|
SUPPORT_CLOSE,
|
||||||
SUPPORT_OPEN,
|
SUPPORT_OPEN,
|
||||||
SUPPORT_SET_POSITION,
|
SUPPORT_SET_POSITION,
|
||||||
SUPPORT_STOP,
|
SUPPORT_STOP,
|
||||||
|
CoverDeviceClass,
|
||||||
CoverEntity,
|
CoverEntity,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ class LutronCasetaCover(LutronCasetaDevice, CoverEntity):
|
|||||||
@property
|
@property
|
||||||
def device_class(self):
|
def device_class(self):
|
||||||
"""Return the device class."""
|
"""Return the device class."""
|
||||||
return DEVICE_CLASS_SHADE
|
return CoverDeviceClass.SHADE
|
||||||
|
|
||||||
async def async_stop_cover(self, **kwargs):
|
async def async_stop_cover(self, **kwargs):
|
||||||
"""Top the cover."""
|
"""Top the cover."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user