Question about built-in local variables


Hub Type: C7 Pro

I believe I've found a bug related to the following:

If you have a rule used to monitor the presence of your mobile device and set a virtual present switch, then later update that rule to change the phone, the local variables shown in the actions cannot be updated to correctly reflect the new phone.

In the image below you can see the phone now shows as "Steve's S24 Ultra", but the local variables still reflect "Steve's GS21 Ultra".

I've tried to change that in the actions page but those local variables don't show so I assumed they're system generated.

Not sure if this will affect the operation of the rule, but wanted to share this in case the dev's want to look into it.

I do not see any evidence of a problem here. If you suspect there is one, you'll need to enable all logging for the rule, then provide the output from Logs, filtered to just this rule, that demonstrate the problem.

Here's what I do think is happening. Keep in mind that these built-in variables generally relate to the triggering of the Rule, per the documentation. Your rule has likely not triggered since you swapped the device (a manual Run Rule Actions does not affect this since there is no triggering device, and changing the trigger device per se won't do anything without an actual trigger). The variables are still set to their last values, and these values are correct given the above.

Also, this hub model does not exist, so that must be a typo. You'll also see (in the placeholder text you had to erase to create this post) that it's a good idea to also provide your hub platform version and that you can find both of these in Settings > Hub Details. From your screenshot, however, I can tell you are on an older version. This is particularly important to note if you are reporting a bug, as newer versions often include these kinds of fixes (though I still don't think your case is one).

5 Likes

Ah, I think that's the issue. I haven't trigger the rule yet. Just updating it. Thanks for the clarification. I was trying to ensure I had changed everything.

1 Like

Your rule definitely triggered at some point in the past, or these wouldn't be set at all. It appears to not have triggered since you made the changes -- which I suppose could be what you meant.

Looking at your rule more closely: it appears you aren't even using these variables in your rule, so their values have no consequence either way. They're just built-in local-type rule variables that can be used similarly to other variables in a rule, e.g., in places where you can use text including variable placeholders (notifications, logs, etc.) or have the ability to choose variables as part of the actions. You aren't doing that anywhere.

I'd suggest reading the RM documentation I linked to above to learn more.

While there, you'll also see your rule is missing the final END-IF, although that's of no consequence here since that's the end of your actions anyway and RM isn't picky enough to bark about that. But it's a good habit. :slight_smile:

5 Likes