AmoebeLabs / swiss-army-knife-card

The versatile custom Swiss Army Knife card for Home Assistant allows you to create your unique visualization using several graphical tools, styling options and animations.
236 stars 20 forks source link

Idea: support some sort of input_select for tab like or content toggle like behavior #158

Open AmoebeLabs opened 2 years ago

AmoebeLabs commented 2 years ago

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:

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.

- 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

(Optional): Alternative Solutions

See above.