Hey folks, I'm trying to set a variable based upon a device attribute, but the "Select Device" button doesn't list any devices. It's the same as this issue reported in Sept 2020: [BUG] Cannot Add Action to Set Variable to Device Attribute
Ultimately, I'm trying to set a dimmer to the attribute of another device, so I was going to set a variable when the dimmer changes, then use that variable to read into another device (unless there's a way to access a different device's attributes when setting a dimmer value).
Steps:
Create Rule
Click "Select Actions to Run"
Select option "Set Mode, Variables or File, Run Custom Action"
Under "Select Action" click "Set Variable"
Under "Select Variable to Set" click a variable (I'm using a "Number" variable, if it matters)
Under "Select operation" click "device attribute"
Click "Select device" -> Nothing opens in the list
I'm not able to replicate this behavior; the device list populates for me, even replicating this as closely as possible by choosing a global variable of type "Number." I assume you're not using any JavaScript blockers, have tried a cacheless refresh (e.g., Shift+F5) of the page, and maybe a different browser just to be sure?
(I was going to say that the bug linked to in the second post looks different, but there was related discussion there about issues with spaces in variable names. That much works fine for me now, and I can't replicate the rest of the problems either way.)
I think it may be related to having a single quote in the variable name, like Test's Test. Try using that as the variable name in step 5 above. I was able to replicate it with the single quote, but it works fine with a variable without a single quote.
You also cannot delete a Global Variable created with a single quote in it. (spaces work fine)
Would it be helpful if I add this to a bug tracker, or is this sufficient? (If a bug tracker, just point me in the right direction and I'll add the details/repro steps)
I'm replying to this old problem, mine is a little different.
I want to set a global variable from an 'action', in 'Basic rules' why can't I do this?
If anyone has a work around I'd appreciate a suggestion. I don't understand why it's not there??
Thanks!
If the option isn't there, which I was also not able to find, then it is likely that Basic Rules was seen as for those with simpler requirements than those utilising Global Variables. Happy to be proven wrong, but that would be my guess. So not likely a bug as such, just a feature that is satisfied elsewhere....
It looks like you can import a Basic Rule into Rule Machine. I would suggest looking at doing that and adding the necessary Action to set your Global / Hub Variable.