Modified config flow, introduced device deletion

This commit is contained in:
rospogrigio
2022-05-17 17:53:33 +02:00
parent b22cb29811
commit d4c20ebfed
9 changed files with 778 additions and 472 deletions

View File

@@ -71,7 +71,7 @@ class TuyaDiscovery(asyncio.DatagramProtocol):
def device_found(self, device):
"""Discover a new device."""
if device.get("ip") not in self.devices:
if device.get("gwId") not in self.devices:
self.devices[device.get("gwId")] = device
_LOGGER.debug("Discovered device: %s", device)