Force alias when importing sensor PLATFORM_SCHEMA (#120536)

This commit is contained in:
epenet
2024-06-26 12:14:13 +02:00
committed by GitHub
parent 348ceca19f
commit c49fce5541
123 changed files with 448 additions and 247 deletions

View File

@@ -5,7 +5,7 @@ from __future__ import annotations
import voluptuous as vol
from homeassistant.components.sensor import (
PLATFORM_SCHEMA,
PLATFORM_SCHEMA as SENSOR_PLATFORM_SCHEMA,
SensorDeviceClass,
SensorEntity,
)
@@ -63,7 +63,7 @@ SENSOR_DEVICE_CLASS = {
# Which sensors to format numerically
FORMAT_NUMBERS = ["Temperature", "Pressure", "Voltage"]
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
PLATFORM_SCHEMA = SENSOR_PLATFORM_SCHEMA.extend(
{
vol.Optional(CONF_MONITORED_CONDITIONS, default=SENSOR_TYPES): vol.All(
cv.ensure_list, [vol.In(SENSOR_TYPES)]