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

@ -18,7 +18,7 @@ from homeassistant.components.application_credentials import (
async_import_client_credential,
)
from homeassistant.components.sensor import (
PLATFORM_SCHEMA as PARENT_PLATFORM_SCHEMA,
PLATFORM_SCHEMA as SENSOR_PLATFORM_SCHEMA,
SensorDeviceClass,
SensorEntity,
SensorEntityDescription,
@ -538,7 +538,7 @@ FITBIT_RESOURCES_KEYS: Final[list[str]] = [
for desc in (*FITBIT_RESOURCES_LIST, FITBIT_RESOURCE_BATTERY, SLEEP_START_TIME)
]
PLATFORM_SCHEMA: Final = PARENT_PLATFORM_SCHEMA.extend(
PLATFORM_SCHEMA: Final = SENSOR_PLATFORM_SCHEMA.extend(
{
vol.Optional(
CONF_MONITORED_RESOURCES, default=FITBIT_DEFAULT_RESOURCES