Virtual Switch vs Boolean Hub Variable

What is faster and preferable to use: Virtual Switch or Boolean Hub Variable (no connector)?
There are already few related topics but they are still somewhat inconclusive and not quite clear.
Both could be use for the same purpose such as Status Reporting and/or Trigger Event.
Sure, I am using only Local Boolean Variables within the same rule.
But if a few different RM rules needs to see it which one is better to use?

While it's hard to say anything specific without knowing more details, in general, a hub variable is "lighter" than a device (less information to go along with it and only a single possible event that can be generated, one when the value changes). The only downside is that not all apps can work directly with hub variables; some can only work with specific types of devices. This is the case more and more rarely now, but originally, this is more or less why the concept of connectors was invented (which are not at all different from devices since that is exactly what they are).

In other words, if you have the ability to use a hub variable, that would be my recommendation.

But also: if you're doing something so unusual that "faster" between things that are generally already fast matters, I'd consider why first. :slight_smile:

3 Likes

Thank you for the confirmation, I was thinking the same.