mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 06:47:09 +00:00
Avoid use of hass.helpers
in _mqtt_mock_entry fixture (#114536)
This commit is contained in:
parent
3bb9858dfb
commit
f08af5dc6d
@ -62,6 +62,7 @@ from homeassistant.helpers import (
|
|||||||
label_registry as lr,
|
label_registry as lr,
|
||||||
recorder as recorder_helper,
|
recorder as recorder_helper,
|
||||||
)
|
)
|
||||||
|
from homeassistant.helpers.dispatcher import async_dispatcher_send
|
||||||
from homeassistant.helpers.typing import ConfigType
|
from homeassistant.helpers.typing import ConfigType
|
||||||
from homeassistant.setup import BASE_PLATFORMS, async_setup_component
|
from homeassistant.setup import BASE_PLATFORMS, async_setup_component
|
||||||
from homeassistant.util import location
|
from homeassistant.util import location
|
||||||
@ -985,7 +986,7 @@ async def _mqtt_mock_entry(
|
|||||||
# connected set to True to get a more realistic behavior when subscribing
|
# connected set to True to get a more realistic behavior when subscribing
|
||||||
mock_mqtt_instance.connected = True
|
mock_mqtt_instance.connected = True
|
||||||
|
|
||||||
hass.helpers.dispatcher.async_dispatcher_send(mqtt.MQTT_CONNECTED)
|
async_dispatcher_send(hass, mqtt.MQTT_CONNECTED)
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
|
|
||||||
return mock_mqtt_instance
|
return mock_mqtt_instance
|
||||||
|
Loading…
x
Reference in New Issue
Block a user