mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 13:47:35 +00:00
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:
parent
277f37423e
commit
55f9db6992
@ -31,7 +31,7 @@ if TYPE_CHECKING:
|
|||||||
ServiceCall
|
ServiceCall
|
||||||
|
|
||||||
DOMAIN = 'esphome'
|
DOMAIN = 'esphome'
|
||||||
REQUIREMENTS = ['aioesphomeapi==1.4.2']
|
REQUIREMENTS = ['aioesphomeapi==1.5.0']
|
||||||
|
|
||||||
|
|
||||||
DISPATCHER_UPDATE_ENTITY = 'esphome_{entry_id}_update_{component_key}_{key}'
|
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):
|
async def async_step_discovery(self, user_input: ConfigType):
|
||||||
"""Handle discovery."""
|
"""Handle discovery."""
|
||||||
# mDNS hostname has additional '.' at end
|
address = user_input['properties'].get(
|
||||||
hostname = user_input['hostname'][:-1]
|
'address', user_input['hostname'][:-1])
|
||||||
hosts = (hostname, user_input['host'])
|
|
||||||
for entry in self._async_current_entries():
|
for entry in self._async_current_entries():
|
||||||
if entry.data['host'] in hosts:
|
if entry.data['host'] == address:
|
||||||
return self.async_abort(
|
return self.async_abort(
|
||||||
reason='already_configured'
|
reason='already_configured'
|
||||||
)
|
)
|
||||||
@ -67,7 +66,7 @@ class EsphomeFlowHandler(config_entries.ConfigFlow):
|
|||||||
# Prefer .local addresses (mDNS is available after all, otherwise
|
# Prefer .local addresses (mDNS is available after all, otherwise
|
||||||
# we wouldn't have received the discovery message)
|
# we wouldn't have received the discovery message)
|
||||||
return await self.async_step_user(user_input={
|
return await self.async_step_user(user_input={
|
||||||
'host': hostname,
|
'host': address,
|
||||||
'port': user_input['port'],
|
'port': user_input['port'],
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ aioautomatic==0.6.5
|
|||||||
aiodns==1.1.1
|
aiodns==1.1.1
|
||||||
|
|
||||||
# homeassistant.components.esphome
|
# homeassistant.components.esphome
|
||||||
aioesphomeapi==1.4.2
|
aioesphomeapi==1.5.0
|
||||||
|
|
||||||
# homeassistant.components.freebox
|
# homeassistant.components.freebox
|
||||||
aiofreepybox==0.0.6
|
aiofreepybox==0.0.6
|
||||||
|
@ -242,7 +242,9 @@ async def test_discovery_already_configured_ip(hass, mock_client):
|
|||||||
'host': '192.168.43.183',
|
'host': '192.168.43.183',
|
||||||
'port': 6053,
|
'port': 6053,
|
||||||
'hostname': 'test8266.local.',
|
'hostname': 'test8266.local.',
|
||||||
'properties': {}
|
'properties': {
|
||||||
|
"address": "192.168.43.183"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
result = await flow.async_step_discovery(user_input=service_info)
|
result = await flow.async_step_discovery(user_input=service_info)
|
||||||
assert result['type'] == 'abort'
|
assert result['type'] == 'abort'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user