I see the great feature of combining multiple binary sensors into a single one using different logic, like “sum”, when we may interpret multiple sensors as bits of a single integer.
On the other hand, I don’t see any similar for outputs, i.e. switch
Are there any plans to implement the control of multiple outputs in a group using single integer value, as a complimentary logic to sensors?
Sure, my question is about ESPHome features. Apologies if I was not clear enough.
I was talking about binary_sensor_map alternative for outputs: switch, button, output
What you are looking for actually?
That you give numeric input, let’s say 6 and get binary representation on four switches OFF-ON-ON-OFF?
Or something else?
Even if there’s not a component for that, using just lambda you can read the single bits from a number(byte) and set the switches according to the bits.
For sure, lambda helps. Using it exactly as you described. I’m just wondering if there a way to minimize and simplify coding in case I’m reinventing the wheel.