piitaya / lovelace-mushroom

Build a beautiful Home Assistant dashboard easily
Apache License 2.0
3.67k stars 339 forks source link

[Feature]: Button card #1324

Open martindybal opened 10 months ago

martindybal commented 10 months ago

Requirements

Is your feature request related to a problem?

I'd like to be able to use <mushroom-button> separately. It would be useful for various actions on my dashboard. In my scenario, I use components to navigate to the dashboard of each component. Currently I can't use a single button style

image
square: true
type: grid
columns: 4
cards:
  - type: custom:vertical-stack-in-card
    cards:
      - type: custom:mushroom-light-card
        entity: light.103_office_biodynamic_light
        layout: vertical
        name: Světla
        fill_container: true
        secondary_info: none
        tap_action:
          action: navigate
          navigation_path: /lovelace-lights/dashboard
      - type: custom:mushroom-entity-card
        icon: mdi:lightbulb-group-off-outline
        entity: button.press_104_sitting_room_switch_light
        layout: vertical
        secondary_info: none
        tap_action:
          action: call-service
          service: light.turn_off
          target:
            entity_id: light.103_office_biodynamic_light
        primary_info: none
        icon_color: black
  - type: custom:mushroom-cover-card
    entity: cover.all
    fill_container: true
    layout: vertical
    secondary_info: none
    name: Stínění
    show_buttons_control: true
    tap_action:
      action: navigate
      navigation_path: /lovelace-shades/dashboard
  - type: custom:vertical-stack-in-card
    cards:
      - type: custom:mushroom-fan-card
        entity: fan.pichler
        fill_container: true
        layout: vertical
        secondary_info: none
        icon_animation: true
        name: Větrání
        tap_action:
          action: navigate
          navigation_path: /lovelace-ventilation/dashboard
      - type: custom:mushroom-entity-card
        entity: select.pichler_mode
        icon_color: black
        secondary_info: none
        primary_info: none
        layout: horizontal
  - type: custom:mushroom-lock-card
    fill_container: true
    secondary_info: none
    layout: vertical
    name: Zámky
    hold_action:
      action: navigate
      navigation_path: /lovelace-security/dashboard
    entity: lock.locks

Describe the solution you'd like

Custom card

      - type: custom:mushroom-button
        icon: mdi:lightbulb-group-off-outline
        tap_action:
          action: call-service
          service: light.turn_off
          target:
            entity_id: light.all
        icon_color: black

Describe alternatives you've considered

No response

Additional context

No response

bdsoha commented 10 months ago

Seems related to: