mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 02:49:40 +00:00
Add sensor DEVICE_CLASS_* to deprecated imports (#69243)
This commit is contained in:
@@ -50,6 +50,10 @@ _OBSOLETE_IMPORT: dict[str, list[ObsoleteImportMatch]] = {
|
||||
),
|
||||
],
|
||||
"homeassistant.components.sensor": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by SensorDeviceClass enum",
|
||||
constant=re.compile(r"^DEVICE_CLASS_(\w*)$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by SensorStateClass enum",
|
||||
constant=re.compile(r"^STATE_CLASS_(\w*)$"),
|
||||
@@ -68,6 +72,10 @@ _OBSOLETE_IMPORT: dict[str, list[ObsoleteImportMatch]] = {
|
||||
),
|
||||
],
|
||||
"homeassistant.const": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by SensorDeviceClass enum",
|
||||
constant=re.compile(r"^DEVICE_CLASS_(\w*)$"),
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by EntityCategory enum",
|
||||
constant=re.compile(r"^(ENTITY_CATEGORY_(\w*))|(ENTITY_CATEGORIES)$"),
|
||||
|
||||
Reference in New Issue
Block a user