Skip to content

Commit 260fc40

Browse files
committed
updated README with selector information and added sections on each tile feature type
1 parent 79ee32e commit 260fc40

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ The trade off for the level of customizability that this card offers is that it
2929
type: custom:service-call
3030
entries:
3131
- type: button
32-
service: ''
3332
```
3433
3534
## Base Config
@@ -63,7 +62,7 @@ More information on Home Assistant action confirmations can be found [here](http
6362

6463
### String Interpolation
6564

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.
6766

6867
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.
6968

@@ -131,16 +130,16 @@ Certain attributes will have additional parsing applied to them before being int
131130
| target | object | The entity IDs, device IDs, or area IDs to call the service on. |
132131
| data | object | Additional data to pass to the service call. |
133132

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.
135134

136135
To better understand service calls, use the services Developer Tool found in Home Assistant.
137136

138137
### Style Options
139138

140139
| Name | Type | Description |
141140
| ------------------ | ------ | ---------------------------------------------------------------------------------------------------- |
142-
| 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. |
144143
| icon | string | Icon to use. |
145144
| icon_color | string | Custom color for the icon. |
146145
| label | string | String label to place underneath the icon, or by itself. |
@@ -245,7 +244,7 @@ entries:
245244

246245
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 `{}`).
247246

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.
249248

250249
# Examples
251250

@@ -323,6 +322,7 @@ features:
323322
- type: selector
324323
entity_id: light.chandelier
325324
value_attribute: rgb_color
325+
background_color: rgb(VALUE)
326326
options:
327327
- service: light.turn_on
328328
option: 255,0,0

assets/light_tile.png

71 Bytes
Loading

0 commit comments

Comments
 (0)