mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 08:47:57 +00:00
Fix Daikin zeroconf discovery flow error (#36868)
This commit is contained in:
parent
a74e35795c
commit
b3c851502d
@ -129,7 +129,7 @@ class FlowHandler(config_entries.ConfigFlow):
|
||||
async def async_step_zeroconf(self, discovery_info):
|
||||
"""Prepare configuration for a discovered Daikin device."""
|
||||
_LOGGER.debug("Zeroconf user_input: %s", discovery_info)
|
||||
devices = Discovery.poll(discovery_info[CONF_HOST])
|
||||
devices = Discovery().poll(ip=discovery_info[CONF_HOST])
|
||||
await self.async_set_unique_id(next(iter(devices.values()))[KEY_MAC])
|
||||
self._abort_if_unique_id_configured()
|
||||
self.host = discovery_info[CONF_HOST]
|
||||
|
@ -45,9 +45,9 @@ def mock_daikin():
|
||||
def mock_daikin_discovery():
|
||||
"""Mock pydaikin Discovery."""
|
||||
with patch("homeassistant.components.daikin.config_flow.Discovery") as Discovery:
|
||||
Discovery.poll = PropertyMock(
|
||||
return_value={"127.0.01": {"mac": "AABBCCDDEEFF", "id": "test"}}
|
||||
)
|
||||
Discovery().poll.return_value = {
|
||||
"127.0.01": {"mac": "AABBCCDDEEFF", "id": "test"}
|
||||
}
|
||||
yield Discovery
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user