Refactor MQTT to replace get_mqtt_data with HassKey (#117899)

This commit is contained in:
J. Nick Koston
2024-05-21 23:21:51 -10:00
committed by GitHub
parent b4d0562063
commit 4e3c4400a7
14 changed files with 74 additions and 74 deletions
@@ -43,7 +43,7 @@ async def setup_comp(
async def test_setup_fails_without_mqtt_being_setup(
hass: HomeAssistant, caplog: pytest.LogCaptureFixture
hass: HomeAssistant, mqtt_mock: MqttMockHAClient, caplog: pytest.LogCaptureFixture
) -> None:
"""Ensure mqtt is started when we setup the component."""
# Simulate MQTT is was removed
@@ -52,6 +52,8 @@ async def test_setup_fails_without_mqtt_being_setup(
await hass.config_entries.async_set_disabled_by(
mqtt_entry.entry_id, ConfigEntryDisabler.USER
)
# mqtt is mocked so we need to simulate it is not connected
mqtt_mock.connected = False
dev_id = "zanzito"
topic = "location/zanzito"