Skip to content

Commit b9e4146

Browse files
committed
broadcast-relay: make it work with older versions of the scanner
1 parent 36e3d11 commit b9e4146

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/broadcast-relay.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,10 @@ def send_broadcast():
167167
"""
168168
Send broadcasts to query for newer v3.5 devices
169169
"""
170-
return send_discovery_request()
170+
our_broadcasts = send_discovery_request()
171+
if not our_broadcasts:
172+
our_broadcasts = {}
173+
return our_broadcasts
171174

172175
if __name__ == '__main__':
173176
disc = 'Listens for broadcast packets from Tuya devices and sends them via unicast to App clients. Useful to make the app work on broadcast-blocking WiFi networks.'

0 commit comments

Comments
 (0)