Link manually added MQTT entities the the MQTT config entry (#78547)

Co-authored-by: Erik <erik@montnemery.com>
This commit is contained in:
Jan Bouwhuis 2022-09-18 18:55:31 +02:00 committed by GitHub
parent 49ead219a5
commit 354411feed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 117 additions and 105 deletions

View file

@ -42,7 +42,6 @@ from .mixins import (
MQTT_ENTITY_COMMON_SCHEMA,
MqttAvailability,
MqttEntity,
async_discover_yaml_entities,
async_setup_entry_helper,
async_setup_platform_helper,
warn_for_legacy_schema,
@ -102,9 +101,6 @@ async def async_setup_entry(
async_add_entities: AddEntitiesCallback,
) -> None:
"""Set up MQTT binary sensor through configuration.yaml and dynamically through MQTT discovery."""
# load and initialize platform config from configuration.yaml
await async_discover_yaml_entities(hass, binary_sensor.DOMAIN)
# setup for discovery
setup = functools.partial(
_async_setup_entity, hass, async_add_entities, config_entry=config_entry
)