mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Let MQTT availability for snips
be managed by dependencies (#91790)
MQTT availability for snips via dependencies
This commit is contained in:
parent
0552ec834d
commit
92bb61d25b
@ -90,10 +90,6 @@ SERVICE_SCHEMA_FEEDBACK = vol.Schema(
|
|||||||
|
|
||||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||||
"""Activate Snips component."""
|
"""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):
|
async def async_set_feedback(site_ids, state):
|
||||||
"""Set Feedback sound state."""
|
"""Set Feedback sound state."""
|
||||||
|
@ -46,7 +46,7 @@ async def test_snips_no_mqtt(
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
assert not result
|
assert not result
|
||||||
assert "MQTT integration is not available" in caplog.text
|
assert "MQTT is not enabled" in caplog.text
|
||||||
|
|
||||||
|
|
||||||
async def test_snips_bad_config(
|
async def test_snips_bad_config(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user