Expose DEVICE_CLASS_STATE_CLASSES sensor constant (#88172)

This commit is contained in:
epenet
2023-02-15 14:48:27 +01:00
committed by GitHub
parent f67ebcade1
commit ccf44d58cc
3 changed files with 3 additions and 2 deletions

View File

@@ -215,7 +215,7 @@ _OBSOLETE_IMPORT: dict[str, list[ObsoleteImportMatch]] = {
"homeassistant.components.sensor": [
ObsoleteImportMatch(
reason="replaced by SensorDeviceClass enum",
constant=re.compile(r"^DEVICE_CLASS_(\w*)$"),
constant=re.compile(r"^DEVICE_CLASS_(?!STATE_CLASSES)$"),
),
ObsoleteImportMatch(
reason="replaced by SensorStateClass enum",