piitaya / lovelace-mushroom

Build a beautiful Home Assistant dashboard easily
Apache License 2.0
3.52k stars 329 forks source link

[Feature]: Switch toggle option #1107

Open dhoeben opened 1 year ago

dhoeben commented 1 year ago

Requirements

Is your feature request related to a problem?

Request feature for an on/off switch in stead of only color or temperature control buttons.

Describe the solution you'd like

Please add feature

Describe alternatives you've considered

No response

Additional context

No response

fransyozef commented 1 year ago

ah .. so I'm not the only one searching for a mushroom switch. Kindly request this feature also.

dhoeben commented 1 year ago

ah .. so I'm not the only one searching for a mushroom switch. Kindly request this feature also.

I now managed to workaround the issue with stack in card and some trial-and-error. See my yaml below. I still need to figure out how to cope with the brightness slider, but that’s for later. Hope it help (or at least a bit).

        - type: custom:stack-in-card
          mode: horizontal
          cards:
            - type: custom:mushroom-light-card
              icon: mdi:looks
              entity: light.boog
              layout: horizontal
              show_brightness_control: true
              secondary_info: none
              collapsible_controls: true
              tap_action:
                action: more-info

            - type: custom:button-card
              entity: light.boog
              show_name: false
              state:
              - value: 'off'
                icon: mdi:toggle-switch-off-outline
                color: grey
              - value: 'on'
                icon: mdi:toggle-switch
                color: orange
              styles:
                card:
                - height: 66px
                - width: 100px
bilogic commented 4 months ago

There is a Switch on/off in the image of README.md, now.... where is it hidden? haha