commit
9ef93a2a35
|
@ -1673,7 +1673,7 @@ window.navigator.userAgent.match("Trident") && (DOMTokenList.prototype.toggle =
|
|||
p = this._buildStyleGeneric(e, "grid");return a || o.push("no-icon"), r || o.push("no-name"), s || o.push("no-state"), l || u || o.push("no-label"), R`
|
||||
<div id="container" class=${o.join(" ")} style=${ct(p)}>
|
||||
${a || ""}
|
||||
${r ? R`<div id="name" class="ellipsis" style=${ct(c)}>${r}</div>` : ""}
|
||||
${r ? R`<div id="name" class="ellipsis" style=${ct(c)}>${dt(r)}</div>` : ""}
|
||||
${s ? R`<div id="state" class="ellipsis" style=${ct(h)}>${s}</div>` : ""}
|
||||
${l && !u ? R`<div id="label" class="ellipsis" style=${ct(d)}>${dt(l)}</div>` : ""}
|
||||
${u || ""}
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
## Features:
|
||||
|
||||
- works with any entity
|
||||
- 6 available actions on **tap** and/or **hold** and/or **double click**: `none`, `toggle`, `more-info`, `navigate`, `url` and `call-service`
|
||||
- support for action repeat while holding the button down
|
||||
- state and label display (optional)
|
||||
- custom color (optional), or based on light rgb value/temperature
|
||||
- custom state definition with customizable color, icon and style (optional)
|
||||
- [custom size of the icon, width and height](#Play-with-width-height-and-icon-size) (optional)
|
||||
- [aspect ratio support](#aspect-ratio) (optional)
|
||||
- Support for [templates](#templates) in some fields
|
||||
- custom icon (optional)
|
||||
- custom css style (optional)
|
||||
- multiple [layout](#Layout) support and [custom layout](#advanced-styling-options) support
|
||||
- units for sensors can be redefined or hidden
|
||||
- 2 color types
|
||||
- `icon` : apply color settings to the icon only
|
||||
- `card` : apply color settings to the card only
|
||||
- automatic font color if color_type is set to `card`
|
||||
- blank card and label card (for organization)
|
||||
- [blink](#blink) animation support
|
||||
- rotating animation support
|
||||
- confirmation popup for sensitive items (optional) or [locking mecanism](#lock)
|
||||
- haptic support for the [Beta IOS App](http://home-assistant.io/ios/beta)
|
||||
- support for [custom_updater](https://github.com/custom-components/custom_updater) and [hacs](https://github.com/custom-components/hacs)
|
||||
|
||||
### Example:
|
||||
<img src="https://github.com/custom-cards/button-card/raw/master/examples/all.gif?raw=true" width="509px">
|
||||
|
||||
### See the <a href="https://github.com/custom-cards/button-card/blob/master/README.md" target="_blank">Readme for installation and configuration</a>.
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "button-card",
|
||||
"version": "1.11.0",
|
||||
"version": "1.11.1",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "button-card",
|
||||
"version": "1.11.0",
|
||||
"version": "1.11.1",
|
||||
"description": "Button card for lovelace",
|
||||
"main": "dist/button-card.js",
|
||||
"pre-commit": [
|
||||
|
|
|
@ -642,7 +642,7 @@ class ButtonCard extends LitElement {
|
|||
return html`
|
||||
<div id="container" class=${itemClass.join(' ')} style=${styleMap(gridStyleFromConfig)}>
|
||||
${iconTemplate ? iconTemplate : ''}
|
||||
${name ? html`<div id="name" class="ellipsis" style=${styleMap(nameStyleFromConfig)}>${name}</div>` : ''}
|
||||
${name ? html`<div id="name" class="ellipsis" style=${styleMap(nameStyleFromConfig)}>${unsafeHTML(name)}</div>` : ''}
|
||||
${stateString ? html`<div id="state" class="ellipsis" style=${styleMap(stateStyleFromConfig)}>${stateString}</div>` : ''}
|
||||
${label && !lastChangedTemplate ? html`<div id="label" class="ellipsis" style=${styleMap(labelStyleFromConfig)}>${unsafeHTML(label)}</div>` : ''}
|
||||
${lastChangedTemplate ? lastChangedTemplate : ''}
|
||||
|
|
Loading…
Reference in New Issue