mirror of
https://github.com/home-assistant/core.git
synced 2025-04-26 10:17:51 +00:00
Expose WLED configuration URL of discovered device (#63983)
* Expose WLED configuration URL of discovered device * Add test
This commit is contained in:
parent
e37456fb36
commit
28d49e69c1
@ -83,6 +83,7 @@ class WLEDFlowHandler(ConfigFlow, domain=DOMAIN):
|
||||
self.context.update(
|
||||
{
|
||||
"title_placeholders": {"name": self.discovered_device.info.name},
|
||||
"configuration_url": f"http://{discovery_info.host}",
|
||||
}
|
||||
)
|
||||
return await self.async_step_zeroconf_confirm()
|
||||
|
@ -62,6 +62,9 @@ async def test_full_zeroconf_flow_implementation(
|
||||
flows = hass.config_entries.flow.async_progress()
|
||||
assert len(flows) == 1
|
||||
|
||||
assert (
|
||||
flows[0].get("context", {}).get("configuration_url") == "http://192.168.1.123"
|
||||
)
|
||||
assert result.get("description_placeholders") == {CONF_NAME: "WLED RGB Light"}
|
||||
assert result.get("step_id") == "zeroconf_confirm"
|
||||
assert result.get("type") == RESULT_TYPE_FORM
|
||||
|
Loading…
x
Reference in New Issue
Block a user