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
Copy file name to clipboardExpand all lines: README.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,6 @@ The trade off for the level of customizability that this card offers is that it
29
29
type: custom:service-call
30
30
entries:
31
31
- type: button
32
-
service: ''
33
32
```
34
33
35
34
## Base Config
@@ -63,7 +62,7 @@ More information on Home Assistant action confirmations can be found [here](http
63
62
64
63
### String Interpolation
65
64
66
-
Many fields such as colors and labels can have the entity state or attributes interpolated, or can accept CSS variables.
65
+
Many fields such as colors and labels can have the entity state or attributes interpolated, or can accept CSS variables and functions.
67
66
68
67
If any of these values returns an empty string or undefined value, an empty string is returned for the entire string, not just the interpolation. Labels will also not be generated so icons will be properly centered.
69
68
@@ -131,16 +130,16 @@ Certain attributes will have additional parsing applied to them before being int
131
130
| target | object | The entity IDs, device IDs, or area IDs to call the service on. |
132
131
| data | object | Additional data to pass to the service call. |
133
132
134
-
If no target is provided, the tile card's entity ID will be used instead. This entity ID is also used for string interpolation.
133
+
If no target is provided, the tile card's entity ID will be used instead.
135
134
136
135
To better understand service calls, use the services Developer Tool found in Home Assistant.
| color | string | Custom color for the tile feature. Can also see a CSS function (see examples). |
143
-
| opacity | float | Opacity of the tile feature background. Defaults to 0.2. Cannot be string interpolated. |
141
+
| color | string | Custom color for the tile feature. Can also be a CSS function (see examples). |
142
+
| opacity | float | Opacity of the tile feature. Defaults to 0.2. Cannot be string interpolated. |
144
143
| icon | string | Icon to use. |
145
144
| icon_color | string | Custom color for the icon. |
146
145
| label | string | String label to place underneath the icon, or by itself. |
@@ -245,7 +244,7 @@ entries:
245
244
246
245
This card is set up to work with Home Assistant `input_select` entities out of the box. Just using the config above, you can use it to change the values of input selects entities. By default each button will call the `input_select.select_option` service. The list of options is automatically retrieved, but you still have to include the `options` array and give each option button style information so that they will render (you can create blank buttons by setting the option to `{}`).
247
246
248
-
Since each selector option is a service call button, you can override it's default behavior by including service call information as shown in [example 2](#Example-2). Doing so will also break the current option highlighting, but you can use the `option` field within an option alongside `value_attribute` to restore this, also shown in example 2. `option` will be the value to compare against the entity's value, whether that is it's state or one of it's attributes. If they match and are not undefined, then the the option will be highlighted. The current option highlight color defaults to tile color, but can be changed by setting `color` to a different value.
247
+
Since each selector option is a service call button, you can override it's default behavior by including service call information as shown in [example 2](#Example-2). Doing so will also break the current option highlighting, but you can use the `option` field within an option alongside `value_attribute` to restore this, also shown in example 2. `option` will be the value to compare against the entity's value, whether that is it's state or one of it's attributes. If they match and are not undefined, then the the option will be highlighted. The option highlight color defaults to tile color, but can be changed by setting `color` to a different value. You can also set `color` within an option to give that option a different highlight color.
0 commit comments