Decimal Variable Value not updating String Variable

I am trying to create a Rule 5.1, that has a local variable (decimal), and on the last line of the rule, have the value of this local variable update a Hub Variable (string). It does not work. Here is the rule:


I can make this work by instead of using one local decimal variable and one Hub string variable, I use one Hub decimal variable and one Hub string variable. The following rule does update correctly, only difference is both variables are "Hub Variables":

image
It is no big deal, as I can simply use two hub variables, although I would rather not, since I will never need the "Raw" variable in anything else. I can also confirm, the problem I am seeing did not exist in Rule 5.0

Can you make it a local string variable first then use that to set the Hub string variable?

Nope, if I make the local variable a "String Variable" I am unable to populate this string variable with the custom attribute that is a number. In other words, the drop down list that hubitat creates when I select "custom attribute" will not include "pressure", since this custom attribute is numerical.

I meant the 3rd line of your actions, make that a local string variable. Add a 4th line to set the Hub string variable to the local sting variable.

Just tried, doesn't work. Same problem. Thanks for the suggestion, it was a good idea to try.

Ignoring the source of the value, once I put it in a decimal string I can get this to work. Since it's a simple rule, maybe recreate it and see if you get a different result.

1 Like

Recreated the rule from scratch, now it works! Thanks for the help. The only changed I made was for my local variable to have no spaces (like your example), not sure if this is what made the difference. But happy now that it is working.

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.