mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-11-07 10:08:14 +00:00
Documentation changes
"Home Assistant" => "HomeAssistant" search & replace Added schema change for "exit" feature. Added initial Devices.md
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
# Background Service
|
||||
|
||||
The background service can report the following statuses from your device to your Home Assistant:
|
||||
The background service can report the following statuses from your device to your HomeAssistant:
|
||||
|
||||
- Battery Level with charging status.
|
||||
- Location and location accuracy.
|
||||
@@ -12,13 +12,13 @@ If your device does not support the background service, the application will cle
|
||||
|
||||
## Limits
|
||||
|
||||
The values are merely samples of your device's current status. They are sent by a single background service at the repetition frequency you chose in the settings. The samples are sent at that one rate only, they _do not vary_ for example on in activity, on charge, time of day. You get one refresh interval and that is it. If you want to change the refresh interval, you change your settings. We do appreciate that may not be what you would ideally like to trigger actions on Home Assistant. Messing with the repeat interval of the background service requires more code, more settings and more complexity. That means older devices using widgets would have to be taken out of support to achieve it.
|
||||
The values are merely samples of your device's current status. They are sent by a single background service at the repetition frequency you chose in the settings. The samples are sent at that one rate only, they _do not vary_ for example on in activity, on charge, time of day. You get one refresh interval and that is it. If you want to change the refresh interval, you change your settings. We do appreciate that may not be what you would ideally like to trigger actions on HomeAssistant. Messing with the repeat interval of the background service requires more code, more settings and more complexity. That means older devices using widgets would have to be taken out of support to achieve it.
|
||||
|
||||
**Please do not ask for these to be made 'events'.** Garmin's [Connect IQ background service](https://developer.garmin.com/connect-iq/api-docs/Toybox/System/ServiceDelegate.html) is limited in that while it does provide an `onActivityCompleted()` method, it does not provide an `onActivityStarted()` method, so you would not have the complete activity life cycle anyway. So we're keeping this implementation simple, you just get a sampling at one refresh rate. This probably limits you to updating a status on a Home Assistant Dashboard only.
|
||||
**Please do not ask for these to be made 'events'.** Garmin's [Connect IQ background service](https://developer.garmin.com/connect-iq/api-docs/Toybox/System/ServiceDelegate.html) is limited in that while it does provide an `onActivityCompleted()` method, it does not provide an `onActivityStarted()` method, so you would not have the complete activity life cycle anyway. So we're keeping this implementation simple, you just get a sampling at one refresh rate. This probably limits you to updating a status on a HomeAssistant Dashboard only.
|
||||
|
||||
## Battery Reporting
|
||||
|
||||
From version 2.1 the application includes a background service to report the current device battery level and charging status back to Home Assistant. This is a feature that Garmin omitted to include with the Bluetooth connection.
|
||||
From version 2.1 the application includes a background service to report the current device battery level and charging status back to HomeAssistant. This is a feature that Garmin omitted to include with the Bluetooth connection.
|
||||
|
||||
## Location Reporting
|
||||
|
||||
@@ -47,7 +47,7 @@ From version 2.6 the application includes reporting your activity. The activity
|
||||
- Activity - This is an integer as defined by [Toybox.Activity `SPORT`](https://developer.garmin.com/connect-iq/api-docs/Toybox/Activity.html#Sport-module)
|
||||
- Sub-activity - This is an integer as defined by [Toybox.Activity `SUB_SPORT`](https://developer.garmin.com/connect-iq/api-docs/Toybox/Activity.html#SubSport-module)
|
||||
|
||||
The application only provides the integers without translation. When using the values in Home Assistant, you will need to provide you own mapping from the `Activity` enumerated type to the human readable text. As developers of the application we are pushing this translation to the server to keep the Garmin application code 'lean'. You will also need to add to both the list of activities (sports) and sub-activities (sub-sports) an interpretation of integer `-1` for no activity/sub-activity at present.
|
||||
The application only provides the integers without translation. When using the values in HomeAssistant, you will need to provide you own mapping from the `Activity` enumerated type to the human readable text. As developers of the application we are pushing this translation to the server to keep the Garmin application code 'lean'. You will also need to add to both the list of activities (sports) and sub-activities (sub-sports) an interpretation of integer `-1` for no activity/sub-activity at present.
|
||||
|
||||
## Start Reporting
|
||||
|
||||
@@ -55,7 +55,7 @@ The main drawback of this solution is that the Garmin application must be run on
|
||||
|
||||
It should be as simple as starting the application (or widget). There should be a new device in the mobile app integration called `Garmin Watch` with the battery level and charging status.
|
||||
|
||||
[](https://my.home-assistant.io/redirect/integration/?domain=mobile_app)
|
||||
[](https://my.home-assistant.io/redirect/integration/?domain=mobile_app)
|
||||
|
||||
If this is not the case, head over to the [troubleshooting page](Troubleshooting.md#watch-battery-level-reporting).
|
||||
|
||||
@@ -67,7 +67,7 @@ To stop the reporting, the option must be turned off in the settings and then th
|
||||
|
||||
When the device is first created, it will be called `Garmin Watch`. This can be changed in the mobile app integration settings (button below).
|
||||
|
||||
[](https://my.home-assistant.io/redirect/integration/?domain=mobile_app)
|
||||
[](https://my.home-assistant.io/redirect/integration/?domain=mobile_app)
|
||||
|
||||
Select the device called `Garmin Watch` and then click on the edit icon in the top right corner. You can then change the name of the device to whatever you like, then press `UPDATE` and then `RENAME`.
|
||||
|
||||
@@ -91,7 +91,7 @@ template:
|
||||
icon: "mdi:battery{% if is_state('binary_sensor.<device>_battery_is_charging', 'on') %}-charging{% endif %}{% if 0 < (states('sensor.<device>_battery_level') | float / 10 ) | round(0) * 10 < 100 %}-{{ (states('sensor.<device>_battery_level') | float / 10 ) | round(0) * 10 }}{% else %}{% if (states('sensor.<device>_battery_level') | float / 10 ) | round(0) * 10 == 0 %}-outline{% else %}{% if is_state('binary_sensor.<device>_battery_is_charging', 'on') %}-100{% endif %}{% endif %}{% endif %}"
|
||||
```
|
||||
|
||||
## Adding a sample Home Assistant UI widget
|
||||
## Adding a sample HomeAssistant UI widget
|
||||
|
||||
A gauge for battery level with a charging icon making use of [mushroom cards](https://github.com/piitaya/lovelace-mushroom), [card_mod](https://github.com/thomasloven/lovelace-card-mod) and [stack-in-card](https://github.com/custom-cards/stack-in-card):
|
||||
|
||||
@@ -161,7 +161,7 @@ N.B. `sensor.<device>_battery_level` will likely need to be changed to `sensor.<
|
||||
|
||||
## Migrating
|
||||
|
||||
You should remove your old template sensors before migrating to the new integration. You can do this by removing the `sensor.<device>_battery_level` and `binary_sensor.<device>_battery_is_charging` entities from `configuration.yaml` and then restarting Home Assistant or reloading the YAML.
|
||||
You should remove your old template sensors before migrating to the new integration. You can do this by removing the `sensor.<device>_battery_level` and `binary_sensor.<device>_battery_is_charging` entities from `configuration.yaml` and then restarting HomeAssistant or reloading the YAML.
|
||||
|
||||
[Here is the old configuration method for reference.](https://github.com/house-of-abbey/GarminHomeAssistant/blob/b51e2aa2a4afbc58ad466f3b81667d1cd252d091/BatteryReporting.md)
|
||||
|
||||
|
||||
194
Devices.md
Normal file
194
Devices.md
Normal file
@@ -0,0 +1,194 @@
|
||||
# Device Support & Characterisation
|
||||
|
||||
A page just to note a practical limit on support for some older devices.
|
||||
|
||||
## Application Memory Usage
|
||||
|
||||
On an `instinct2x` device:
|
||||
|
||||
| Version | Free Memory (bytes) on `instinct2x`| Free Memory (bytes) on `venu2`|
|
||||
|:-------:|-----------------------------------:|------------------------------:|
|
||||
| 3.5 | 62,360 | - |
|
||||
| 3.6 | 65,696 | 53,832 |
|
||||
|
||||
A user has reported a maximum of 26 items with Ver 3.5. This measurement has shown that each menu item requires about 1.0~1.2 kB. Using the worked example below it is possible to predict how many menu items your particular device might be able to support by using indicative figures.
|
||||
|
||||
## Worked Example
|
||||
|
||||
As a worked example, for Ver 3.6 working on an `instinct2x` device:
|
||||
|
||||
| Feature | Memory (bytes) | Cost (bytes) |
|
||||
|--------------------------------------|---------------:|-------------:|
|
||||
| Declared available to application | 98,304 | |
|
||||
| Measured available to application | 94,112 | (4,192 less) |
|
||||
| Application used | 65,696 | |
|
||||
| Free before fetching menu definition | 28,416 | |
|
||||
| Free after fetching menu definition | 15,792 | 12,624 |
|
||||
| Free after construction | 936 | 14,856 |
|
||||
|
||||
Our test menu presently contains a mix of 28 items, consisting of nested group, toggle, tap, info and numeric items with templates. So each item requires (12,624 + 14,856) / 28 = 982 bytes.
|
||||
|
||||
## Garmin Devices
|
||||
|
||||
The following table details all the devices as at 1 October 2025 and whether they are supported by Garmin HomeAssistant. The available application memory is also detailed so that it can be compared to an application version listed above. Of particular concern are the 'Instinct' range of devices, being the smallest we currently support. New feature requests are now being vetted against how they might affect our ability to support the 'Instinct' range of devices. At some point support may have to be withdrawn in order to allow the Garmin HomeAssistant application to grow further.
|
||||
|
||||
| Device | Supported | Application Memory |
|
||||
|----------------------------|:---------:|--------------------:|
|
||||
| d2bravo | N | 65,536 |
|
||||
| d2bravo_titanium | N | 65,536 |
|
||||
| fenix3 | N | 65,536 |
|
||||
| fenix3_hr | N | 65,536 |
|
||||
| fr230 | N | 65,536 |
|
||||
| fr235 | N | 65,536 |
|
||||
| fr630 | N | 65,536 |
|
||||
| fr920xt | N | 65,536 |
|
||||
| vivoactive | N | 65,536 |
|
||||
| descentg1 | Y | 98,304 |
|
||||
| instinct2 | Y | 98,304 |
|
||||
| instinct2s | Y | 98,304 |
|
||||
| instinct2x | Y | 98,304 |
|
||||
| instinctcrossover | Y | 98,304 |
|
||||
| approachs60 | N | 131,072 |
|
||||
| enduro | Y | 131,072 |
|
||||
| fenix5 | Y | 131,072 |
|
||||
| fenix5s | Y | 131,072 |
|
||||
| fenix6 | Y | 131,072 |
|
||||
| fenix6s | Y | 131,072 |
|
||||
| fenixchronos | Y | 131,072 |
|
||||
| fr245 | Y | 131,072 |
|
||||
| fr55 | Y | 131,072 |
|
||||
| fr645 | Y | 131,072 |
|
||||
| fr735xt | N | 131,072 |
|
||||
| fr935 | Y | 131,072 |
|
||||
| instinct3solar45mm | Y | 131,072 |
|
||||
| instincte40mm | Y | 131,072 |
|
||||
| instincte45mm | Y | 131,072 |
|
||||
| venusq | Y | 131,072 |
|
||||
| vivoactive3 | Y | 131,072 |
|
||||
| vivoactive3d | N | 131,072 |
|
||||
| vivoactive_hr | N | 131,072 |
|
||||
| edge_520 | N | 262,144 |
|
||||
| fr255 | Y | 524,288 |
|
||||
| fr255s | Y | 524,288 |
|
||||
| approachs50 | Y | 786,432 |
|
||||
| approachs7042mm | Y | 786,432 |
|
||||
| approachs7047mm | Y | 786,432 |
|
||||
| d2airx10 | Y | 786,432 |
|
||||
| d2mach1 | Y | 786,432 |
|
||||
| descentg2 | Y | 786,432 |
|
||||
| descentmk343mm | Y | 786,432 |
|
||||
| descentmk351mm | Y | 786,432 |
|
||||
| enduro3 | Y | 786,432 |
|
||||
| epix2 | Y | 786,432 |
|
||||
| epix2pro42mm | Y | 786,432 |
|
||||
| epix2pro47mm | Y | 786,432 |
|
||||
| epix2pro47mmsystem7preview | Y | 786,432 |
|
||||
| epix2pro51mm | Y | 786,432 |
|
||||
| fenix7 | Y | 786,432 |
|
||||
| fenix7pro | Y | 786,432 |
|
||||
| fenix7pronowifi | Y | 786,432 |
|
||||
| fenix7s | Y | 786,432 |
|
||||
| fenix7spro | Y | 786,432 |
|
||||
| fenix7x | Y | 786,432 |
|
||||
| fenix7xpro | Y | 786,432 |
|
||||
| fenix7xpronowifi | Y | 786,432 |
|
||||
| fenix843mm | Y | 786,432 |
|
||||
| fenix847mm | Y | 786,432 |
|
||||
| fenix8pro47mm | Y | 786,432 |
|
||||
| fenix8solar47mm | Y | 786,432 |
|
||||
| fenix8solar51mm | Y | 786,432 |
|
||||
| fenixe | Y | 786,432 |
|
||||
| fr165 | Y | 786,432 |
|
||||
| fr165m | Y | 786,432 |
|
||||
| fr255m | Y | 786,432 |
|
||||
| fr255sm | Y | 786,432 |
|
||||
| fr265 | Y | 786,432 |
|
||||
| fr265s | Y | 786,432 |
|
||||
| fr57042mm | Y | 786,432 |
|
||||
| fr57047mm | Y | 786,432 |
|
||||
| fr955 | Y | 786,432 |
|
||||
| fr965 | Y | 786,432 |
|
||||
| fr970 | Y | 786,432 |
|
||||
| instinct3amoled45mm | Y | 786,432 |
|
||||
| instinct3amoled50mm | Y | 786,432 |
|
||||
| instinctcrossoveramoled | Y | 786,432 |
|
||||
| marq2 | Y | 786,432 |
|
||||
| marq2aviator | Y | 786,432 |
|
||||
| system8preview | N | 786,432 |
|
||||
| venu2 | Y | 786,432 |
|
||||
| venu2plus | Y | 786,432 |
|
||||
| venu2s | Y | 786,432 |
|
||||
| venu3 | Y | 786,432 |
|
||||
| venu3s | Y | 786,432 |
|
||||
| venu441mm | Y | 786,432 |
|
||||
| venu445mm | Y | 786,432 |
|
||||
| venusq2 | Y | 786,432 |
|
||||
| venusq2m | Y | 786,432 |
|
||||
| venux1 | Y | 786,432 |
|
||||
| vivoactive5 | Y | 786,432 |
|
||||
| vivoactive6 | Y | 786,432 |
|
||||
| approachs62 | N | 1,048,576 |
|
||||
| d2air | Y | 1,048,576 |
|
||||
| edge1030 | Y | 1,048,576 |
|
||||
| edge1030bontrager | Y | 1,048,576 |
|
||||
| edge1030plus | Y | 1,048,576 |
|
||||
| edge1040 | Y | 1,048,576 |
|
||||
| edge1050 | Y | 1,048,576 |
|
||||
| edge520plus | Y | 1,048,576 |
|
||||
| edge530 | Y | 1,048,576 |
|
||||
| edge540 | Y | 1,048,576 |
|
||||
| edge550 | Y | 1,048,576 |
|
||||
| edge820 | Y | 1,048,576 |
|
||||
| edge830 | Y | 1,048,576 |
|
||||
| edge840 | Y | 1,048,576 |
|
||||
| edge850 | Y | 1,048,576 |
|
||||
| edgeexplore | Y | 1,048,576 |
|
||||
| edgeexplore2 | Y | 1,048,576 |
|
||||
| edgemtb | Y | 1,048,576 |
|
||||
| edge_1000 | N | 1,048,576 |
|
||||
| epix | N | 1,048,576 |
|
||||
| fr645m | Y | 1,048,576 |
|
||||
| legacyherocaptainmarvel | Y | 1,048,576 |
|
||||
| legacyherofirstavenger | Y | 1,048,576 |
|
||||
| legacysagadarthvader | Y | 1,048,576 |
|
||||
| legacysagarey | Y | 1,048,576 |
|
||||
| venu | Y | 1,048,576 |
|
||||
| venud | Y | 1,048,576 |
|
||||
| venusqm | Y | 1,048,576 |
|
||||
| vivoactive3m | Y | 1,048,576 |
|
||||
| vivoactive3mlte | Y | 1,048,576 |
|
||||
| vivoactive4 | Y | 1,048,576 |
|
||||
| vivoactive4s | Y | 1,048,576 |
|
||||
| d2charlie | N | 1,310,720 |
|
||||
| d2delta | Y | 1,310,720 |
|
||||
| d2deltapx | Y | 1,310,720 |
|
||||
| d2deltas | Y | 1,310,720 |
|
||||
| descentmk1 | N | 1,310,720 |
|
||||
| descentmk2 | Y | 1,310,720 |
|
||||
| descentmk2s | Y | 1,310,720 |
|
||||
| fenix5plus | Y | 1,310,720 |
|
||||
| fenix5splus | Y | 1,310,720 |
|
||||
| fenix5x | Y | 1,310,720 |
|
||||
| fenix5xplus | Y | 1,310,720 |
|
||||
| fenix6pro | Y | 1,310,720 |
|
||||
| fenix6spro | Y | 1,310,720 |
|
||||
| fenix6xpro | Y | 1,310,720 |
|
||||
| fr245m | Y | 1,310,720 |
|
||||
| fr745 | Y | 1,310,720 |
|
||||
| fr945 | Y | 1,310,720 |
|
||||
| fr945lte | Y | 1,310,720 |
|
||||
| marqadventurer | Y | 1,310,720 |
|
||||
| marqathlete | Y | 1,310,720 |
|
||||
| marqaviator | Y | 1,310,720 |
|
||||
| marqcaptain | Y | 1,310,720 |
|
||||
| marqcommander | Y | 1,310,720 |
|
||||
| marqdriver | Y | 1,310,720 |
|
||||
| marqexpedition | Y | 1,310,720 |
|
||||
| marqgolfer | Y | 1,310,720 |
|
||||
| gpsmap66 | Y | 2,359,296 |
|
||||
| gpsmap67 | Y | 2,359,296 |
|
||||
| gpsmap86 | N | 2,359,296 |
|
||||
| gpsmaph1 | Y | 2,359,296 |
|
||||
| montana7xx | Y | 2,359,296 |
|
||||
| oregon7xx | N | 2,359,296 |
|
||||
| rino7xx | N | 2,359,296 |
|
||||
45
README.md
45
README.md
@@ -200,7 +200,14 @@ You can now specify alternative texts to use instead of "On" and "Off", e.g. "Lo
|
||||
|
||||
The [schema](https://raw.githubusercontent.com/house-of-abbey/GarminHomeAssistant/main/config.schema.json) is checked by using a URL directly back to this GitHub source repository, so you do not need to install that file. You can just copy & paste your entity names from the YAML configuration files used to configure HomeAssistant. With a submenu, there's a difference between `title` and `name`. The `name` goes on the menu item, and the `title` at the head of the submenu. If your dashboard definition fails to meet the schema, the application will simply drop items with the wrong field names without warning to protect itself.
|
||||
|
||||
### Old deprecated format
|
||||
### Old Deprecated Formats
|
||||
|
||||
There are two reasons for the changes to the schema:
|
||||
|
||||
1. HomeAssistant made changes we feel we should track for consistency.
|
||||
2. Retrospectively we decided there was a better way, just like HomeAssistant did. For these changes we apologise.
|
||||
|
||||
#### Service Field
|
||||
|
||||
Version 1.5 brought in a change to the JSON schema so the following old format remains useable but is no longer favoured.
|
||||
|
||||
@@ -245,6 +252,40 @@ The above should be replaced by the following:
|
||||
|
||||
This allows the `confirm` and `pin` fields to be accommodated in the `tap_action` along side the `action` tag, and follows the HomeAssistant YAML format more closely.
|
||||
|
||||
#### Exit Field
|
||||
|
||||
Version 2.31 added an "exit on tap" feature. In retrospect this field should have been nested inside the `tap_action` object.
|
||||
|
||||
> [!IMPORTANT] Deprecated:
|
||||
|
||||
```json
|
||||
{
|
||||
"entity": "automation.turn_off_stuff",
|
||||
"name": "Turn off Stuff",
|
||||
"type": "tap",
|
||||
"tap_action": {
|
||||
"action": "automation.trigger"
|
||||
},
|
||||
"exit": true
|
||||
}
|
||||
```
|
||||
|
||||
The above should be replaced by the following:
|
||||
|
||||
```json
|
||||
{
|
||||
"entity": "automation.turn_off_stuff",
|
||||
"name": "Turn off Stuff",
|
||||
"type": "tap",
|
||||
"tap_action": {
|
||||
"action": "automation.trigger",
|
||||
"exit": true
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
A future move to v3.x will remove support for all deprecated JSON elements to simplify code. **Please ensure you track the schema changes in readiness.**
|
||||
|
||||
### More Examples
|
||||
|
||||
* [Switches](examples/Switches.md)
|
||||
@@ -402,6 +443,8 @@ Check the latest unresolved [issues](https://github.com/house-of-abbey/GarminHom
|
||||
|
||||
9. When using Wi-Fi or LTE to toggle a light, the `toggle` will fail when the default or current state of the application's menu does not match the state of the light. The same applies to a cover or other thing that can be toggled. This is because the application is unable to initialise the menu with the current state without Bluetooth. Hence the Wi-Fi/LTE functionality is best used with `tap` items only.
|
||||
|
||||
10. There are memory limits, particularly for older devices. Please see the [explanation of the memory limits](Devices.md) and device support.
|
||||
|
||||
# Authors & Contributors
|
||||
|
||||
For an up to date list of all authors and contributors, please check the [contributor's page](https://github.com/house-of-abbey/GarminHomeAssistant/graphs/contributors). Thank you all for improving this application.
|
||||
|
||||
@@ -95,9 +95,9 @@ You can choose individual items that will quit after they have completed their a
|
||||
"name": "Turn off Stuff",
|
||||
"type": "tap",
|
||||
"tap_action": {
|
||||
"action": "automation.trigger"
|
||||
},
|
||||
"action": "automation.trigger",
|
||||
"exit": true
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -75,6 +75,6 @@ The following shows the default glance when the menu file is not available at th
|
||||
|
||||
<img src="../images/Venu2_glance_no_menu.png" width="200" title="Venu 2 Glance showing errors"/>
|
||||
|
||||
Once the custom glance template has been retrieved and evaluated the display will change. Should the connectivity to your Home Assistant then be lost, e.g. you move out of range of your phone, the glance reflects this in the colour of the residual two rectangles. The top one remains an indicator for the API, and the bottom rectangle remains an indicator for the menu availability, reflecting the original placement in the default glance view that has now been replaced.
|
||||
Once the custom glance template has been retrieved and evaluated the display will change. Should the connectivity to your HomeAssistant then be lost, e.g. you move out of range of your phone, the glance reflects this in the colour of the residual two rectangles. The top one remains an indicator for the API, and the bottom rectangle remains an indicator for the menu availability, reflecting the original placement in the default glance view that has now been replaced.
|
||||
|
||||
<img src="../images/Venu2_glance_no_bt.png" width="200" title="Venu 2 Glance showing lost connectivity"/>
|
||||
|
||||
@@ -41,9 +41,9 @@ It may well be the case that often `attribute` and `data_attribute` are the same
|
||||
|
||||
## Helper
|
||||
|
||||
You might define a "helper" entity as follows in Home Assistant:
|
||||
You might define a "helper" entity as follows in HomeAssistant:
|
||||
|
||||
<img src="../images/my_float.png" width="400" title="Home Assistant Helper definition for an 'input_number'." style="margin:5px"/>
|
||||
<img src="../images/my_float.png" width="400" title="HomeAssistant Helper definition for an 'input_number'." style="margin:5px"/>
|
||||
|
||||
In this case, the state is the actual value, so the template uses `states(..)` instead of `state_attr(..)`, you must not set the optional `attribute` value in the JSON definition so that the application uses the correct template internally for querying the HA server for its present value. Your own template definition in the `content` field will need to follow suit too. The `data_attribute` must be set to `value` for the service call that sets the chosen value from the number carousel.
|
||||
|
||||
@@ -88,9 +88,9 @@ The complication here is this amplifier uses one scale for changing the value, a
|
||||
}
|
||||
```
|
||||
|
||||
The above is a little awkward to change the volume as the picker's scale is unfamiliar. To make life easier you might choose to implement a "Template number" in Home Assistant as defined in the following dialogue box.
|
||||
The above is a little awkward to change the volume as the picker's scale is unfamiliar. To make life easier you might choose to implement a "Template number" in HomeAssistant as defined in the following dialogue box.
|
||||
|
||||
<img src="../images/template_number.png" width="500" title="Home Assistant Helper definition for an 'input_number'." style="margin:5px"/>
|
||||
<img src="../images/template_number.png" width="500" title="HomeAssistant Helper definition for an 'input_number'." style="margin:5px"/>
|
||||
|
||||
For copy and paste, the Jinja2 fields are as follows:
|
||||
|
||||
@@ -112,7 +112,7 @@ For copy and paste, the Jinja2 fields are as follows:
|
||||
{{ not is_state('media_player.amplifier','unavailable') }}
|
||||
```
|
||||
|
||||
As an alternative to using the GUI, the following can be pasted into Home Assistant's `configuration.yaml`:
|
||||
As an alternative to using the GUI, the following can be pasted into HomeAssistant's `configuration.yaml`:
|
||||
|
||||
```yaml
|
||||
template:
|
||||
@@ -160,4 +160,4 @@ The JSON menu definition can now use dB with the new template number as follows.
|
||||
|
||||
Specific to this menu item:
|
||||
|
||||
1. If the number picker does not initialise with the correct value, amend the `attribute` field. Just because your template renders does not mean the application has extracted the numeric value as the `content` template is rendered on the Home Assistant server.
|
||||
1. If the number picker does not initialise with the correct value, amend the `attribute` field. Just because your template renders does not mean the application has extracted the numeric value as the `content` template is rendered on the HomeAssistant server.
|
||||
|
||||
@@ -118,7 +118,9 @@ You can choose individual items that will quit after they have completed their a
|
||||
"entity": "light.hall_light",
|
||||
"name": "Hall Light & Quit",
|
||||
"type": "toggle",
|
||||
"tap_action" {
|
||||
"exit": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user