mirror of
https://github.com/home-assistant/core.git
synced 2025-12-25 05:26:47 +00:00
Rework MQTT config merging and adding defaults (#90529)
* Cleanup config merging and adding defaults * Optimize and update tests * Do not mix entry and yaml config * Make sure hass.data is initilized * remove check on get_mqtt_data * Tweaks to MQTT client * Remove None assigment mqtt client and fix mock
This commit is contained in:
@@ -967,9 +967,10 @@ async def _mqtt_mock_entry(
|
||||
nonlocal mock_mqtt_instance
|
||||
nonlocal real_mqtt_instance
|
||||
real_mqtt_instance = real_mqtt(*args, **kwargs)
|
||||
spec = dir(real_mqtt_instance) + ["_mqttc"]
|
||||
mock_mqtt_instance = MqttMockHAClient(
|
||||
return_value=real_mqtt_instance,
|
||||
spec_set=real_mqtt_instance,
|
||||
spec_set=spec,
|
||||
wraps=real_mqtt_instance,
|
||||
)
|
||||
return mock_mqtt_instance
|
||||
|
||||
Reference in New Issue
Block a user