I really hate using virtual switches for things. Just my preference. I have several rules that I don't want to trigger on holidays - like the ones that wake me up in the morning. I know I could do this with a virtual switch but I feel like an isHoliday variable is a better route. Is there a way to set a global variable from app? Like using the RM API? Or am I just being stupid? @bravenel
Yes, you can. If you use a Global Variable connector, the connector device is exposed to all other apps. You can change it the way you would any other attribute. In fact, if you use the boolean connector, it is exposed as a switch that can be turned on and off like a virtual switch. So, you get the best of both worlds.
here is another option. create a mode: holyday, then creat a rule to pause rule X,Y, if mode is holyday.
You would then have to add the mode HolyDay to all of your other automations that run off of mode. Adding a new mode is not an easy task if your system does anything by mode already.
Well, I wouldn't mind the work... but you're maybe right. It depends on how you use modes and stuff. In my case it's not that of an impact since holyday would just be just a stricter version of away
Why would it be a stricter version of away? You'd be home?
okay, got it. In my country we use the word holyday for vacation. And say we have free time, when we don't have to go to work... there's the confusion. sorry, my bad.
Ah...European? The OP was talking about what you would call bank holidays.
yep.... the land of money, cheese and expensive watches.
Hmm a mode could work. The challenge is mode manager might mess it up because I already have it switching based on time of day and my alarm system being set as away.
About your answer to then question. You mentioned:
"Yes, you can. If you use a Global Variable connector, the connector device is exposed to all other apps"
My questions is How?
I am new in hubitat trying to code ...
I created the variable. I used the global variable connector in Rule Machine..
I know that I can for example reference a switch in my code like:
input "switches", "capability.switch", title: "Control these switches", multiple: true, required: false, submitOnChange: true
But what i need to write for the RM Connector Variable?