Skip to content

Commit

Permalink
change order of action in press_callback
Browse files Browse the repository at this point in the history
  • Loading branch information
pszafer committed Jan 24, 2025
1 parent b5f32ce commit 100ea2f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 8 additions & 7 deletions boneio/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,14 @@ def generate_payload():
action = action_definition.get("action")
action_output = action_definition.get("action_output")
action_cover = action_definition.get("action_cover")
if action == MQTT:
action_topic = action_definition.get(TOPIC)
action_payload = action_definition.get("action_mqtt_msg")
if action_topic and action_payload:
self.send_message(
topic=action_topic, payload=action_payload, retain=False
)
continue
output, action = self.get_output_and_action(
device_id=device_id,
action=action,
Expand All @@ -740,13 +748,6 @@ def generate_payload():
)
_f = getattr(output, action)
await _f()
elif action == MQTT:
action_topic = action_definition.get(TOPIC)
action_payload = action_definition.get("action_mqtt_msg")
if action_topic and action_payload:
self.send_message(
topic=action_topic, payload=action_payload, retain=False
)
else:
if not action:
_LOGGER.warning(
Expand Down
2 changes: 1 addition & 1 deletion boneio/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# flake8: noqa
__version__ = "0.9.3"
__version__ = "0.9.4dev2"

0 comments on commit 100ea2f

Please sign in to comment.