Use new enums in nuki (#61949)

pull/62128/head
epenet 2021-12-16 22:45:48 +01:00 committed by GitHub
parent c4c9dc8cee
commit b3105dc218
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -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):