Tweak MQTT hassio discovery flow (#72699)

pull/72759/head
Erik Montnemery 2022-05-30 14:25:36 +02:00 committed by GitHub
parent 342ccb5bf1
commit 84243cf560
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -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,
},
)

View File

@ -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