Skip to content

Commit

Permalink
Merge pull request #456 from lpaolini/patch-1
Browse files Browse the repository at this point in the history
Expose numeric ids for MQTT definitions
  • Loading branch information
yozik04 committed Apr 17, 2024
2 parents ac83cd0 + 8d59dfa commit 5411427
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions paradox/interfaces/mqtt/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,15 +461,16 @@ def _on_ready(self):
if i not in labels:
continue

for attribute in definitions[i]: # attribute
definition = {**(definitions[i]), "id": i}
for attribute in definition: # attribute
if element_type == "user" and attribute == "code":
continue
self._publish(
f"{cfg.MQTT_BASE_TOPIC}/{cfg.MQTT_DEFINITION_TOPIC}",
element_type,
labels[i]["key"],
attribute,
definitions[i][attribute],
definition[attribute],
)

if (
Expand Down

0 comments on commit 5411427

Please sign in to comment.