From b3105dc218da43916d4f639baae26d849af867d6 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Thu, 16 Dec 2021 22:45:48 +0100 Subject: [PATCH] Use new enums in nuki (#61949) --- homeassistant/components/nuki/binary_sensor.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/nuki/binary_sensor.py b/homeassistant/components/nuki/binary_sensor.py index 3b79eef324f..52cf1090d9e 100644 --- a/homeassistant/components/nuki/binary_sensor.py +++ b/homeassistant/components/nuki/binary_sensor.py @@ -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):