Is there a way I can change the description of a rule based on a hub variable?
Hello:
I have several rules for controlling my irrigation (several sprinklers), each rule has two associated hub variables.
For example, for my blueberries I have 'GV_run_mins_blueberries' a number = 10 and GV_allow_blueberries a boolean = true.
In each rule, in the 'Name this Rule*' part I have it read...
"Irrigate: When Blueberries turns ON (%GV_run_mins_blueberries% minutes) (Allowed=%GV_allow_blueberries%)"
That shows...
"Irrigate: When Blueberries turns ON (10 minutes) (Allowed=true)"
This is rather convenient.
I'd prefer it to read 'NOT Allowed' if the variable is false, and 'Allowed' if the variable is true.
Something like...
"Irrigate: When Blueberries turns ON (10 minutes) (NOT Allowed)"
assuming the allow variable is false, or if the variable is true...
"Irrigate: When Blueberries turns ON (10 minutes) (Allowed)"
Can this be done?
In C, in printf(), I might say something like ?(GV_allow_blueberries==true : '', 'NOT')
Of course this did not work in Hubitat description.
Thanks, Mark.