Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions homeassistant/components/snips/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Activate Snips component."""

# Make sure MQTT integration is enabled and the client is available
if not await mqtt.async_wait_for_mqtt_client(hass):
_LOGGER.error("MQTT integration is not available")
return False

async def async_set_feedback(site_ids, state):
"""Set Feedback sound state."""
site_ids = site_ids if site_ids else config[DOMAIN].get(CONF_SITE_IDS)
Expand Down
2 changes: 1 addition & 1 deletion tests/components/snips/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async def test_snips_no_mqtt(
},
)
assert not result
assert "MQTT is not enabled" in caplog.text
assert "MQTT integration is not available" in caplog.text


async def test_snips_bad_config(
Expand Down