Enum variables

As I keep building out my advanced flows, I find myself missing the ability to use variables that have a limited set of values.

Yes, I can hack something up using the other types, but this invariably leaves things open to impossible states, such as two booleans that should’ve been mutually exclusive not being mutually exclusive, or a numeric variable being 4 when the only valid states are 0-3.

An enum type where I could define the modes of my office to be either hacking, meeting or cleaning would simplify the flow logic greatly, while also making them less error prone.

I’m missing that too, and ideally combined with a When-card that reacts to a state variable going to a specific state.
Currently using text variables and the Flow Event Bus app but I think it would have been a useful addition to the base system.

There is a need to define a variable that can have only a limited set of values. These values to be created when the variable is created.

When the variable is to be filled with a new value the selection is only from the available list of values.

In this way the usage of Room Status or Mood status or Electricity Price status or Heating status can be limited to selected values, preventing storing the value ‘Centre’ when in other flows only ‘Middle’ is checked.

Compare this to the ‘True/False’ variable where the list is limited to two values, this new type can then be limited to a user defined set of values.

As a work-around you can create your own ‘picker list’ with predefined values in an Advanced Virtual Device (from the Device Capabilities app).

You can then act on changes in the selected item in flows or use its current value - which is exposed as a tag - in flows.

Below an example of a predefined list of operating modes.

Thanks a lot!