Skip to content

feat: refactor triggers - #37

Merged
damru merged 1 commit into
mainfrom
chore/refactor-triggers
Jan 28, 2026
Merged

feat: refactor triggers#37
damru merged 1 commit into
mainfrom
chore/refactor-triggers

Conversation

@damru

@damru damru commented Jan 28, 2026

Copy link
Copy Markdown
Owner

🥇 Kudos to @JonMerlevede in #33 for this.

This pull request updates the ikea_simple-remotes_control-anything.yaml and ikea_simple-remotes_control-light.yaml blueprints to improve compatibility and flexibility with both MQTT and ZHA integrations. The main changes introduce conditional enabling of triggers based on which integration is available, and simplify action logic to reduce duplication and improve maintainability.

Conditional Trigger Enablement and Logic Simplification:

  • Added trigger_variables to both blueprints, defining mqtt_enabled and zha_enabled flags to detect available integrations and conditionally enable triggers accordingly.
  • Updated all relevant triggers in both blueprints to include an enabled field, which uses the new variables to ensure triggers are only active if the corresponding integration is available.

Action Logic Refactoring:

  • Simplified action sequences by removing redundant choose blocks and using the new enabled flags on wait_for_trigger steps, making the automation logic cleaner and easier to follow.

These changes make the blueprints more robust and adaptable, ensuring they work seamlessly whether MQTT or ZHA integration is used.

@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 28, 2026
@damru
damru merged commit dba6638 into main Jan 28, 2026
2 checks passed
@damru
damru deleted the chore/refactor-triggers branch January 28, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant