1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-25 05:26:47 +00:00

Fix ESPHome nodes being auto-added without user confirmation (#21444)

This commit is contained in:
Otto Winter
2019-02-26 21:35:25 +01:00
committed by Paulus Schoutsen
parent ab73b725e1
commit 29187795a8
3 changed files with 41 additions and 17 deletions

View File

@@ -203,6 +203,11 @@ async def test_discovery_initiation(hass, mock_client):
MockDeviceInfo(False, "test8266"))
result = await flow.async_step_discovery(user_input=service_info)
assert result['type'] == 'form'
assert result['step_id'] == 'discovery_confirm'
assert result['description_placeholders']['name'] == 'test8266'
result = await flow.async_step_discovery_confirm(user_input={})
assert result['type'] == 'create_entry'
assert result['title'] == 'test8266'
assert result['data']['host'] == 'test8266.local'