Releases: custom-cards/button-card
Layout support
New features
-
show_units
: true/false -
units
: overrides the default units of a sensor -
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 setshow_state: true
if you want to show the stateMultiple values are possible, see the image below for examples:
vertical
(default value if nothing is provided): Everything is centered vertically on top of each othericon_name_state
: Everything is aligned horizontally, name and state are concatenatedname_state
: Icon sits on top of name and state concatenated on one lineicon_name
: Icon and name are horizontally aligned, state is centered belowicon_state
: Icon and state are horizontally aligned, name is centered belowicon_name_state2nd
: Icon, name and state are horizontally aligned, name is above stateicon_state_name2nd
: Icon, name and state are horizontally aligned, state is above name
temp fallback to simple click, confirmation custom text and card-modder support
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
New Features
- Introduce the same ripple effect as the default button
- Long Press support (Fixes #55)
Thanks @thomasloven for the piece of code to achieve this easily.
- type: "custom:button-card" entity: switch.my_switch name: more-info hold_action: action: more-info
Fix
New show_name and name per state
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 istrue
) 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
New Features:
- New
url
option intap_action
to open a new tab - New
spin
option added tostate
object to animate spinning
Fixes
- Restore rounded corners
Breaking Changes
- Deprecate
icon: attribute
Confirmation option
New confirmation
option that produces a popup confirmation dialog
tap_action, color_off, state style, more-info
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, usestate
instead if you want to redefine the color whenoff
Instead of:Use:- type: "custom:button-card" name: Switch entity: switch.main color: red color_off: green
Or:- type: "custom:button-card" name: Switch entity: switch.main color: red state: - value: 'off' color: green
- 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 withcolor
(when light is not rgb). For rgb light, you can still define a specific color for theoff
state for example.service
has been deprecated in favor oftap_action
, see belowaction
has been replaced bytap_action
to mimic the default button card and allow for future options likehold_action
more_info
renamed tomore-info
,more_info
still worksservice
now takes the full service namelight.turn_on
- Add default entity icon support, Fix #53, add
show_icon
to decide whether to display the icon or not
Others
Fix state icon for color_type: card and equal operators
-
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
Merge pull request #80 from RomRider/with_operator Add operators to state
🔧 convert to mwc-button and fix styles
Support for HA v0.88 after conversion to mwc-button.