[SOLVED] Timed on / off with inputted variable on dashboard

hi hubitat folks and happy holidays.
I'm looking for an easy (but maybe not that easy) switching solution.
1, created a virtual switch
2, in rule machine - Legacy - I was able to define a global variable as "living-room-mood-light-duration"
3, since all my rules are 4.1 and there's 5.1 installed automagically, seems 5.1 can't use my created global variable so I can't refer to it. When clicking to "create new rule" it automatically creates it in RM5.1 where I can't refer to global var living-room-mood-light-duration. I want to input the time as a single number in the dashboard and use it as a "timeout"
4, what virtual device I should create which allows me to enter a Number on the dashboard?
I can refer to my RM4.1 added variable as virtual device. but can't add global var in RM5.1 :frowning:

my tile on the dasbboard I'm about to use:
Screen Shot 2021-12-20 at 13.28.45

Question, how can I do that?
seems RM4.1 and RM5.1 are a bit messed up as all my old rules are in 4.1 .
all help appreciated.

I would try to clone an existing 4.1 rule and see if you can modify it for your needs.

well this is a new rule I only can create in 5.1 while I can't add global variable in 5.1. Can I do that? I don't want to touch my existing rules now, I'd like to add a new one with a global var but seems I can't do that.

Can you use the variable connector created in 4.1 as a virtual device for 5.1? If so, you should be able to use it as the intermediary.

Can only create the rule in 5.1 because 5.1 has features not available in 4.1?

Cloning a rule in 4.1 will copy and existing rule and modifying the cloned rule won't have any impact on your existing rule. If you're concerned you'll mess something up, backup your database before cloning your rule. You can always load your backup and get back to where you started.

so this is the variable definition in rule manager 4.1 (legacy)

and as a next step I want to use it here as a delay:

but the variable is not showing up in the dropdown.

if you tell me how to add a global variable in 5.1, I will. that would be the best. but there's no option for that or I'm too dumb to find it.

You would need access the variable attribute in the connector from 4.1

Settings | Hub Variables

1 Like

oh I'm an idiot!!! thank you!

going to check how can I migrate my rules to 5.1 if there's a "click and done" way though I doubt. not sure if 4.1 will be fully deprecated and removed at some stage, hope not. I've sweat creating some rules I'd just don't want to touch :slight_smile:

There isn't a way to move 4.1 rules to 5.1. It has been stated that Rule Machine Legacy won't go away. It will continue to be available but you won't be able to create new rules in it. Like I said, though, you can clone existing 4.1 rules and essentially create "new" rules - just not from scratch.

1 Like

thank you!

1 Like

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