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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
123 changed files with 448 additions and 247 deletions

View file

@ -5,7 +5,7 @@ from __future__ import annotations
from typing import Final
from homeassistant.components.sensor import (
PLATFORM_SCHEMA as PARENT_PLATFORM_SCHEMA,
PLATFORM_SCHEMA as SENSOR_PLATFORM_SCHEMA,
SensorEntity,
)
from homeassistant.const import CONF_UNIT_OF_MEASUREMENT
@ -15,7 +15,7 @@ from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType, StateTyp
from .common import TCP_PLATFORM_SCHEMA, TcpEntity
PLATFORM_SCHEMA: Final = PARENT_PLATFORM_SCHEMA.extend(TCP_PLATFORM_SCHEMA)
PLATFORM_SCHEMA: Final = SENSOR_PLATFORM_SCHEMA.extend(TCP_PLATFORM_SCHEMA)
def setup_platform(