Bump aioesphomeapi to 1.5.0 (#20986)

* Bump aioesphomeapi to 1.5.0

* Update requirements_all.txt

* Fix editor line length setting
This commit is contained in:
Otto Winter authored and Fabian Affolter committed 2019-02-11 21:57:17 +01:00
1 parent 277f37423e
commit 55f9db6992
4 files changed
+9 -8

No files matched your search

+1 -1
View File
@@ -31,7 +31,7 @@ if TYPE_CHECKING:
ServiceCall
DOMAIN = 'esphome'
REQUIREMENTS = ['aioesphomeapi==1.4.2']
REQUIREMENTS = ['aioesphomeapi==1.5.0']
DISPATCHER_UPDATE_ENTITY = 'esphome_{entry_id}_update_{component_key}_{key}'
@@ -55,11 +55,10 @@ class EsphomeFlowHandler(config_entries.ConfigFlow):
async def async_step_discovery(self, user_input: ConfigType):
"""Handle discovery."""
# mDNS hostname has additional '.' at end
hostname = user_input['hostname'][:-1]
hosts = (hostname, user_input['host'])
address = user_input['properties'].get(
'address', user_input['hostname'][:-1])
for entry in self._async_current_entries():
if entry.data['host'] in hosts:
if entry.data['host'] == address:
return self.async_abort(
reason='already_configured'
)
@@ -67,7 +66,7 @@ class EsphomeFlowHandler(config_entries.ConfigFlow):
# Prefer .local addresses (mDNS is available after all, otherwise
# we wouldn't have received the discovery message)
return await self.async_step_user(user_input={
'host': hostname,
'host': address,
'port': user_input['port'],
})