mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Load mqtt_eventstream before any other component. (#5629)
This ensures that initial state changes for components are broadcasted on the MQTT bus.
This commit is contained in:
parent
b080ae154c
commit
9925b2a8e0
@ -177,6 +177,8 @@ def load_order_components(components: Sequence[str]) -> OrderedSet:
|
||||
- Will ensure that all components that do not directly depend on
|
||||
the group component will be loaded before the group component.
|
||||
- returns an OrderedSet load order.
|
||||
- Makes sure MQTT eventstream is available for publish before
|
||||
components start updating states.
|
||||
|
||||
Async friendly.
|
||||
"""
|
||||
@ -193,7 +195,8 @@ def load_order_components(components: Sequence[str]) -> OrderedSet:
|
||||
load_order.update(comp_load_order)
|
||||
|
||||
# Push some to first place in load order
|
||||
for comp in ('logger', 'recorder', 'introduction'):
|
||||
for comp in ('mqtt_eventstream', 'mqtt', 'logger',
|
||||
'recorder', 'introduction'):
|
||||
if comp in load_order:
|
||||
load_order.promote(comp)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user