Add method select position and get position to input_select

Add method select position and get position to input_select would help on a good number of automation.

Can you provide an example?

Yes, I’m currently working on an automation which translate zha_event from an unsupported remote into call to service.
With an input_select containing entity Id, I would like bind it to button position.

Maybe it’s not the idiom to follow?

What you are asking for is a dictionary with keys and values, but an input select is just a list.

Please show your current automation and probably there’s some elegant way to solve your issue.

I have thought about this before and it would have been useful. It required significant work around to advice the same functionality.
Useage case I have considered : -

  1. Bin collection sequences - if you have a repeating pattern then just increment a counter equivalent to the pattern, the counter update then determines the position of an input select for the human readable interface. - my bin collection is 4 week pattern. 1. Grey & Green 2. Black & Green 3. Grey & Green 4. Blue & Green - my issue here was that HA considers positions one and three to be the same (they aren’t as the sequence would be offset) so a restart needed manual checking that the sequence was still correct (Uurgh !) a number would cure this. Instead I had to change 3. To Green and Grey. This narks me.
  2. Automations for floor cleaning you could rotate patterns of rooms cleaned depending on usage and need. So again inserting repeats and not getting lost on restarts etc.

@letroll, you can vote for your own request you know