Skip to content

Releases: custom-cards/button-card

Layout support

23 Apr 07:14
0cb256e
Compare
Choose a tag to compare

New features

  • show_units: true/false

  • units: overrides the default units of a sensor

  • overflowing text will be cut at the end with ...
    image

  • layout:
    Fixes #103
    This option enables you to modify the layout of the card.

    It is fully compatible with every show_* option. Make sure you set show_state: true if you want to show the state

    Multiple values are possible, see the image below for examples:

    • vertical (default value if nothing is provided): Everything is centered vertically on top of each other
    • icon_name_state: Everything is aligned horizontally, name and state are concatenated
    • name_state: Icon sits on top of name and state concatenated on one line
    • icon_name: Icon and name are horizontally aligned, state is centered below
    • icon_state: Icon and state are horizontally aligned, name is centered below
    • icon_name_state2nd: Icon, name and state are horizontally aligned, name is above state
    • icon_state_name2nd: Icon, name and state are horizontally aligned, state is above name
      layout

temp fallback to simple click, confirmation custom text and card-modder support

22 Apr 17:21
Compare
Choose a tag to compare

New features

  • confirmation now takes a free text to display in the confirmation box
  • Fallback to simple click support when longpress is not found. Make sure you read this for long press support!

Fixes

  • Fixes #114 (rounded corners with color_type: card) and supports card-modder now

Breaking changes

  • confirmation is now taking a string.

Long Press support and layout issues fix

21 Apr 19:46
Compare
Choose a tag to compare

New Features

  • Introduce the same ripple effect as the default button
  • Long Press support (Fixes #55)
    - type: "custom:button-card"
      entity: switch.my_switch
      name: more-info
      hold_action:
        action: more-info
    Thanks @thomasloven for the piece of code to achieve this easily.

Fix

  • It fixes the button staying selected after a click (Fix #93)
    Apr-19-2019 13-22-21

  • It fixes misalignment issues (Fix #89)
    Home_Assistant

New show_name and name per state

21 Apr 10:46
7c7afb4
Compare
Choose a tag to compare

New features

  • Possibility to define a name per state and defaults to retrieving entity's name if no name is provided

Breaking change

  • Introduces a new show_name boolean parameter (default is true) to display the name or not. Before if the name property was ommited, nothing would be displayed. Now it uses entity's friendly name or entity's name by default unless redefined in state or general config

Url spin me right round

19 Apr 18:27
Compare
Choose a tag to compare

New Features:

  • New url option in tap_action to open a new tab
  • New spin option added to state object to animate spinning

Fixes

  • Restore rounded corners

Breaking Changes

  • Deprecate icon: attribute

Confirmation option

18 Apr 00:31
82aad39
Compare
Choose a tag to compare

New confirmation option that produces a popup confirmation dialog

tap_action, color_off, state style, more-info

17 Apr 23:08
7deab5b
Compare
Choose a tag to compare

Lots of breaking changes in this release but a big push towards alignment with other standards and some cool new features. Great work @RomRider!

Breaking Changes

  • color_off is now deprecated, use state instead if you want to redefine the color when off
    Instead of:
      - type: "custom:button-card"
        name: Switch
        entity: switch.main
        color: red
        color_off: green
    Use:
      - type: "custom:button-card"
        name: Switch
        entity: switch.main
        color: red
        state:
          - value: 'off'
            color: green
    Or:
      - type: "custom:button-card"
        name: Switch
        entity: switch.main
        state:
          - value: 'off'
            color: green
          - value: 'on'
            color: red
  • default_color is deprecated as it seems redundant with color (when light is not rgb). For rgb light, you can still define a specific color for the off state for example.
  • service has been deprecated in favor of tap_action, see below
  • action has been replaced by tap_action to mimic the default button card and allow for future options like hold_action
  • more_info renamed to more-info, more_info still works
  • service now takes the full service name light.turn_on
  • Add default entity icon support, Fix #53, add show_icon to decide whether to display the icon or not

Others

  • blink animation support, see examples
    blink-animation
  • tap_action supports navigate. Fix #75 & Fix #31
  • Support for style definition in state. Fix #41
  • Disable click when not needed
  • Refactored the code for faster rendering
  • Documentation update
  • Fix #71

Fix state icon for color_type: card and equal operators

14 Apr 21:36
Compare
Choose a tag to compare
  • Fix state icon for color_type: card and equal operators

  • Fix missing icon when no icon in default config and state used

Add state operators

13 Apr 20:31
09459f0
Compare
Choose a tag to compare
Merge pull request #80 from RomRider/with_operator

Add operators to state

🔧 convert to mwc-button and fix styles

23 Feb 00:15
a46082c
Compare
Choose a tag to compare

Support for HA v0.88 after conversion to mwc-button.