Add KEY_HOSTNAME for Daikin zeroconf (#36253)
* Add KEY_HOSTNAME for Daikin zeroconf * Update tests and use CONF_HOST as hostname
This commit is contained in:
parent
e1c6f01047
commit
efec62d98e
3 changed files with 10 additions and 5 deletions
|
@ -11,7 +11,7 @@ import voluptuous as vol
|
|||
from homeassistant import config_entries
|
||||
from homeassistant.const import CONF_HOST, CONF_PASSWORD
|
||||
|
||||
from .const import CONF_KEY, CONF_UUID, KEY_IP, KEY_MAC, TIMEOUT
|
||||
from .const import CONF_KEY, CONF_UUID, KEY_HOSTNAME, KEY_IP, KEY_MAC, TIMEOUT
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -128,7 +128,7 @@ class FlowHandler(config_entries.ConfigFlow):
|
|||
async def async_step_zeroconf(self, discovery_info):
|
||||
"""Prepare configuration for a discovered Daikin device."""
|
||||
_LOGGER.debug("Zeroconf discovery_info: %s", discovery_info)
|
||||
await self.async_set_unique_id(discovery_info.get(CONF_HOST))
|
||||
await self.async_set_unique_id(discovery_info[KEY_HOSTNAME])
|
||||
self._abort_if_unique_id_configured()
|
||||
self.host = discovery_info.get(CONF_HOST)
|
||||
self.host = discovery_info[CONF_HOST]
|
||||
return await self.async_step_user()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue