fix get_port

This commit is contained in:
Andrey
2021-02-05 21:06:27 +03:00
parent 97911d0241
commit 8cf000beae
2 changed files with 9 additions and 3 deletions

View File

@@ -219,9 +219,12 @@ async def _get_port(hass: HomeAssistant, call: ServiceCall):
if not isinstance(hub, MegaD):
continue
if port is None:
await hub.get_all_ports()
else:
await hub.get_all_ports(check_skip=True)
elif isinstance(port, int):
await hub.get_port(port)
elif isinstance(port, list):
for x in port:
await hub.get_port(x)
@bind_hass