Is there by any chance an issue with Advanced Flows and Logic reading and/or evaluating values from number variables?
This seems like such basic behaviour that I can’t possibly be the first to try it, but I can’t yet see what I might be doing wrong.
I am currently on Homey Pro 2023, software version: 10.1.2-rc.1. I can’t remember if I was seeing this issue before enabling Homey experimental updates (in order to fix the initial issues with connecting to Philips Hue bridge with a large number of devices), but I was seeing this issue a week or so ago on version 10.1.0-rc.4, so it has lasted at least longer than 1 experimental SW update.
I have an advanced flow to control my outside (Hue) lights, including to turn them on 60 minutes before sunset. I was puzzled that it seemed to be turning on rather late, so added a few extra timeline notifications to help diagnose what was going on.
When “Date & Time: the sun sets in <0> minutes”; Then “Timeline: Create a notification: ”
When “Date & Time: the sun sets in <1> minutes”; Then “Timeline: Create a notification: <Sunset in 1 minute>”
When “Date & Time: the sun sets in <number_variable>”; Then “Timeline: Create a notification: <Sunset in <number_variable> minutes>”
Where the Variables panel shows my variable in the Numbers section with a value of 60, e.g.:
(hash symbol) number_variable: 60
The result of the above from yesterday was:
16:07: “Sunset in 1 minute”
16:08: “Sunset in 60 minutes”
16:08: “Sunset”
So, the calculation using an immediate value of <1> (1 minute before sunset) worked fine when compared to the immediate value of <0> (0 minutes before sunset), giving timeline notifications 1 minute apart, as expected.
But, the calculation using an indirect value of <variable_name> (from a number variable) did not work as expected, giving timeline notification at the same time as sunset, suggesting the value from variable was read or evaluated as 0. However the timeline message had managed to read the variable correctly, and displayed the value as 60.
I can also see suspicious behaviour more immediately, if I try adding a new advanced flow card, and see that it is showing number values from device parameters, but not from variables.
For example:
And “Logic < tag number > is less than < number >”
As I select a source for the first < tag number >, in the pop-up selection list, I see values listed against all the device parameters, but only “-” (no number value) alongside all the variables under the “Logic” group. I will try to attach a screenshot of that, and also from the variables tab.
Screenshot from selection list in "Logic < tag number > is less than < number > ":
(showing values against the device parameters, but only a “-” against my Logic number variables)
Screenshot from variables tab, showing values as expected against all my number variables: