3.2.0
New Features
-
Support for
html`<element hass=${hass}></element>`
in templates (Fix #283)
You can now do things like this in templates:return html` <ha-relative-time id="label" class="ellipsis" .hass="${hass}" .datetime="${entity.last_changed}" ></ha-relative-time>`
-
Support for camera live streams (Requires the
stream:
component to be enabled in HA's config (Fix #277)type: custom:button-card entity: camera.test show_live_stream: true
-
Support for an alternative state (will override the state field) using the
state_display
parameter (Fix #266)state_display: > [[[ return entity.state + ': ' + Math.round(entity.attributes.brightness / 2.55) + '%']]]
-
Icons now follow the
device_class
(Fix #265) -
New
extra_styles
config option which allows you to inject CSS (especially useful to inject CSS animations, but should also work for embedded cards). This field supports templating also (Fix #287):- type: custom:button-card name: Change Background aspect_ratio: 2/1 extra_styles: | @keyframes bgswap1 { 0% { background-image: url("/local/background1.jpg"); } 25% { background-image: url("/local/background1.jpg"); } 50% { background-image: url("/local/background2.jpg"); } 75% { background-image: url("/local/background2.jpg"); } 100% { background-image: url("/local/background1.jpg"); } } styles: card: - animation: bgswap1 10s linear infinite - background-size: cover name: - color: white
Bug Fixes
- tap-action: more-info doesn't work, with an entity defined in the action fields options only (Fix #284)
Others
- Integrated latest core updates on handling
*_actions
(tap, hold, double tap, etc...). If anything breaks, please tell me.