ota.py: don't use deprecated zeroconf attrs (#2299)

Also bump zeroconf to the version used by PIO
This commit is contained in:
Max Prokhorov
2020-07-09 00:51:36 +03:00
committed by GitHub
parent 2be8d10601
commit 33ff98c2c6
2 changed files with 5 additions and 3 deletions

View File

@@ -22,7 +22,7 @@ import zeroconf
# -------------------------------------------------------------------------------
__version__ = (0, 4, 1)
__version__ = (0, 4, 2)
DESCRIPTION = "ESPurna OTA Manager v{}".format(".".join(str(x) for x in __version__))
DISCOVERY_TIMEOUT = 10
@@ -113,9 +113,11 @@ class Listener:
return
hostname = info.server.split(".")[0]
addresses = info.parsed_addresses()
device = {
"hostname": hostname.upper(),
"ip": socket.inet_ntoa(info.address),
"ip": addresses[0] if addresses else info.host,
"mac": "",
"app_name": "",
"app_version": "",

View File

@@ -1,2 +1,2 @@
ifaddr==0.1.6
zeroconf==0.24.0
zeroconf==0.26.0