Closed oh2th closed 3 days ago
This causes any flow using the card to become disabled quite quickly and nagging from other members of the family, that the lights are not working again.
You can use logic cards in stead of homey script. This is how I intended it to be used. So use AND 'Action' includes 'hold_release' etc.
Yes, but the problem is those 10++ action events sent from mqtt, which basicly activates the "Action changed" trigger. This inturn means that the flow is run 10++ times for the same second. And the way Homey works this is causing the flow to be disabled.
My suggestion is, that there would be an addtional flow card for "Action
If mqtt is triggering 10+ events per second for a single device, I would say something is wrong with that device (or the way it is handled in z2m). I would suggest you ask the z2m dev to fix this. But you are welcome to do a PR on the homey app.
Found in your code this.setCapability(capVal[0], '---'); that caused multiple action changed trigger with ---, these seem to be put of action was received regardless the event. I left that alone now and added new trigger card to trigger only on the wanted event.
When using button-/switch-remotes that has "The action changed" trigger card, the flow may be triggered multiple times which causes unwanted results.
For example I have a Hue Tap Dial remote and trying to catch a specific action, one off: Buttons where N = 1, 2, 3, 4: button_N_press button_N_press_release button_N_hold button_N_hold_release
Dial rotate events: dial_rotate_right_slow dial_rotate_right_fast brightness_step_up dial_rotate_left_slow dial_rotate_left_fast brightness_step_down
but there is more events arriving either an empty or "---" string in action. Now I can use logic cards to filter the one I want, but when just doing a press/release on a button already fires: dial 1 action button_1_press dial 1 action --- dial 1 action --- dial 1 action dial 1 action --- dial 1 action --- dial 1 action --- dial 1 action button_1_press_release dial 1 action dial 1 action
all on the same second.
Could there be a second "Action [action] occurred" where action is a text argument for the flow card, used to match incoming action events and only trigger on matches?
Now I'm using HomeyScript to test the conditions, which inturn is slow, but does the trick.