mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 04:37:06 +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 homeassistant.components.binary_sensor import (
|
||||
DEVICE_CLASS_OCCUPANCY,
|
||||
BinarySensorDeviceClass,
|
||||
BinarySensorEntity,
|
||||
)
|
||||
|
||||
@ -35,7 +35,7 @@ class LutronOccupancySensor(LutronCasetaDevice, BinarySensorEntity):
|
||||
@property
|
||||
def device_class(self):
|
||||
"""Flag supported features."""
|
||||
return DEVICE_CLASS_OCCUPANCY
|
||||
return BinarySensorDeviceClass.OCCUPANCY
|
||||
|
||||
@property
|
||||
def is_on(self):
|
||||
|
@ -3,12 +3,12 @@ import logging
|
||||
|
||||
from homeassistant.components.cover import (
|
||||
ATTR_POSITION,
|
||||
DEVICE_CLASS_SHADE,
|
||||
DOMAIN,
|
||||
SUPPORT_CLOSE,
|
||||
SUPPORT_OPEN,
|
||||
SUPPORT_SET_POSITION,
|
||||
SUPPORT_STOP,
|
||||
CoverDeviceClass,
|
||||
CoverEntity,
|
||||
)
|
||||
|
||||
@ -58,7 +58,7 @@ class LutronCasetaCover(LutronCasetaDevice, CoverEntity):
|
||||
@property
|
||||
def device_class(self):
|
||||
"""Return the device class."""
|
||||
return DEVICE_CLASS_SHADE
|
||||
return CoverDeviceClass.SHADE
|
||||
|
||||
async def async_stop_cover(self, **kwargs):
|
||||
"""Top the cover."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user