Use new enums in nuki (#61949)
parent
c4c9dc8cee
commit
b3105dc218
|
@ -4,7 +4,10 @@ import logging
|
|||
|
||||
from pynuki import STATE_DOORSENSOR_OPENED
|
||||
|
||||
from homeassistant.components.binary_sensor import DEVICE_CLASS_DOOR, BinarySensorEntity
|
||||
from homeassistant.components.binary_sensor import (
|
||||
BinarySensorDeviceClass,
|
||||
BinarySensorEntity,
|
||||
)
|
||||
|
||||
from . import NukiEntity
|
||||
from .const import ATTR_NUKI_ID, DATA_COORDINATOR, DATA_LOCKS, DOMAIN as NUKI_DOMAIN
|
||||
|
@ -29,7 +32,7 @@ async def async_setup_entry(hass, entry, async_add_entities):
|
|||
class NukiDoorsensorEntity(NukiEntity, BinarySensorEntity):
|
||||
"""Representation of a Nuki Lock Doorsensor."""
|
||||
|
||||
_attr_device_class = DEVICE_CLASS_DOOR
|
||||
_attr_device_class = BinarySensorDeviceClass.DOOR
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
|
|
Loading…
Reference in New Issue