Skip to content

Commit

Permalink
Merge pull request #71 from d3wy/patch-1
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
iantrich committed Aug 12, 2021
2 parents 1cde7b4 + 18d0f09 commit ee823fc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ resources:
| `states` | The [states](https://developers.home-assistant.io/docs/frontend/data/#hassstates) object |
| `user` | The [user](https://developers.home-assistant.io/docs/frontend/data/#hassuser) object |
| `vars` | Defined by `variables` configuration and accessible in your templates to help clean them up. If `variables` in the configuration is a yaml list, then `vars` is an array starting at the 0th index as your firstly defined variable. If `variables` is an object in the configuration, then `vars` is a string-indexed map and you can also access the variables by name without using `vars` at all. |
## Examples

```yaml
type: 'custom:config-template-card'
Expand All @@ -81,7 +82,7 @@ card:
icon: "${GARAGE_STATE === 'open' ? 'mdi:hotel' : '' }"
```

## Templated entities example
### Templated entities example

```yaml
type: 'custom:config-template-card'
Expand All @@ -95,7 +96,7 @@ card:
name: "${states[vars[0]].state === 'on' ? 'Light On' : 'Light Off'}"
```

Picture-elements card example
### Picture-elements card example

```yaml
type: picture-elements
Expand All @@ -113,12 +114,11 @@ elements:
top: 47%
left: 75%
```
Note how the `style` object is on the config-template-card itself and not within the element configuration.

\*\*Note how the `style` object is on the config-template-card itself and not within the element configuration.
### Entities card example

Entities card example

````yaml
```yaml
type: entities
entities:
- type: 'custom:config-template-card'
Expand Down

0 comments on commit ee823fc

Please sign in to comment.