mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 00:37:53 +00:00
Mark mqtt as integration with single config entry (#128202)
This commit is contained in:
parent
edb30af441
commit
3112682923
@ -343,9 +343,6 @@ class FlowHandler(ConfigFlow, domain=DOMAIN):
|
||||
self, user_input: dict[str, Any] | None = None
|
||||
) -> ConfigFlowResult:
|
||||
"""Handle a flow initialized by the user."""
|
||||
if self._async_current_entries():
|
||||
return self.async_abort(reason="single_instance_allowed")
|
||||
|
||||
if is_hassio(self.hass):
|
||||
# Offer to set up broker add-on if supervisor is available
|
||||
self._addon_manager = get_addon_manager(self.hass)
|
||||
|
@ -7,5 +7,6 @@
|
||||
"documentation": "https://www.home-assistant.io/integrations/mqtt",
|
||||
"iot_class": "local_push",
|
||||
"quality_scale": "platinum",
|
||||
"requirements": ["paho-mqtt==1.6.1"]
|
||||
"requirements": ["paho-mqtt==1.6.1"],
|
||||
"single_config_entry": true
|
||||
}
|
||||
|
@ -420,7 +420,7 @@ async def test_hassio_already_configured(hass: HomeAssistant) -> None:
|
||||
"mqtt", context={"source": config_entries.SOURCE_HASSIO}
|
||||
)
|
||||
assert result["type"] is FlowResultType.ABORT
|
||||
assert result["reason"] == "already_configured"
|
||||
assert result["reason"] == "single_instance_allowed"
|
||||
|
||||
|
||||
async def test_hassio_ignored(hass: HomeAssistant) -> None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user