Expose DEVICE_CLASS_STATE_CLASSES sensor constant (#88172)
parent
f67ebcade1
commit
ccf44d58cc
|
@ -99,6 +99,7 @@ __all__ = [
|
|||
"ATTR_OPTIONS",
|
||||
"ATTR_STATE_CLASS",
|
||||
"CONF_STATE_CLASS",
|
||||
"DEVICE_CLASS_STATE_CLASSES",
|
||||
"DOMAIN",
|
||||
"PLATFORM_SCHEMA_BASE",
|
||||
"PLATFORM_SCHEMA",
|
||||
|
|
|
@ -13,7 +13,7 @@ import voluptuous as vol
|
|||
|
||||
from homeassistant.components.binary_sensor import DOMAIN as BINARY_SENSOR_DOMAIN
|
||||
from homeassistant.components.recorder import get_instance, history
|
||||
from homeassistant.components.sensor import ( # pylint: disable=hass-deprecated-import
|
||||
from homeassistant.components.sensor import (
|
||||
DEVICE_CLASS_STATE_CLASSES,
|
||||
PLATFORM_SCHEMA,
|
||||
SensorDeviceClass,
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue