Skip to content

Commit df3be94

Browse files
committed
Documentation for v2.19
1 parent 17162c1 commit df3be94

File tree

4 files changed

+27
-2
lines changed

4 files changed

+27
-2
lines changed

HISTORY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@
3131
| 2.16 | Bug fix for lack of phone connection when starting the application. Includes new activity reporting features from [KPWhiver](https://github.com/KPWhiver) covering steps, heart rate, floors climbed and descended, and respiration rate. |
3232
| 2.17 | Bug fix for reporting activity metrics that are not found on some devices. |
3333
| 2.18 | Bug fix for reporting activity metrics that might be `null` sometimes. This is unsimulatable situation, so this version is a change based on an informed guess. |
34-
| 2.19 | A template to evaluate is now optionally allowed on both `group` and `toggle` menu items. The template to evaluate is non-optional on a `template` menu item. |
34+
| 2.19 | A template to evaluate is now optionally allowed on both `group` and `toggle` menu items. The template to evaluate is non-optional on a `template` menu item. All updates are performed in a single HTTP GET request for efficiency. Bug fix for negative heading values. Vibration now (optionally) confirms toggle menu items being tapped. |

examples/Actions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Actions
44

5-
A simple example using a scene as a `tap`` menu item.
5+
A simple example using a scene as a `tap` menu item.
66

77
```json
88
{

examples/Switches.md

+11
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,17 @@ Then you can use the following in your config:
4343
}
4444
```
4545

46+
And you can optionally include a template to reflect some status. See [Templates](Templates.md) for details on hwo to use this JSON field.
47+
48+
```json
49+
{
50+
"entity": "switch.<switch-name>",
51+
"name": "<name>",
52+
"type": "toggle",
53+
"content": "..."
54+
}
55+
```
56+
4657
## Example - Covers
4758

4859
```yaml

examples/Templates.md

+14
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,20 @@ Note: Only when you use the `tap_action` field do you also need to include the `
118118
}
119119
```
120120

121+
## Group and Toggle Menu Items
122+
123+
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.
124+
125+
```json
126+
{
127+
"name": "Each Lounge Light",
128+
"title": "Lounge",
129+
"type": "group",
130+
"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)}}",
131+
"items": [..]
132+
}
133+
```
134+
121135
## Advanced
122136

123137
Here we generate a bar graph of the battery level. We use the following steps to do this:

0 commit comments

Comments
 (0)