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