unfoldedcircle / core-api

API specifications for Remote Two by Unfolded Circle
Creative Commons Attribution Share Alike 4.0 International
70 stars 1 forks source link

Extending on/off switch entity to multi-state switch or list entity #29

Open wawa79 opened 1 year ago

wawa79 commented 1 year ago

Is your feature request related to a problem? Please describe.

Anticipating the openHAB integration, I wonder how will be modeled openHAB items with multiple states. For example : house mode can be AWAY/HOME/NIGHT, alarm modes, audio inputs, light scene modes... Plenty of my items are multistate item.

Describe the solution you'd like

It would be great to "extend" the switch to a multistate switch that could display as a list, a dropdown list or a multi-options item. Such an item could handle the commands NEXT and PREVIOUS to change from one mode to the next (as TOGGLE does for a 2-states switch)

Describe alternatives you've considered

No idea how to model multistate items by now !

Additional context

zehnm commented 7 months ago

This is likely related to Home Assistant's input and input_select entities: https://github.com/unfoldedcircle/feature-and-bug-tracker/issues/211

Selecting an item from a list will is a planned feature and will be added to the supported entities.