mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-06-15 19:08:40 +00:00
Documentation for v2.19
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
# Actions
|
||||
|
||||
A simple example using a scene as a `tap`` menu item.
|
||||
A simple example using a scene as a `tap` menu item.
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -43,6 +43,17 @@ Then you can use the following in your config:
|
||||
}
|
||||
```
|
||||
|
||||
And you can optionally include a template to reflect some status. See [Templates](Templates.md) for details on hwo to use this JSON field.
|
||||
|
||||
```json
|
||||
{
|
||||
"entity": "switch.<switch-name>",
|
||||
"name": "<name>",
|
||||
"type": "toggle",
|
||||
"content": "..."
|
||||
}
|
||||
```
|
||||
|
||||
## Example - Covers
|
||||
|
||||
```yaml
|
||||
|
@ -118,6 +118,20 @@ Note: Only when you use the `tap_action` field do you also need to include the `
|
||||
}
|
||||
```
|
||||
|
||||
## Group and Toggle Menu Items
|
||||
|
||||
Both `group` and `toggle` menu items accept an optional `content` field as of v2.19. This allows the use of templates to present status information.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "Each Lounge Light",
|
||||
"title": "Lounge",
|
||||
"type": "group",
|
||||
"content": "{{'On: %d, Off: %d'|format(expand(state_attr('light.living_room_lights', 'entity_id'))|selectattr('state','eq','on')|map(attribute='entity_id')|list|count, expand(state_attr('light.living_room_lights', 'entity_id'))|selectattr('state','eq','off')|map(attribute='entity_id')|list|count)}}",
|
||||
"items": [..]
|
||||
}
|
||||
```
|
||||
|
||||
## Advanced
|
||||
|
||||
Here we generate a bar graph of the battery level. We use the following steps to do this:
|
||||
|
Reference in New Issue
Block a user