github custom-cards/button-card v7.0.0-dev.1

latest release: v7.0.0-dev.2
pre-releaseone day ago

7.0.0-dev.1 (2025-11-01)

⚠ BREAKING CHANGES

  • triggers_update: triggers_update is deprecated and will not have any
    effect if set. Entities are discovered automatically. If there is no
    suitable entities in your configuration, consider using update_timer
    to update the card on interval.
  • variables: variables are only evaluated if they are "used" so
    hacks using variables to run javascript code during card init for eg.
    should read the updated documentation section. It is still possible with
    the force_eval variables configuration option.
type: custom:button-card
entity: switch.skylight
update_timer: 1s
variables:
  always_evaled:
    value: '[[[ window.alwaysEvaled = `${new Date().getTime()}`; ]]]'
    force_eval: true
  never_evaled: '[[[ window.neverEvaled = `${new Date().getTime()}`; ]]]'
name: 'always should update every second,<br/>never should be unset'
show_label: true
label: |
  [[[
    return `always: ${window.alwaysEvaled || "not set"}
      <br/>never: ${window.neverEvaled || "not set"}`;
   ]]]
type: custom:button-card
variables:
  never_evaled: '[[[ throw new Error("This variable should never be evaluated") ]]]'
  aa:
    value: '[[[ return "Test variables dependencies: OK" ]]]'
  test1: '[[[ return variables.aa ]]]'
name: '[[[ return variables.test1; ]]]'

Features

  • spin: Make spin available as a main config option and support JS templates (#1084) (3c92a5d), closes #1081
  • triggers_update: triggers_update is deprecated and will not have any effect. This is now automatic. (#1095) (45a6b69)
  • variables: variables can depend on any other variable (no alphabetical dependency anymore) (#1089) (f372ce4)

Documentation

Don't miss a new button-card release

NewReleases is sending notifications on new releases.