Skip to content

Commit 6d48aeb

Browse files
author
James Boulton
committed
tidy up
1 parent d7204f8 commit 6d48aeb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

dashio/dash_connection.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,13 +366,12 @@ def run(self):
366366
device_id = msg_l[1].decode().strip()
367367
except IndexError:
368368
continue
369+
data_topic = f"{self.username}/{device_id}/data"
369370
if control_type == b'ALM':
370371
data_topic = f"{self.username}/{device_id}/alarm"
371372
control_type = ""
372373
elif msg_to == b"ANNOUNCE":
373374
data_topic = f"{self.username}/{device_id}/announce"
374-
else:
375-
data_topic = f"{self.username}/{device_id}/data"
376375
logger.debug("DASH Tx →\n%s", data.decode().rstrip())
377376
self._dash_c.publish(data_topic, data.decode())
378377
if self.connection_state == ConnectionState.DISCONNECTED:

0 commit comments

Comments
 (0)