Not convert to a binary number as such, that was just for illustration. But yes, mapping a set of binary inputs to a set of defined outputs (likely scenes).
Basically, I am looking for a way to define conditions between inputs and outputs in a more compact way, rather than using too much Boolean logic.
Concretely, suppose I had these four automations:
If a changes or b changes:
If (a=off and b=off) then scene 0
If a changes or b changes:
If (a=on and b=off) then scene 1
If a changes or b changes:
If (a=off and b=on) then scene 2
If a changes or b changes:
If (a=on and b=on) then scene 3
Overall, for a larger set of inputs and scenes, this becomes unwieldy.
Instead I want to define a single action:
If a changes or b changes:
Collect all inputs a, b.
Array = (
(Scene 0, Scene 1),
(Scene 2, Scene 3)
)
Set scene to Array(a,b)
I suppose it would always call out to a shell script but I’m wondering whether these a simple way to do this using the web interface