github custom-cards/button-card 3.4.0

latest releases: v4.1.2, v4.1.2-dev.2, v4.1.2-dev.1...
3 years ago

New Features

  • Auto expand groups with group_expand: true. This helps when your entity or any entity from triggers_update or any discovered entity is a group and you want to update the card also when child entities are updated (eg: counting the number of entities which are on in a group). This works with nested groups too. (Fix #392)

  • Support for configuring the card size for the auto-layout feature of lovelace using card_size. Default value is still 3, but you can now override it. Lovelace multiplies the value by about 50px for the auto layout feature.

    type: custom:button-card
    entity: switch.my_switch
    card_size: 42
  • Support for displaying a tooltip while hoovering the card for 1.5s using the tooltip parameter. It supports javascript templates. You can also apply any CSS style to the tooltip (either in the main styles config object or in any of the state entry).

    type: custom:button-card
    entity: switch.my_switch
    tooltip: |
      [[[
        return entity.state
      ]]]
    styles:
      tooltip:
        - color: '[[[ return entity.state === "on" ? "red" : "green" ]]]'

    or

    type: custom:button-card
    entity: switch.my_switch
    tooltip: |
      [[[
        return entity.state
      ]]]
    state:
      - value: 'on'
        styles:
          tooltip:
            - color: red
      - value: 'off'
        styles:
          tooltip:
            - color: green

Bugfixes

  • Don't take brightness into account if the light is off (this is a bogus implementation of the light entity probably). Fix #378
  • Fix deprecation of --paper-card-background-color
  • Fix Timer not updating on page change (#365)

Other

  • Documentation typos (Thanks to all the contributors)
  • Some perf upgrades (probably only noticeable on slow systems)
  • Update all dependencies

Don't miss a new button-card release

NewReleases is sending notifications on new releases.