Esphome case statement. a case statement would be the most natural way to express this function, bu...

Esphome case statement.  a case statement would be the most natural way to express this function, bu...Esphome case statement.  a case statement would be the most natural way to express this function, bu...