Fire event_mqtt_reloaded only after reload is completed (#74226)
This commit is contained in:
parent
1bdd93cc77
commit
f05b4a0ca0
20 changed files with 96 additions and 123 deletions
|
@ -50,8 +50,8 @@ from .debug_info import log_messages
|
|||
from .mixins import (
|
||||
MQTT_ENTITY_COMMON_SCHEMA,
|
||||
MqttEntity,
|
||||
async_discover_yaml_entities,
|
||||
async_setup_entry_helper,
|
||||
async_setup_platform_discovery,
|
||||
async_setup_platform_helper,
|
||||
warn_for_legacy_schema,
|
||||
)
|
||||
|
@ -391,9 +391,7 @@ async def async_setup_entry(
|
|||
) -> None:
|
||||
"""Set up MQTT climate device through configuration.yaml and dynamically through MQTT discovery."""
|
||||
# load and initialize platform config from configuration.yaml
|
||||
config_entry.async_on_unload(
|
||||
await async_setup_platform_discovery(hass, climate.DOMAIN)
|
||||
)
|
||||
await async_discover_yaml_entities(hass, climate.DOMAIN)
|
||||
# setup for discovery
|
||||
setup = functools.partial(
|
||||
_async_setup_entity, hass, async_add_entities, config_entry=config_entry
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue