Output_map like binary_sensor_map feature

Hi,

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?

Thanks

Regards,
Dmitry

Is this actually an ESPHome question?

And no you can not sum binary sensors. Only sensors with a numeric state.

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?

Yes, something like that:
you set value to 6 and get [0, 1, 1, 0] on GPIO outputs, bound to this virtual switch/button/output.

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.

Not as far as I know.
Not a feature that 99.99% of users are looking for…
Like interrupt based binary sensor or PWM duty cycle/frequency sensor…

Got it.
Thanks for your answers.