1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-06 05:12:21 +01:00

OTA: Fix IPv6 and multiple address support (#7414)

This commit is contained in:
David Woodhouse
2024-11-08 03:38:13 +00:00
committed by GitHub
parent 3f123d7542
commit 2f77d31690
5 changed files with 117 additions and 57 deletions

View File

@@ -175,8 +175,15 @@ def get_esphome_device_ip(
_LOGGER.Warn("Wrong device answer")
return
if "ip" in data:
dev_ip = data["ip"]
dev_ip = []
key = "ip"
n = 0
while key in data:
dev_ip.append(data[key])
n = n + 1
key = "ip" + str(n)
if dev_ip:
client.disconnect()
def on_connect(client, userdata, flags, return_code):