1
0
mirror of https://github.com/elisspace/core.git synced 2026-08-29 23:52:02 +00:00

Revert "Expose DEVICE_CLASS_STATE_CLASSES sensor constant (#88172)"

This reverts commit ccf44d58cc.
This commit is contained in:
Franck Nijhof
2023-02-15 14:56:23 +01:00
committed by GitHub
parent ccf44d58cc
commit 409506c2bc
3 changed files with 2 additions and 3 deletions

View File

@@ -99,7 +99,6 @@ __all__ = [
"ATTR_OPTIONS",
"ATTR_STATE_CLASS",
"CONF_STATE_CLASS",
"DEVICE_CLASS_STATE_CLASSES",
"DOMAIN",
"PLATFORM_SCHEMA_BASE",
"PLATFORM_SCHEMA",

View File

@@ -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 (
from homeassistant.components.sensor import ( # pylint: disable=hass-deprecated-import
DEVICE_CLASS_STATE_CLASSES,
PLATFORM_SCHEMA,
SensorDeviceClass,

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_(?!STATE_CLASSES)$"),
constant=re.compile(r"^DEVICE_CLASS_(\w*)$"),
),
ObsoleteImportMatch(
reason="replaced by SensorStateClass enum",