We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 88c71d3 + 5e7f7db commit 5012060Copy full SHA for 5012060
src/lib/helpers.py
@@ -249,12 +249,12 @@ def report_labels(
249
for label in labels_removed:
250
mqtt_devices[label].publish(False)
251
252
- for label, count in counter.items():
253
- if reported_label_count.get(label, 0) != count:
254
- attributes = {}
255
- attributes["count"] = count
256
- mqtt_devices[label].publish(True, attributes)
257
- reported_label_count[label] = count
+ for label, count in counter.items():
+ if reported_label_count.get(label, 0) != count:
+ attributes = {}
+ attributes["count"] = count
+ mqtt_devices[label].publish(True, attributes)
+ reported_label_count[label] = count
258
259
return labels, reported_label_count
260
0 commit comments