Update Ecovacs config_flow to support self-hosted instances (#108944)

* Update Ecovacs config_flow to support  self-hosted instances

* Selfhosted should add their instance urls

* Improve config flow

* Improve and adapt to version bump

* Add test for self-hosted

* Make ruff happy

* Update homeassistant/components/ecovacs/strings.json

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Implement suggestions

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Implement suggestions

* Remove ,

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
Robert Resch 2024-01-31 13:17:00 +01:00 committed by GitHub
parent f77e4b24e6
commit 4bad88b42c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 596 additions and 72 deletions

View file

@ -87,6 +87,7 @@ async def test_async_setup_import(
config_entries_expected: int,
mock_setup_entry: AsyncMock,
mock_authenticator_authenticate: AsyncMock,
mock_mqtt_client: Mock,
) -> None:
"""Test async_setup config import."""
assert len(hass.config_entries.async_entries(DOMAIN)) == 0
@ -95,6 +96,7 @@ async def test_async_setup_import(
assert len(hass.config_entries.async_entries(DOMAIN)) == config_entries_expected
assert mock_setup_entry.call_count == config_entries_expected
assert mock_authenticator_authenticate.call_count == config_entries_expected
assert mock_mqtt_client.verify_config.call_count == config_entries_expected
async def test_devices_in_dr(