diff --git a/homeassistant/components/devolo_home_network/binary_sensor.py b/homeassistant/components/devolo_home_network/binary_sensor.py index 6bc02d802f5..2e87bd180b1 100644 --- a/homeassistant/components/devolo_home_network/binary_sensor.py +++ b/homeassistant/components/devolo_home_network/binary_sensor.py @@ -7,7 +7,7 @@ from dataclasses import dataclass from devolo_plc_api.device import Device from homeassistant.components.binary_sensor import ( - DEVICE_CLASS_PLUG, + BinarySensorDeviceClass, BinarySensorEntity, BinarySensorEntityDescription, ) @@ -47,7 +47,7 @@ class DevoloBinarySensorEntityDescription( SENSOR_TYPES: dict[str, DevoloBinarySensorEntityDescription] = { CONNECTED_TO_ROUTER: DevoloBinarySensorEntityDescription( key=CONNECTED_TO_ROUTER, - device_class=DEVICE_CLASS_PLUG, + device_class=BinarySensorDeviceClass.PLUG, entity_category=EntityCategory.DIAGNOSTIC, entity_registry_enabled_default=False, icon="mdi:router-network", diff --git a/homeassistant/components/zwave_me/binary_sensor.py b/homeassistant/components/zwave_me/binary_sensor.py index 40d850b8483..f1ee6896b25 100644 --- a/homeassistant/components/zwave_me/binary_sensor.py +++ b/homeassistant/components/zwave_me/binary_sensor.py @@ -4,7 +4,7 @@ from __future__ import annotations from zwave_me_ws import ZWaveMeData from homeassistant.components.binary_sensor import ( - DEVICE_CLASS_MOTION, + BinarySensorDeviceClass, BinarySensorEntity, BinarySensorEntityDescription, ) @@ -22,7 +22,7 @@ BINARY_SENSORS_MAP: dict[str, BinarySensorEntityDescription] = { ), "motion": BinarySensorEntityDescription( key="motion", - device_class=DEVICE_CLASS_MOTION, + device_class=BinarySensorDeviceClass.MOTION, ), } DEVICE_NAME = ZWaveMePlatform.BINARY_SENSOR diff --git a/pylint/plugins/hass_imports.py b/pylint/plugins/hass_imports.py index 31fbe8f498e..de981ab6a6d 100644 --- a/pylint/plugins/hass_imports.py +++ b/pylint/plugins/hass_imports.py @@ -38,7 +38,7 @@ _OBSOLETE_IMPORT: dict[str, list[ObsoleteImportMatch]] = { constant=re.compile(r"^FORMAT_(\w*)$"), ), ], - "homeassistant.components.binarysensor": [ + "homeassistant.components.binary_sensor": [ ObsoleteImportMatch( reason="replaced by BinarySensorDeviceClass enum", constant=re.compile(r"^DEVICE_CLASS_(\w*)$"),