Virtual Switch and Dashboard function

I finished migrating devices (26 bulbs, switches, motion sensors etc) and basics routines from Wink several months ago and have been enjoying my Hubitat. Now I'm getting into more advanced functions, routines, etc.

I have a Rule Machine (RM) app which I generally have stopped unless I need it to be in a running condition. I would love to be able to be able to effectively stop and start that rule via a dashboard tile on demand instead of stopping and starting via the app configuration page directly. This led me to some research on various community pages etc. I fairly quickly found the approach of creating a Virtual Switch (VS), then setting that VS as a condition within the RM app itself. Cool!!! Makes sense!

So, I created the VS. I added the condition that the VS must be 'on' in my rule. So far so good. However, when I add the VS tile to a dashboard, using the 'switch' template, it just shows up as a grey question mark. No option to 'switch' on/off.

What did I miss?

Thanks in advance!!!

1 Like

Double-check the device selection in the Tile Edit dialog for the tile. Also, move the switch through an on/off states to see if it just needs to see state changes to display the current state.

Also, try clicking the green tick to refresh the dashboard

1 Like

Thanks so much for the insanely fast response!!

Oddly enough, the 'checking of the tile device selection did the trick'! While the VS device I had created was selected, the moment I clicked on it again, the tile updated and now works. Go figure!

Anyway, thanks again! Hopefully this topic can help others.

:sunglasses:

1 Like

No worries. I have that happen every now and again. Never worked out why, just do what I described and it usually fixes it.

One thing, with your RM rule, are you using a Required Expression? Or a condition in the Actions? The Required Expression might be the way to go.

1 Like

I did have it setup as a condition on the action. Based on your advice, I have now removed what I had setup and have now set it as a Required Expression.

What is the particular reason you recommend this? Does this basically stop the rule from running at all unless the condition is met? As apposed to the rule runs every time the trigger happens?

Yes. To be fair, there isn't anything from what you have described to suggest that you need to use the RE, but there are times where it's useful and, personally, I think it acts as a nice way to separate restrictions on the rule running vs those conditions that drive different behaviour when the rule runs.

2 Likes

Awesome! Thanks again!!

:+1: :+1:

3 Likes

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