Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix timeout issue on Roomba integration when adding a new device #129230

Merged
merged 6 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion homeassistant/components/roomba/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async def validate_input(hass: HomeAssistant, data: dict[str, Any]) -> dict[str,
address=data[CONF_HOST],
blid=data[CONF_BLID],
password=data[CONF_PASSWORD],
continuous=False,
continuous=True,
delay=data[CONF_DELAY],
)
)
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/roomba/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
CONF_BLID = "blid"
DEFAULT_CERT = "/etc/ssl/certs/ca-certificates.crt"
DEFAULT_CONTINUOUS = True
DEFAULT_DELAY = 1
DEFAULT_DELAY = 30
ROOMBA_SESSION = "roomba_session"
22 changes: 11 additions & 11 deletions tests/components/roomba/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ async def test_form_user_discovery_and_password_fetch(hass: HomeAssistant) -> No
assert result3["data"] == {
CONF_BLID: "BLID",
CONF_CONTINUOUS: True,
CONF_DELAY: 1,
CONF_DELAY: 30,
AuroreVgn marked this conversation as resolved.
Show resolved Hide resolved
CONF_HOST: MOCK_IP,
CONF_PASSWORD: "password",
}
Expand Down Expand Up @@ -331,7 +331,7 @@ async def test_form_user_discovery_manual_and_auto_password_fetch(
assert result4["data"] == {
CONF_BLID: "BLID",
CONF_CONTINUOUS: True,
CONF_DELAY: 1,
CONF_DELAY: 30,
CONF_HOST: MOCK_IP,
CONF_PASSWORD: "password",
}
Expand Down Expand Up @@ -468,7 +468,7 @@ async def test_form_user_discovery_no_devices_found_and_auto_password_fetch(
assert result3["data"] == {
CONF_BLID: "BLID",
CONF_CONTINUOUS: True,
CONF_DELAY: 1,
CONF_DELAY: 30,
CONF_HOST: MOCK_IP,
CONF_PASSWORD: "password",
}
Expand Down Expand Up @@ -541,7 +541,7 @@ async def test_form_user_discovery_no_devices_found_and_password_fetch_fails(
assert result4["data"] == {
CONF_BLID: "BLID",
CONF_CONTINUOUS: True,
CONF_DELAY: 1,
CONF_DELAY: 30,
CONF_HOST: MOCK_IP,
CONF_PASSWORD: "password",
}
Expand Down Expand Up @@ -677,7 +677,7 @@ async def test_form_user_discovery_and_password_fetch_gets_connection_refused(
assert result4["data"] == {
CONF_BLID: "BLID",
CONF_CONTINUOUS: True,
CONF_DELAY: 1,
CONF_DELAY: 30,
CONF_HOST: MOCK_IP,
CONF_PASSWORD: "password",
}
Expand Down Expand Up @@ -738,7 +738,7 @@ async def test_dhcp_discovery_and_roomba_discovery_finds(
assert result2["data"] == {
CONF_BLID: "BLID",
CONF_CONTINUOUS: True,
CONF_DELAY: 1,
CONF_DELAY: 30,
CONF_HOST: MOCK_IP,
CONF_PASSWORD: "password",
}
Expand Down Expand Up @@ -816,7 +816,7 @@ async def test_dhcp_discovery_falls_back_to_manual(
assert result4["data"] == {
CONF_BLID: "BLID",
CONF_CONTINUOUS: True,
CONF_DELAY: 1,
CONF_DELAY: 30,
CONF_HOST: MOCK_IP,
CONF_PASSWORD: "password",
}
Expand Down Expand Up @@ -886,7 +886,7 @@ async def test_dhcp_discovery_no_devices_falls_back_to_manual(
assert result3["data"] == {
CONF_BLID: "BLID",
CONF_CONTINUOUS: True,
CONF_DELAY: 1,
CONF_DELAY: 30,
CONF_HOST: MOCK_IP,
CONF_PASSWORD: "password",
}
Expand Down Expand Up @@ -1119,10 +1119,10 @@ async def test_options_flow(

result = await hass.config_entries.options.async_configure(
result["flow_id"],
user_input={CONF_CONTINUOUS: True, CONF_DELAY: 1},
user_input={CONF_CONTINUOUS: True, CONF_DELAY: 30},
)
await hass.async_block_till_done()

assert result["type"] is FlowResultType.CREATE_ENTRY
assert result["data"] == {CONF_CONTINUOUS: True, CONF_DELAY: 1}
assert config_entry.options == {CONF_CONTINUOUS: True, CONF_DELAY: 1}
assert result["data"] == {CONF_CONTINUOUS: True, CONF_DELAY: 30}
assert config_entry.options == {CONF_CONTINUOUS: True, CONF_DELAY: 30}