feat(config_flow): Einrichtung per IP und mDNS, Neuanmeldung, Neukonfiguration, Optionen

This commit is contained in:
Michael Sauer
2026-09-16 15:52:44 +02:00
parent 40186d95d1
commit be0a8e21b6
4 changed files with 556 additions and 5 deletions
+11 -1
View File
@@ -23,7 +23,10 @@ from tests_unit.samples import (
TOKEN,
)
CLIENT_PATCH_TARGETS = ["custom_components.ninlight.NinlightClient"]
CLIENT_PATCH_TARGETS = [
"custom_components.ninlight.NinlightClient",
"custom_components.ninlight.config_flow.NinlightClient",
]
@pytest.fixture(autouse=True)
@@ -91,3 +94,10 @@ async def init_integration(
assert await hass.config_entries.async_setup(mock_config_entry.entry_id)
await hass.async_block_till_done()
return mock_config_entry
@pytest.fixture
def mock_setup_entry() -> Generator[AsyncMock]:
"""Flow tests must not set the entry up for real."""
with patch("custom_components.ninlight.async_setup_entry", return_value=True) as mock:
yield mock