Code styling tweaks to the MQTT integration (#85463)

This commit is contained in:
Franck Nijhof 2023-01-08 22:07:10 +01:00 committed by GitHub
parent 1b592e6885
commit 800b8abe39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 152 additions and 80 deletions

View file

@ -112,7 +112,8 @@ PLATFORM_SCHEMA_MODERN = MQTT_BASE_SCHEMA.extend(
}
).extend(MQTT_ENTITY_COMMON_SCHEMA.schema)
# Configuring MQTT alarm control panels under the alarm_control_panel platform key was deprecated in HA Core 2022.6
# Configuring MQTT alarm control panels under the alarm_control_panel platform key
# was deprecated in HA Core 2022.6;
# Setup for the legacy YAML format was removed in HA Core 2022.12
PLATFORM_SCHEMA = vol.All(
warn_for_legacy_schema(alarm.DOMAIN),
@ -126,7 +127,7 @@ async def async_setup_entry(
config_entry: ConfigEntry,
async_add_entities: AddEntitiesCallback,
) -> None:
"""Set up MQTT alarm control panel through configuration.yaml and dynamically through MQTT discovery."""
"""Set up MQTT alarm control panel through YAML and through MQTT discovery."""
setup = functools.partial(
_async_setup_entity, hass, async_add_entities, config_entry=config_entry
)