You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| icon | string | optional | `mdi:air-conditioner`\|`attribute` | Icon to display in place of the state. Will be overriden by the icon defined defined in a state (if present). If you use keywork `attribute` it will fetch the icon configured on the entity (overrides all icons defined).
43
-
| color_type | string | `icon` | `icon`\|`card`\|`blank-card`\|`label-card` | Color either the background of the card or the icon inside the card. Setting this to `card` enable automatic `font` and `icon` color. This allows the text/icon to be readable even if the background color is bright/dark. Additional color-type options `blank-card` and `label-card` can be used for organisation (see examples).
44
-
| color | string | `var(--primary-text-color)` | `auto`\|`rgb(28, 128, 199)`| Color of the icon/card when state is `on`. `auto` sets the color based on the color of a light.
45
-
| color_off | string | `var(--disabled-text-color)` | `rgb(28, 128, 199)`| Color of the icon/card when state is `off`.
46
-
| size | string | `40%` | `20px` | Size of the icon. Can be percentage or pixel
47
-
| action | string | `toggle` | `toggle`\|`more_info`\|`service` | Define the type of action
48
-
| service | Object | optional | See [example section](#Examples) | Service to call and service data when action is set to `service`
49
-
| name | string | optional | `Air conditioner` | Define an optional text to show below the icon
50
-
| show_state | boolean | `false` | `true`\|`false` | Show the state on the card. defaults to false if not set
51
-
| style | object | optional | `- text-transform: none` | Define a list of css attribute and their value to apply to the card
52
-
| state | list | optional | See [state example section](#Configuration-with-states) | State to use for the color of the button. Multiple states can be defined
38
+
| Name | Type | Default | Supported options | Description|
| icon | string | optional |`mdi:air-conditioner`\|`attribute`| Icon to display in place of the state. Will be overriden by the icon defined defined in a state (if present). If you use keywork `attribute` it will fetch the icon configured on the entity (overrides all icons defined). |
43
+
| color_type | string |`icon`|`icon`\|`card`\|`blank-card`\|`label-card`| Color either the background of the card or the icon inside the card. Setting this to `card` enable automatic `font` and `icon` color. This allows the text/icon to be readable even if the background color is bright/dark. Additional color-type options `blank-card` and `label-card` can be used for organisation (see examples).|
44
+
| color | string |`var(--primary-text-color)`|`auto`\|`rgb(28, 128, 199)`|Color of the icon/card when state is `on`. `auto` sets the color based on the color of a light.|
45
+
| color_off | string |`var(--disabled-text-color)`|`rgb(28, 128, 199)`|Color of the icon/card when state is `off`.|
46
+
| size | string |`40%`|`20px`| Size of the icon. Can be percentage or pixel|
47
+
| action | string |`toggle`|`toggle`\|`more_info`\|`service`| Define the type of action|
48
+
| service | Object | optional | See [example section](#Examples)| Service to call and service data when action is set to `service`|
49
+
| name | string | optional |`Air conditioner`| Define an optional text to show below the icon|
50
+
| show_state | boolean |`false`|`true`\|`false`| Show the state on the card. defaults to false if not set|
51
+
| style | object | optional |`- text-transform: none`| Define a list of css attribute and their value to apply to the card|
52
+
| state | list | optional | See [state example section](#Configuration-with-states)| State to use for the color of the button. Multiple states can be defined|
53
53
54
54
## Installaion
55
55
@@ -195,9 +195,9 @@ Horizontal stack with :
195
195
Vertical Stack with :
196
196
- 1x label card
197
197
- Horizontal Stack with :
198
-
- 1x Scene 1 Button
198
+
- 1x Scene 1 Button
199
199
- 1x Scene 2 Button
200
-
- 1x Scene 3 Button
200
+
- 1x Scene 3 Button
201
201
- 1x Scene 4 Button
202
202
- 1x Scene Off Button
203
203
@@ -246,7 +246,7 @@ Input select card with select next service and custom color and icon for states.
246
246
247
247

248
248
249
-
249
+
#### Default behavior
250
250
```yaml
251
251
- type: "custom:button-card"
252
252
entity: input_select.cube_mode
@@ -263,6 +263,34 @@ Input select card with select next service and custom color and icon for states.
263
263
color: rgb(189, 255, 5)
264
264
```
265
265
266
+
#### With Operator on state
267
+
The definition order matters, the first item to match will be the one selected.
0 commit comments