diff --git a/homeassistant/components/mqtt/config_flow.py b/homeassistant/components/mqtt/config_flow.py index 6697b17dfdc..0a763e850e5 100644 --- a/homeassistant/components/mqtt/config_flow.py +++ b/homeassistant/components/mqtt/config_flow.py @@ -120,7 +120,6 @@ class FlowHandler(config_entries.ConfigFlow, domain=DOMAIN): CONF_PORT: data[CONF_PORT], CONF_USERNAME: data.get(CONF_USERNAME), CONF_PASSWORD: data.get(CONF_PASSWORD), - CONF_PROTOCOL: data.get(CONF_PROTOCOL), CONF_DISCOVERY: DEFAULT_DISCOVERY, }, ) diff --git a/tests/components/mqtt/test_config_flow.py b/tests/components/mqtt/test_config_flow.py index f0e02ad8a3a..565fa7fda53 100644 --- a/tests/components/mqtt/test_config_flow.py +++ b/tests/components/mqtt/test_config_flow.py @@ -235,7 +235,8 @@ async def test_hassio_confirm(hass, mock_try_connection_success, mock_finish_set "port": 1883, "username": "mock-user", "password": "mock-pass", - "protocol": "3.1.1", + "protocol": "3.1.1", # Set by the addon's discovery, ignored by HA + "ssl": False, # Set by the addon's discovery, ignored by HA } ), context={"source": config_entries.SOURCE_HASSIO}, @@ -255,7 +256,6 @@ async def test_hassio_confirm(hass, mock_try_connection_success, mock_finish_set "port": 1883, "username": "mock-user", "password": "mock-pass", - "protocol": "3.1.1", "discovery": True, } # Check we tried the connection