mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-07-13 08:18:33 +00:00
Amended documentation for two new menu item options
The options are 'enable' and 'exit'.
This commit is contained in:
@ -76,3 +76,35 @@ Note that for notify events, you _must_ not supply an `entity_id` or the API cal
|
||||
> Be careful with the value of the `service` field.
|
||||
|
||||
Note that the `service` field will need to be a locally custom `script.<something>` as soon as any `data` fields are populated and not something more generic like `script.turn_on`. If the `service` field is wrong, the application will fail with a [`Communications.INVALID_HTTP_BODY_IN_NETWORK_RESPONSE`](https://developer.garmin.com/connect-iq/api-docs/Toybox/Communications.html) error in the response from your Home Assistant and show the error message as _"No JSON returned from HTTP request"_ on your device. In the [web-based editor](https://house-of-abbey.github.io/GarminHomeAssistant/web/) you can use the standard developer tools to observe an `HTTP 400` error which the application does not see. Here we are limited by the [Garmin Connect IQ](https://developer.garmin.com/connect-iq/overview/) software development kit (SDK). We do not have enough information at the point of execution in the application to determine the cause of the error. Nor is there an immediately obvious way of identifying this issue using the JSON schema checks.
|
||||
|
||||
## Exit on Tap
|
||||
|
||||
You can choose individual items that will quit after they have completed their action.
|
||||
|
||||
```json
|
||||
{
|
||||
"entity": "automation.turn_off_stuff",
|
||||
"name": "Turn off Stuff",
|
||||
"type": "tap",
|
||||
"tap_action": {
|
||||
"service": "automation.trigger"
|
||||
},
|
||||
"exit": true
|
||||
}
|
||||
```
|
||||
|
||||
# Disable Menu Item
|
||||
|
||||
If you would like to temporarily disable an item in your menu, e.g. for seasonal reasons like not needing to turn on the heating in summer, then rather than swapping menu definition files or deleting a section of the menu you can mark the item as 'disabled'. This field applies to all menu items.
|
||||
|
||||
```json
|
||||
{
|
||||
"entity": "automation.turn_off_stuff",
|
||||
"name": "Turn off Stuff",
|
||||
"type": "tap",
|
||||
"tap_action": {
|
||||
"service": "automation.trigger"
|
||||
},
|
||||
"enabled": false
|
||||
}
|
||||
```
|
||||
|
@ -109,3 +109,29 @@ Then you can use the following in your config:
|
||||
"type": "toggle"
|
||||
}
|
||||
```
|
||||
|
||||
## Exit On Toggle
|
||||
|
||||
You can choose individual items that will quit after they have completed their action.
|
||||
|
||||
```json
|
||||
{
|
||||
"entity": "light.hall_light",
|
||||
"name": "Hall Light & Quit",
|
||||
"type": "toggle",
|
||||
"exit": true
|
||||
}
|
||||
```
|
||||
|
||||
# Disable Menu Item
|
||||
|
||||
If you would like to temporarily disable an item in your menu, e.g. for seasonal reasons like not needing to turn on Christmas tree lights outside the festive season, then rather than swapping menu definition files or deleting a section of the menu you can mark the item as 'disabled'. This field applies to all menu items.
|
||||
|
||||
```json
|
||||
{
|
||||
"entity": "light.chrissmas_tree",
|
||||
"name": "Christmas Lights",
|
||||
"type": "toggle",
|
||||
"enabled": false
|
||||
}
|
||||
```
|
||||
|
@ -218,6 +218,19 @@ An example of a dimmer light with 4 brightness settings 0..3. Here our light wor
|
||||
}
|
||||
```
|
||||
|
||||
# Disable Menu Item
|
||||
|
||||
If you would like to temporarily disable an item in your menu, then rather than swapping menu definition files or deleting a section of the menu you can mark the item as 'disabled'. This field applies to all menu items.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "Phone",
|
||||
"type": "info",
|
||||
"content": "{{ ... }}",
|
||||
"enabled": false
|
||||
}
|
||||
```
|
||||
|
||||
## Warnings
|
||||
|
||||
Just remember, on older smaller memory devices **you have the ability to crash the application by creating an excessive menu definition**. Templates can require significant definition for highly customised text. Don't be silly.
|
||||
|
Reference in New Issue
Block a user