Change device trigger to use the new event listener and add support f…#197
Open
acdu1 wants to merge 2 commits intosanjoyg:mainfrom
Open
Change device trigger to use the new event listener and add support f…#197acdu1 wants to merge 2 commits intosanjoyg:mainfrom
acdu1 wants to merge 2 commits intosanjoyg:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…or more events.
Describe your changes
Briefly describe your changes
✅ Changes made (issue #195 fix)
You can now use IKEA lights as device triggers in automations (also keeps existing controller button triggers).
🔁 device_trigger.py updates
CONTROLLER_TRIGGER_TYPES = ["single_click", "long_press", "double_click"]LIGHT_TRIGGER_TYPES = ["turned_on", "turned_off"]async_get_triggers(...):light, produce these two triggers:turned_onturned_offasync_attach_trigger(...):stateplatformentity_id= light entityto="on"or"off"dirigera_platform_eventbus event.🔁 hub_event_listener.py updates
_fire_dirigera_event(...)for unified event emission.on_message()deviceStateChangedpath:isOnfor light entityisOnchanged, fireturned_on/turned_off_apply_scene_actions(...):isOn, publish matchingturned_on/turned_offevent.💡 What this solves
🧪 Validation status
get_errors()shows no issues in modified filesChecklist before submitting a pull request
requirements.txtandmanifest.jsonChecklist for reviewer
🤖 Generated with Claude Code