swiss-army-knife-card
swiss-army-knife-card copied to clipboard
Idea: support some sort of input_select for tab like or content toggle like behavior
The Problem To Be Solved
It would be nice if a state or something like that could be used to toggle different versions of the visualization.
Take for instance HTML tabs or content toggles: the state of some variable determines which parts are visible, and which parts are not.
Using a state or radio button, or whatever one could:
- select brightness to show a brightness slider around a light
- select color temperature to show a color temperature slider around a light
And that without sacrificing screen space.
Additional background:
Related Issues (if any)
(Optional): Suggested Solution
The 'toggle' or input select must be a tool of course, but implementation can use different directions:
A single tool which is just setting a variable to a certain state using buttons.
- use a global variable or a local variable (scope local) just for the MMI to do things
- by using an entity, ANY tool can use this as a state and act upon that
- if a toolset would be able to use an entity, that toolset could enable/disable complete toolsets, and thus tools. That saves a lot of YAML code and makes it much easier to implement for the end user.
- a tool should be able to listen to more than 1 entity, ie should have entity_indexes as a variable. This also means that animations and such should have state (which is state_0), state_1, etc. to address all the entities.
- type: inputselect
inputs:
- one:
value: on
toolset: # single toolset to display the input. can be a rectex orso for selecting or whatever
tools:
- tool:
user_actions:
special local-service for local variable or whatever
- two:
value: off
toolset:
- tools:
A single tool with a list of toolsets and tools, ie hierarchical implementation
- this would be nice, but a lot of work compared to the solution above
- the hierarchy is shown and must be clear to the user, but again: more work for the developer, ie me :smile:
(Optional): Alternative Solutions
See above.