Skip to content

3.3.0-0

Pre-release
Pre-release
Compare
Choose a tag to compare
@RomRider RomRider released this 09 Apr 01:22
· 189 commits to master since this release

Breaking Change

  • triggers_update is a new field that enables you to define which entities should trigger an update of the card itself (this rule doesn't apply for nested cards in custom_fields as they are always updated with the latest state. This is expected and fast!). Before 3.3.0, if you were using javascript [[[ ]]] templates, the card would update itself everytime ANY entity was updated in HA introducing a lot of load on the browser.
    If you don't have javascript [[[ ]]] templates in your config, you don't need to do anything, else read further.
    If unset, the card will parse your code and look for entities that it can match (it only matches states['ENTITY_ID']) so:
     return states['switch.myswitch'].state // will match switch.myswitch
     // but
     const test = switch.myswitch
     return states[test].state // will not match anything
    In this second case, you have 2 options:
    • Set the value of triggers_update to all (This was the behavior of button-card < 3.3.0)
      triggers_update: all
    • Set the value of triggers_update to a list of entities. When any of the entities in this list is updated, the card will be updated. The logic is the same as the internal home-assistant * templates integration (see here for example):
      type: custom:button-card
      entity: sensor.mysensor # No need to repeat this one in the triggers_update, it is added by default
      triggers_update:
        - switch.myswitch
        - light.mylight

BugFixes

  • The button might not have been clickable in some cases when the action of a *_action was a template.
  • Nested cards should be updated properly now when there is a state change.

Other stuff

  • A lot of refactor in the code, I hope I didn't break too much things 😄