Custom capabilities starting with alarm_ , meter_ and measure_ will automatically try to trigger a Flow. You only need to define this Flow trigger in your /app.json .
Numbers
Calling setCapabilityValue('measure_my_number', 1) will try to start a Flow trigger with ID measure_my_number_changed , with a Tagvalue .
And so I though I had ‘easy’ ‘changed’ trigger flow cards. They show up and I can use them in my flow as expected. The only problem I have is that they do not fire. Can anyone take a look at what I am doing wrong here? The values are correctly updated, and the naming is what it should be, so what is going wrong?
The one I was testing is on line 594.
It’s name is:
measure_current_temp_changed, it is a trigger flow as required.
The linked capability is on line 1150 and 1227 and named measure_current_temp. It is a number capability just like in the example.
For the trigger to work the trigger must have a tag/token with id value, that too is present, I don’t know what I am missing.
I can see the current temp property in the device being updated, but the notification that I should receive when it is changed does not come. Manually testing my test flow does result in a notification.
This app can be installed from this link so you can test the on change triggers for yourself. It’s already certified, but I won’t publish to live prior to there being some nice on change flow triggers that properly work. Perhaps I’ll even wait for Homey v5 to go live before publishing.
I realize this is written for the unstable SDK v3, so perhaps this is still a bug?
Should I just keep my code as it currently is and wait for this to be fixed, or is the documentation incorrect and should I be doing something different?
It is already testable except for the fact that the triggers don’t get fired, except for the one trigger that is fired after manually requesting the latest data via the action card.
It’s already running for a couple of days now on my own Homey, without any other issues whatsoever.