Fix race when handling rapid succession of MQTT discovery messages (#68785)
Co-authored-by: jbouwh <jan@jbsoft.nl>
This commit is contained in:
parent
3d378449e8
commit
7e8d52e5a3
7 changed files with 103 additions and 14 deletions
|
@ -618,6 +618,8 @@ async def mqtt_mock(hass, mqtt_client_mock, mqtt_config):
|
|||
)
|
||||
mqtt_component_mock.conf = hass.data["mqtt"].conf # For diagnostics
|
||||
mqtt_component_mock._mqttc = mqtt_client_mock
|
||||
# connected set to True to get a more realistics behavior when subscribing
|
||||
hass.data["mqtt"].connected = True
|
||||
|
||||
hass.data["mqtt"] = mqtt_component_mock
|
||||
component = hass.data["mqtt"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue