Skip to content

Repeatable hold_action, double tap action, styling for lock and light color css var

Compare
Choose a tag to compare
@RomRider RomRider released this 10 May 12:51
· 261 commits to master since this release
8023fd8

NEW FEATURES

  • hold_action now has a new parameter: repeat (in milliseconds). If set, while you hold the button, the action will repeat itself every repeat in milliseconds. Fixes #147
    repeat

          - type: custom:button-card
            entity: input_number.test
            show_state: true
            hold_action:
              action: call-service
              repeat: 500
              service: input_number.increment
              service_data:
                entity_id: input_number.test
  • New double click action: dbltap_action (this introduces a slight delay [250ms] for single click actions on buttons where you also use double tap)
    dbltap

          - type: custom:button-card
            entity: input_number.test
            show_state: true
            hold_action:
              action: call-service
              repeat: 500
              service: input_number.increment
              service_data:
                entity_id: input_number.test
            dbltap_action:
              action: call-service
              service: input_number.decrement
              service_data:
                entity_id: input_number.test
  • styling for the lock, available also per state (Fixes #150)
    image

    styles:
      lock:
        - color: red
        - align-items: flex-end
        - justify-content: flex-start
  • You can now use the current light color in your CSS styles. If a light entity is assigned to the button, the CSS variable --button-card-light-color will contain the current light color so that you can use it where you want on your card. Example:
    color-variable

    styles:
      name:
        color: var(--button-card-light-color)
      card:
        - -webkit-box-shadow: 0px 0px 9px 3px var(--button-card-light-color)
        - box-shadow: 0px 0px 9px 3px var(--button-card-light-color)

FIXES

  • Misalignment of label for layout: icon_name_state2nd when there was no state.