Fix UPC ConnectBox logout and device hostnames (#39568)

This commit is contained in:
Olivér Falvai authored and GitHub committed 2020-09-02 14:56:32 +02:00
1 parent 6de02fc1b9
commit 70e39a26a2
3 files changed
+7 -5

No files matched your search

@@ -69,8 +69,10 @@ class UPCDeviceScanner(DeviceScanner):
async def async_get_device_name(self, device: str) -> Optional[str]:
"""Get the device name (the name of the wireless device not used)."""
for connected_device in self.connect_box.devices:
if connected_device != device:
continue
return connected_device.hostname
if (
connected_device.mac == device
and connected_device.hostname.lower() != "unknown"
):
return connected_device.hostname
return None
@@ -2,6 +2,6 @@
"domain": "upc_connect",
"name": "UPC Connect Box",
"documentation": "https://www.home-assistant.io/integrations/upc_connect",
"requirements": ["connect-box==0.2.7"],
"requirements": ["connect-box==0.2.8"],
"codeowners": ["@pvizeli", "@fabaff"]
}
+1 -1
View File
@@ -436,7 +436,7 @@ colorlog==4.2.1
concord232==0.15
# homeassistant.components.upc_connect
connect-box==0.2.7
connect-box==0.2.8
# homeassistant.components.eddystone_temperature
# homeassistant.components.eq3btsmart