Compare commits

..

23 Commits

Author SHA1 Message Date
dbd0a42d2e Merge pull request #120 from house-of-abbey/118-allow-turning-off-vibration
118 allow turning off vibration
2024-03-08 16:20:36 +00:00
aeeb1aa96e Documentation update 2024-03-08 09:18:48 +00:00
be66c282df Apply automatic changes 2024-03-07 22:31:32 +00:00
4dc31e3c65 Removed a widget only property
That should have been removed previously.
2024-03-07 22:14:25 +00:00
92d3fbee57 Initial fixes 2024-03-07 21:59:33 +00:00
181335bfd7 Update README.md
Added a new [!IMPORTANT] tag
2024-03-06 18:34:40 +00:00
b684c1172a Merge pull request #116 from house-of-abbey/113-splitting-widget-and-app-code
113 splitting widget and app code
2024-02-20 20:59:52 +00:00
0ee20de6c5 Update HISTORY.md 2024-02-18 15:04:32 +00:00
d5ed16e6d2 Amended export.cmd
And removed an old comment from HomeAssistantApp.mc
2024-02-18 15:00:36 +00:00
8e2a4333ca Reverted manifest to test app ID
Removed comments used for running the widget in simulation.
2024-02-11 19:37:43 +00:00
a65dcd6811 Removed widget specific code 2024-02-11 19:35:34 +00:00
7b6fc65bf2 Update TroubleShooting.md
Spelling.
2024-02-11 19:30:12 +00:00
b65d45c955 Update README.md
Added known issue with iPhone's Connect IQ App
2024-02-11 18:31:49 +00:00
85b01eca91 Update issue templates 2024-02-08 21:05:53 +00:00
3ffaa744e0 Update issue templates 2024-02-08 21:02:32 +00:00
d488897fbd Update issue templates 2024-02-08 20:24:45 +00:00
457dcca002 Fix spacing inconsistencies 2024-02-06 21:47:33 +00:00
3a96f24f1d Merge pull request #110 from mymyke/patch-1
Fixed off-by-one error in Templates.md
2024-02-06 21:43:04 +00:00
5971e7f852 Merge pull request #109 from house-of-abbey/108-bug-fixes-to-26
3 bug fixes as per the issue description
2024-02-06 21:17:10 +00:00
f486a2c868 Update Templates.md
Round function added the brightness display part of content to correct off-by-one errors.
For example, setting brightnes to 30% would previously show 29% and now shows 30%
2024-02-05 22:44:27 +01:00
0dfcc65469 3 bug fixes as per the issue description 2024-02-05 19:09:26 +00:00
4d4a86f195 Update README.md
Added knwoon issue with Edge 540 and 840 devices.
2024-02-01 21:32:46 +00:00
9e1c5959ab Merge pull request #107 from house-of-abbey/100-help-text-for-web-based-configuration-editor
Documentation for web editor
2024-01-31 13:36:34 +00:00
59 changed files with 281 additions and 824 deletions

10
.github/ISSUE_TEMPLATE/blank-issue.md vendored Normal file
View File

@ -0,0 +1,10 @@
---
name: Blank issue
about: Describe this issue template's purpose here.
title: ''
labels: ''
assignees: ''
---

47
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,47 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**IMPORTANT!**
I have:
- [ ] Used HTTPS to access HomeAssistant (with a public certificate)
- [ ] Checked that my JSON Syntax is correct ([options 2, 3, or 4](https://github.com/house-of-abbey/GarminHomeAssistant#editing-the-json-file) or otherwise)
- [ ] Checked that my JSON follows the schema ([options 2, 3, or 4](https://github.com/house-of-abbey/GarminHomeAssistant#editing-the-json-file))
- [ ] Used the online editor to check my JSON against HomeAssistant ([option 1](https://github.com/house-of-abbey/GarminHomeAssistant#editing-the-json-file))
- [ ] Checked the [Docs](https://github.com/house-of-abbey/GarminHomeAssistant)
- [ ] Checked the [Troubleshooting Guide](https://github.com/house-of-abbey/GarminHomeAssistant/blob/main/TroubleShooting.md)
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Garmin Device (please complete the following information):**
- Model: [e.g. Venu 2]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
**Additional context**
Add any other context about the problem here.

View File

@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@ -8,6 +8,8 @@ The background service can report the following statuses from your device to you
- Location and location accuracy.
- Activity information, but only if your device supports API level 3.2.0. If your device does not support this API level, this information is simply omitted. How do you know? Easiest way is to see if the data is reported.
If your device does not support the background service, the application will clear this setting after you have enabled it. This tells you that you are unable to take advantage of the background reporting service for the functions below.
## 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.

View File

@ -18,4 +18,7 @@
| 2.3 | Fix for battery level updates where previously the function only worked for administrator accounts. The new solution is based on Webhooks and is simpler to implement on Home Assistant. Language support fix where an automatic translation produced an inappropriate word, possibly in more than one language. |
| 2.4 | Sensor status reporting via Home Assistant 'templates'. This provides a generalised way of viewing the status of any entity as long as the result can be rendered as text, e.g. 'uncovered', 'open', '76%', '21 °C'. Removal of the menu style option. The original style was kept after the introduction of the icon style solely to keep the code for a possible re-use for sensor statuses. This version delivers that new feature, hence the style option has been removed. The new JSON configuration file format allows for the old style to be replicated if you are desperate! Added a feature to provide parameters to actions (`tap` or `template`). Added a feature to confirm `toggle` menu items. |
| 2.5 | A small memory efficiency of about 1kB by removing `RezStrings.mc`. This will aid widgets on old watches that only have 60kB available to an application and are using about 45kB before the menu is fetched, hence 1kB is more significant to those devices. |
| 2.6 | Added more information reporting to the background service, in addition to the device battery level and charging status, we now include location, location accuracy, and (if supported by your device) the activity information. Note the updates are sent periodically and are not event driven. |
| 2.6 | Added more information reporting to the background service, in addition to the device battery level and charging status, we now include location, location accuracy, and (if supported by your device) the activity information. Note the updates are sent periodically and are not event driven. |
| 2.7 | Bug fix release: 1. Handling a settings change, 2. Avoid caching a bad menu, 3. Managing bad JSON in menu definitions. |
| 2.8 | Separation release. The application and widget are no longer joined and now have separate source code repositories. The widget version is now in "maintenance only mode" hence will not receive new features, whilst the application version can now take advantage of not being constrained by the widget's memory limitation, which should allow new features to be added in the future. |
| 2.9 | Added an option to enable confirmation vibration so it can be turned off by request of a user. Removed a redundant setting for the alternative Widget version that was not removed previously, and fixed a bug with dereferencing Null. |

View File

@ -10,7 +10,8 @@ The application is designed around a simple scrollable menu where menu items hav
**The intended audience for this application are those comfortable with configuring a Home Assistant** (e.g. editing the YAML configuration files) and debugging why URLs don't work. It does not require programming skills, but the menu is configured via JSON which feels like "coding". If you are not comfortable with this relatively low level of configuration, you may like to try other Garmin applications instead.
It is important to note that your Home Assistant instance will need to be accessible via HTTPS with public SSL or all requests from the Garmin will not work. This cannot be a self-signed certificate, it must be a public certificate. You can get one for free from [Let's Encrypt](https://letsencrypt.org/) or you can pay for [Home Assistant cloud](https://www.nabucasa.com/). (You can install a local [Nginx proxy server](https://my.home-assistant.io/redirect/supervisor_addon/?addon=a0d7b954_nginxproxymanager) to manage Let's Encrypt certificates.)
> [!IMPORTANT]
> It is important to note that your Home Assistant instance will need to be accessible via HTTPS with public SSL or all requests from the Garmin will not work. This cannot be a self-signed certificate, it must be a public certificate. You can get one for free from [Let's Encrypt](https://letsencrypt.org/) or you can pay for [Home Assistant cloud](https://www.nabucasa.com/). (You can install a local [Nginx proxy server](https://my.home-assistant.io/redirect/supervisor_addon/?addon=a0d7b954_nginxproxymanager) to manage Let's Encrypt certificates.)
**If you are struggling with getting the application to work, please consult the [trouble shooting](TroubleShooting.md#menu-configuration-url) guide first.**
@ -22,9 +23,17 @@ As of version 2.0, there are now two installable versions. For older devices bef
| Version | Explanation |
|------------------------|-------------|
| Application (original) | For newer devices that allow glance views in their applications, e.g. Venu 2, the GarminHomeAssistant application can be started either from a glance or from the list of applications and activities. Head over to the [GarminHomeAssistant](https://apps.garmin.com/en-US/apps/61c91d28-ec5e-438d-9f83-39e9f45b199d) application page on the [Connect IQ application store](https://apps.garmin.com/en-US/) to download the application. The application can be started two different ways, either from the glance in the carousel, or as an application from the list of applications & activities. With the latter, it is worth marking the application as a favourite.<br/><img src="images/Venu2_app_start.png" width="200" title="Venu 2" style="margin:5px"/><img src="images/Vivoactive3_app_start.jpg" width="200" title="Venu 2" style="margin:5px"/><br/>If you place the application on your list of favourites, and rearrange it to appear near the top, then the item is just one button press away from the watch face. This second picture here shows the application menu on a Vivoactive 3 watch.<br/><img src="images/Venu2_glance_start.png" width="200" title="Venu 2" style="margin:5px"/><br/>On newer watches, you can also start the application from the glance carousel. The glance view here typically displays some trackable status, so ours provides some early indication of availability. Older watches will still allow you to start this application from the list of applications and activities. |
| Widget | For older devices that use widgets, e.g. Venu (1) as opposed to applications with "glances", the GarminHomeAssistant application can instead be started from the widget carousel. This is a separate item in the Connect IQ AppStore and with this installation, the application will no longer appear in the list of applications and activities. Head over to the [GarminHomeAssistant](https://apps.garmin.com/en-US/apps/) widget page on the [Connect IQ application store](https://apps.garmin.com/en-US/) to download the widget.<br/><img src="images/Venu_Widget_sim.png" width="200" title="Venu 2" style="margin:5px"/><br/>Typically the widget view implements something similar to the glance view, e.g. status, and exists in a widget carousel to allow you to select an application to launch.<br>**Please note that memory in widgets is more limited than applications. This means a large menu definition can crash the widget without the code catching the error.** |
| Widget | **"Maintenance only mode"** so no new features will be added to this version.<br>For older devices that use widgets, e.g. Venu (1) as opposed to applications with "glances", the GarminHomeAssistant application can instead be started from the widget carousel. This is a separate item in the Connect IQ AppStore and with this installation, the application will no longer appear in the list of applications and activities. Head over to the [GarminHomeAssistant](https://apps.garmin.com/en-US/apps/) widget page on the [Connect IQ application store](https://apps.garmin.com/en-US/) to download the widget.<br/><img src="images/Venu_Widget_sim.png" width="200" title="Venu 2" style="margin:5px"/><br/>Typically the widget view implements something similar to the glance view, e.g. status, and exists in a widget carousel to allow you to select an application to launch.<br>**Please note that memory in widgets is more limited than applications. This means a large menu definition can crash the widget without the code catching the error.**<br> This version was born out of the application version and from Ver 2.0 shared the same source code repository until Ver 2.8 when they were [separated](https://github.com/house-of-abbey/GarminHomeAssistantWidget) to allow the application version to take advantage of its increase memory availability. |
As the source code base for both is the same, the version numbers of each will be kept in step. That means that the widget version starts version numbering at 2.0.
### Source Code Repositories
* [Application](https://github.com/house-of-abbey/GarminHomeAssistant)
* [Widget](https://github.com/house-of-abbey/GarminHomeAssistantWidget)
### Connect IQ Store
* [Application](https://apps.garmin.com/en-US/apps/61c91d28-ec5e-438d-9f83-39e9f45b199d)
* [Widget](https://apps.garmin.com/en-US/apps/559f5174-177f-4f46-b170-f31c7e74dea3)
## Dashboard Definition
@ -193,6 +202,8 @@ Paste in your JSON (and change the file type to JSON if not saving), it will the
A failure to get the file format right tends to mean that the response to the application errors with `INVALID_HTTP_BODY_IN_NETWORK_RESPONSE` (code of -400). This means the response did not contain JSON, it was probably an error message in plain text that could not be parsed by the Connect IQ API call. See [Toybox.Communications](https://developer.garmin.com/connect-iq/api-docs/Toybox/Communications.html) for the list of error code you might be presented with on your device.
There are some cases where the file format may be valid JSON, but invalid against the schema, and the failure to catch this error could cause the application to crash. Whilst we have taken care to manage many issues, there may still be cases that are uncaught.
Make sure you can browse to the URL of your JSON file in a standard web browser to make sure it is accessible.
## API Key Creation
@ -227,12 +238,12 @@ You should now have a working application on your watch and be able to operate y
You may choose to cache your menu definition on your device in order to reduce the delay in showing the menu (as it saves waiting for an HTTP GET request). If you use this option you are responsible for managing the cache when the menu is updated at source. The toggle option below the cache option allows you to choose to refresh the cache the next time the application starts. Once the cache has been cleared, the application will reset this toggle for you, so you do not need to return to the settings to amend it.
The application uses vibration to confirm the action has been requested, as opposed to the 'toast' appears to show the action has been successfully executed. This is enabled by default but may be turned off if you do not desire this behaviour.
The application timeout prevents the app running on your watch when you have forgotten to close it. It prevents the refreshing of the menu statuses and therefore excessive wear on your battery level. There is a second timeout value for confirmation views. This is intended for use with more sensitive toggles so that the confirmation view is not left open and forgotten and then confirmed accidentally without you noticing. **We cannot advise you this is safe, be careful what you toggle with the watch application!**
There is a toggle setting for "text alignment" that provides finer adjustment for right-to-left languages. Perhaps this could be made automatic based on device language?
Another toggle setting for the **Widget version only** allows the user to select a non-standard user interface behaviour. As soon as the menu is retrieved the widget view is replaced by the menu without waiting for a user selection. This has been included as requested by a user, but defaults to off which retains the expected user interactions.
The application and widget both include a background service to report your watch's battery level and charging status. You may enable a background service to report the battery level to your Home Assistant. This is not available over your Bluetooth connection like with other Bluetooth devices as Garmin did not implement it. This no longer requires any setup, and we offer this [trouble shooting](TroubleShooting.md#watch-battery-level-reporting) guide. The last field here is readonly and allows the user to copy & paste the Webhook ID setup by the application when required for this trouble shooting guide.
## Tap Item Response
@ -278,13 +289,19 @@ The `id` attribute values are taken from the same names used in [`strings.xml`](
## Known Issues
1. On some (old) devices (e.g. Vivoactive 3, Fenix 5s & Edge 520+), the menu does not update correctly to reflect changes in state effected by an external Home Assistant control. E.g. when the phone application changes the toggle status of a switch, the Garmin application does not reflect that change until the menu is touched or scrolled a little. This is a [known issue](https://forums.garmin.com/developer/connect-iq/i/bug-reports/menu2-doesn-t-allow-live-updates) already reported without a suggested software fix.
1. There are some cases where the file format may be valid JSON, but invalid against the schema, and the failure to catch this error could cause the application to crash. Whilst we have taken care to manage many issues, there may still be cases that are uncaught. Please verify your JSON schema, see the [trouble shooting guide](TroubleShooting.md).
2. Widgets have less memory than applications. With the new template based sensor display, widgets are more likely to run out of memory. E.g. a Vivoactive 3 device has a memory limit of 60 kB runtime memory for widgets (compared with 124 kB for applications) and memory is likely to be ~90% used. This makes it very likely that a larger menu will crash the application. We cannot predict what will take the application "over the edge", but we can provide this feedback to users to raise awareness, hence the widget displays menu usage as a reminder. If the widget is crashing but the application variant is not, then your menu configuration is too big for the widget. **Please don't give the application a poor review for crashing on your excessive menu definition!**
2. On some (old) devices (e.g. Vivoactive 3, Fenix 5s & Edge 520+), the menu does not update correctly to reflect changes in state effected by an external Home Assistant control. E.g. when the phone application changes the toggle status of a switch, the Garmin application does not reflect that change until the menu is touched or scrolled a little. This is a [known issue](https://forums.garmin.com/developer/connect-iq/i/bug-reports/menu2-doesn-t-allow-live-updates) already reported without a suggested software fix.
3. The iPhone Connect IQ application has a bug in it we cannot be responsible for. Thanks to user [a_smart_hoome](https://community.home-assistant.io/u/a_smart_hoome) who worked the problem with the dropped Internet connection, see his explanation at https://community.home-assistant.io/t/home-assistant-app-for-garmin/637348/61 for details. Please complain to the Connect IQ application developers rather than us!
4. Widgets have less memory than applications. With the new template based sensor display, widgets are more likely to run out of memory. E.g. a Vivoactive 3 device has a memory limit of 60 kB runtime memory for widgets (compared with 124 kB for applications) and memory is likely to be ~90% used. This makes it very likely that a larger menu will crash the application. We cannot predict what will take the application "over the edge", but we can provide this feedback to users to raise awareness, hence the widget displays menu usage as a reminder. If the widget is crashing but the application variant is not, then your menu configuration is too big for the widget. **Please don't give the application a poor review for crashing on your excessive menu definition!**
<img src="images/Venu_Widget_sim.png" width="200" title="Venu 2" style="margin:5px"/>
<img src="images/app_crash.png" width="200" title="Venu 2" style="margin:5px;border: 2px solid black;"/>
3. Templates can require significant definition for highly customised text. Just remember, you have the ability to crash the application by creating an excessively long menu definition. Don't be silly.
5. Templates can require significant definition for highly customised text. Just remember, you have the ability to crash the application by creating an excessively long menu definition. Don't be silly.
4. Parameters to tap menu items cannot have their parameter usage verified. If you get this wrong and crash the application, that's your fault not the application's. In this case, start by removing the parameters for the menu item causing the crash, and add them back one at a time until you find your fault. **Please don't give the application a poor review for your bad parameter definition!**
6. Parameters to tap menu items cannot have their parameter usage verified. If you get this wrong and crash the application, that's your fault not the application's. In this case, start by removing the parameters for the menu item causing the crash, and add them back one at a time until you find your fault. **Please don't give the application a poor review for your bad parameter definition!**
7. We are unable to support Edge 540 and Edge 840 devices at this time. The simulation of both these devices has two unexpected errors when toggling or executing taps. We get both `Communications.NETWORK_RESPONSE_OUT_OF_MEMORY` and `Communications.BLE_QUEUE_FULL` even though the memory usage is about 6% of the available RAM. We would appreciate any leads others may have on how to solve this issue.

View File

@ -6,13 +6,15 @@
Before [raising an issue](https://github.com/house-of-abbey/GarminHomeAssistant/issues) about a possible bug, _please, please_ check your JSON is compliant with both the JSON format and our schema. To do this you have options. The first is what we use.
1. **Best!** Use the GarminHomeAssistant [Web-based Editor](https://house-of-abbey.github.io/GarminHomeAssistant/web/) which includes `entity` and `service` name completion and validation by fetching data from your own Home Assistant instance. _Pretty nifty eh?_ The other method listed below do not add this convenience and checking.
1. **Best!** Use the GarminHomeAssistant [Web-based Editor](https://house-of-abbey.github.io/GarminHomeAssistant/web/) which includes `entity` and `service` name completion and validation by fetching data from your own Home Assistant instance. _Pretty nifty eh?_ The other methods listed below do not add this convenience and checking.
2. Use the [Studio Code Server](https://community.home-assistant.io/t/home-assistant-community-add-on-visual-studio-code/107863) addon for Home Assistant. You can then edit your JSON file in place.
3. Locally installed VSCode, or if not installed, try
4. The on-line version at https://vscode.dev/, which works really well. Paste in your JSON (and change the file type to JSON if not saving), it will then verify your file format and schema for you, highlighting any errors for you to fix.
A failure to get the file format right tends to mean that the response to the application errors with `INVALID_HTTP_BODY_IN_NETWORK_RESPONSE` (code of -400). This means the response did not contain JSON, it was probably an error message in plain text that could not be parsed by the Connect IQ API call. See [Toybox.Communications](https://developer.garmin.com/connect-iq/api-docs/Toybox/Communications.html) for the list of error code you might be presented with on your device.
There are some cases where the file format may be valid JSON, but invalid against the schema, and the failure to catch this error could cause the application to crash. Whilst we have taken care to manage many issues, there may still be cases that are uncaught.
Make sure you can browse to the URL of your JSON file in a standard web browser to make sure it is accessible.
## Watch Menu and API

View File

@ -29,13 +29,8 @@ rem Assume we can create and use this directory
set DEST=export
rem Device for simulation
rem set DEVICE=venu2
set DEVICE=vivoactive3
rem Application
rem set JUNGLE=monkey.jungle
rem Or Widget
set JUNGLE=monkey-widget.jungle
set DEVICE=venu2
set JUNGLE=monkey.jungle
rem C:\>java -jar %SDK_PATH%\monkeybrains.jar -h
rem usage: monkeyc [-a <arg>] [-b <arg>] [--build-stats <arg>] [-c <arg>] [-d <arg>]
@ -104,7 +99,7 @@ rem Compile PRG for a single device for side loading
-Dapple.awt.UIElement=true ^
-jar %SDK_PATH%\monkeybrains.jar ^
--output %SRC%\bin\HomeAssistant.prg ^
--jungles %SRC%\monkey-widget.jungle ^
--jungles %SRC%\%JUNGLE% ^
--private-key %SRC%\..\developer_key ^
--device %DEVICE%_sim ^
--warn ^

View File

@ -54,7 +54,7 @@ In order to keep the formatting of floating point numbers under control, you mig
{
"name": "Hallway",
"type": "template",
"content": "T:{{ '%.1f'|format(states('sensor.hallway_temperature')|float) }}°C, H:{{ '%.1f'|format(states('sensor.hallway_humidity')|float) }}%"
"content": "T:{{ '%.1f' | format(states('sensor.hallway_temperature') | float) }}°C, H:{{ '%.1f' | format(states('sensor.hallway_humidity') | float) }}%"
},
```
@ -115,13 +115,13 @@ An example of a dimmer light with 4 brightness settings 0..3. Here our light wor
"entity": "light.green_house",
"name": "LEDs",
"type": "template",
"content": "{% if not (is_state('light.green_house', 'off') or is_state('light.green_house', 'unavailable')) %}{{ ((state_attr('light.green_house', 'brightness') | float) / 255 * 100) | int }}%{% else %}Off{% endif %}"
"content": "{% if not (is_state('light.green_house', 'off') or is_state('light.green_house', 'unavailable')) %}{{ (((state_attr('light.green_house', 'brightness') | float) / 255 * 100) | round(0)) | int }}%{% else %}Off{% endif %}"
},
{
"entity": "light.green_house",
"name": "LEDs 0",
"type": "template",
"content": "{% if not (is_state('light.green_house', 'off') or is_state('light.green_house', 'unavailable')) %}{{ ((state_attr('light.green_house', 'brightness') | float) / 255 * 100) | int }}%{% else %}Off{% endif %}",
"content": "{% if not (is_state('light.green_house', 'off') or is_state('light.green_house', 'unavailable')) %}{{ (((state_attr('light.green_house', 'brightness') | float) / 255 * 100) | round(0)) | int }}%{% else %}Off{% endif %}",
"tap_action": {
"service": "light.turn_on",
"data": {
@ -144,7 +144,7 @@ An example of a dimmer light with 4 brightness settings 0..3. Here our light wor
"entity": "light.green_house",
"name": "LEDs 2",
"type": "template",
"content": "{% if not (is_state('light.green_house', 'off') or is_state('light.green_house', 'unavailable')) %}{{ ((state_attr('light.green_house', 'brightness') | float) / 255 * 100) | int }}%{% else %}Off{% endif %}",
"content": "{% if not (is_state('light.green_house', 'off') or is_state('light.green_house', 'unavailable')) %}{{ (((state_attr('light.green_house', 'brightness') | float) / 255 * 100) | round(0)) | int }}%{% else %}Off{% endif %}",
"tap_action": {
"service": "light.turn_on",
"data": {
@ -156,7 +156,7 @@ An example of a dimmer light with 4 brightness settings 0..3. Here our light wor
"entity": "light.green_house",
"name": "LEDs 3",
"type": "template",
"content": "{% if not (is_state('light.green_house', 'off') or is_state('light.green_house', 'unavailable')) %}{{ ((state_attr('light.green_house', 'brightness') | float) / 255 * 100) | int }}%{% else %}Off{% endif %}",
"content": "{% if not (is_state('light.green_house', 'off') or is_state('light.green_house', 'unavailable')) %}{{ (((state_attr('light.green_house', 'brightness') | float) / 255 * 100) | round(0))| int }}%{% else %}Off{% endif %}",
"tap_action": {
"service": "light.turn_on",
"data": {

View File

@ -27,6 +27,7 @@ set /p SDK_PATH=<"%USERPROFILE%\AppData\Roaming\Garmin\ConnectIQ\current-sdk.cfg
set SDK_PATH=%SDK_PATH:~0,-1%\bin
rem Assume we can create and use this directory
set DEST=export
set IQ=HomeAssistant-app.iq
rem C:\>java -jar %SDK_PATH%\monkeybrains.jar -h
rem usage: monkeyc [-a <arg>] [-b <arg>] [--build-stats <arg>] [-c <arg>] [-d <arg>]
@ -72,17 +73,20 @@ rem Batch file's directory where the source code is
set SRC=%~dp0
rem drop last character '\'
set SRC=%SRC:~0,-1%
set DEST=%SRC%\%DEST%
set IQ=%DEST%\%IQ%
if not exist %DEST% (
echo Creating %DEST%
md %DEST%
)
if exist %SRC%\export\HomeAssistant*.iq (
del /f /q %SRC%\export\HomeAssistant*.iq
if exist %IQ% (
echo Deleting old %IQ%
del /f /q %IQ%
)
echo.
echo Starting export of HomeAssistant Application
echo Starting export of HomeAssistant Application to %IQ%
echo.
"%JAVA_PATH%\java.exe" ^
@ -91,32 +95,15 @@ echo.
-Dapple.awt.UIElement=true ^
-jar %SDK_PATH%\monkeybrains.jar ^
--api-level 3.1.0 ^
--output %SRC%\export\HomeAssistant-app.iq ^
--output %IQ% ^
--jungles %SRC%\monkey.jungle ^
--private-key %SRC%\..\developer_key ^
--package-app ^
--release
rem --warn
echo.
echo Starting export of HomeAssistant Widget
echo.
"%JAVA_PATH%\java.exe" ^
-Xms1g ^
-Dfile.encoding=UTF-8 ^
-Dapple.awt.UIElement=true ^
-jar %SDK_PATH%\monkeybrains.jar ^
--api-level 3.1.0 ^
--output %SRC%\export\HomeAssistant-widget.iq ^
--jungles %SRC%\monkey-widget.jungle ^
--private-key %SRC%\..\developer_key ^
--package-app ^
--release
rem --warn
echo.
echo Finished exporting HomeAssistant
dir %SRC%\export\HomeAssistant*.iq
dir %IQ%
pause

Binary file not shown.

Before

Width:  |  Height:  |  Size: 777 KiB

After

Width:  |  Height:  |  Size: 715 KiB

View File

@ -1,28 +0,0 @@
//-----------------------------------------------------------------------------------
//
// Distributed under MIT Licence
// See https://github.com/house-of-abbey/GarminHomeAssistant/blob/main/LICENSE.
//
//-----------------------------------------------------------------------------------
//
// GarminHomeAssistant is a Garmin IQ application written in Monkey C and routinely
// tested on a Venu 2 device. The source code is provided at:
// https://github.com/house-of-abbey/GarminHomeAssistant.
//
// P A Abbey & J D Abbey & Someone0nEarth, 20 December 2023
//
//
// Description:
//
// A tedious diversion intended to make it possible to have the same source code for
// both a widget and an application. This file provides a single constant to
// determine which, and then the source file is conditionally included by the each
// .jungle file.
//
//-----------------------------------------------------------------------------------
using Toybox.Lang;
class WidgetApp {
static const isWidget = false;
}

View File

@ -1,28 +0,0 @@
//-----------------------------------------------------------------------------------
//
// Distributed under MIT Licence
// See https://github.com/house-of-abbey/GarminHomeAssistant/blob/main/LICENSE.
//
//-----------------------------------------------------------------------------------
//
// GarminHomeAssistant is a Garmin IQ application written in Monkey C and routinely
// tested on a Venu 2 device. The source code is provided at:
// https://github.com/house-of-abbey/GarminHomeAssistant.
//
// P A Abbey & J D Abbey & Someone0nEarth, 20 December 2023
//
//
// Description:
//
// A tedious diversion intended to make it possible to have the same source code for
// both a widget and an application. This file provides a single constant to
// determine which, and then the source file is conditionally included by the each
// .jungle file.
//
//-----------------------------------------------------------------------------------
using Toybox.Lang;
class WidgetApp {
static const isWidget = true;
}

View File

@ -1,196 +0,0 @@
<?xml version="1.0"?>
<!--
Distributed under MIT Licence
See https://github.com/house-of-abbey/GarminHomeAssistant/blob/main/LICENSE.
GarminHomeAssistant is a Garmin IQ application written in Monkey C and routinely
tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023
Device Information & References:
* https://developer.garmin.com/connect-iq/compatible-devices/
* https://developer.garmin.com/connect-iq/reference-guides/devices-reference/
Someone0nEarth's Test Widget id="bf69be91-5833-4d96-92ea-c5f1a9db5dcc" type="widget"
philipabbey's Test Widget id="4901cdfb-b4a2-4f33-96c7-f5be5992809e" type="widget"
Live Widget id="585af26f-6ff7-44e8-80dc-b3670e5b8648" type="widget"
-->
<iq:manifest version="3" xmlns:iq="http://www.garmin.com/xml/connectiq">
<!--
Use "Monkey C: Edit Application" from the Visual Studio Code command palette
to update the application attributes.
-->
<iq:application id="4901cdfb-b4a2-4f33-96c7-f5be5992809e" type="widget" name="@Strings.AppName" entry="HomeAssistantApp" launcherIcon="@Drawables.LauncherIcon" minApiLevel="3.1.0">
<!--
Use the following from the Visual Studio Code comand palette to edit
the build targets:
"Monkey C: Set Products by Product Category" - Lets you add all products
that belong to the same product category
"Monkey C: Edit Products" - Lets you add or remove any product
-->
<iq:products>
<iq:product id="approachs7042mm" />
<iq:product id="approachs7047mm" />
<iq:product id="d2air" />
<iq:product id="d2airx10" />
<iq:product id="d2delta" />
<iq:product id="d2deltapx" />
<iq:product id="d2deltas" />
<iq:product id="d2mach1" />
<iq:product id="descentg1" />
<iq:product id="descentmk2" />
<iq:product id="descentmk2s" />
<iq:product id="edge1030" />
<iq:product id="edge1030bontrager" />
<iq:product id="edge1030plus" />
<iq:product id="edge1040" />
<iq:product id="edge520plus" />
<iq:product id="edge530" />
<iq:product id="edge820" />
<iq:product id="edge830" />
<iq:product id="edgeexplore" />
<iq:product id="edgeexplore2" />
<iq:product id="enduro" />
<iq:product id="epix2" />
<iq:product id="epix2pro42mm" />
<iq:product id="epix2pro47mm" />
<iq:product id="epix2pro51mm" />
<iq:product id="fenix5" />
<iq:product id="fenix5plus" />
<iq:product id="fenix5s" />
<iq:product id="fenix5splus" />
<iq:product id="fenix5x" />
<iq:product id="fenix5xplus" />
<iq:product id="fenix6" />
<iq:product id="fenix6pro" />
<iq:product id="fenix6s" />
<iq:product id="fenix6spro" />
<iq:product id="fenix6xpro" />
<iq:product id="fenix7" />
<iq:product id="fenix7pro" />
<iq:product id="fenix7pronowifi" />
<iq:product id="fenix7s" />
<iq:product id="fenix7spro" />
<iq:product id="fenix7x" />
<iq:product id="fenix7xpro" />
<iq:product id="fenix7xpronowifi" />
<iq:product id="fenixchronos" />
<iq:product id="fr245" />
<iq:product id="fr245m" />
<iq:product id="fr255" />
<iq:product id="fr255m" />
<iq:product id="fr255s" />
<iq:product id="fr255sm" />
<iq:product id="fr265" />
<iq:product id="fr265s" />
<iq:product id="fr55" />
<iq:product id="fr645" />
<iq:product id="fr645m" />
<iq:product id="fr745" />
<iq:product id="fr935" />
<iq:product id="fr945" />
<iq:product id="fr945lte" />
<iq:product id="fr955" />
<iq:product id="fr965" />
<iq:product id="gpsmap67" />
<iq:product id="instinct2" />
<iq:product id="instinct2s" />
<iq:product id="instinct2x" />
<iq:product id="instinctcrossover" />
<iq:product id="legacyherocaptainmarvel" />
<iq:product id="legacyherofirstavenger" />
<iq:product id="legacysagadarthvader" />
<iq:product id="legacysagarey" />
<iq:product id="marq2" />
<iq:product id="marq2aviator" />
<iq:product id="marqadventurer" />
<iq:product id="marqathlete" />
<iq:product id="marqaviator" />
<iq:product id="marqcaptain" />
<iq:product id="marqcommander" />
<iq:product id="marqdriver" />
<iq:product id="marqexpedition" />
<iq:product id="marqgolfer" />
<iq:product id="montana7xx" />
<iq:product id="venu" />
<iq:product id="venu2" />
<iq:product id="venu2plus" />
<iq:product id="venu2s" />
<iq:product id="venu3" />
<iq:product id="venu3s" />
<iq:product id="venud" />
<iq:product id="venusq" />
<iq:product id="venusq2" />
<iq:product id="venusq2m" />
<iq:product id="venusqm" />
<iq:product id="vivoactive3" />
<iq:product id="vivoactive3m" />
<iq:product id="vivoactive3mlte" />
<iq:product id="vivoactive4" />
<iq:product id="vivoactive4s" />
<iq:product id="vivoactive5" />
</iq:products>
<!--
Use "Monkey C: Edit Permissions" from the Visual Studio Code command
palette to update permissions.
-->
<iq:permissions>
<iq:uses-permission id="Background" />
<iq:uses-permission id="BluetoothLowEnergy" />
<iq:uses-permission id="Communications" />
<iq:uses-permission id="Positioning" />
</iq:permissions>
<!--
Use "Monkey C: Edit Languages" from the Visual Studio Code command
palette to edit your compatible language list.
-->
<iq:languages>
<iq:language>ara</iq:language>
<iq:language>bul</iq:language>
<iq:language>zhs</iq:language>
<iq:language>zht</iq:language>
<iq:language>hrv</iq:language>
<iq:language>ces</iq:language>
<iq:language>dan</iq:language>
<iq:language>dut</iq:language>
<iq:language>deu</iq:language>
<iq:language>gre</iq:language>
<iq:language>eng</iq:language>
<iq:language>est</iq:language>
<iq:language>fin</iq:language>
<iq:language>fre</iq:language>
<iq:language>heb</iq:language>
<iq:language>hun</iq:language>
<iq:language>ind</iq:language>
<iq:language>ita</iq:language>
<iq:language>jpn</iq:language>
<iq:language>kor</iq:language>
<iq:language>lav</iq:language>
<iq:language>lit</iq:language>
<iq:language>zsm</iq:language>
<iq:language>nob</iq:language>
<iq:language>pol</iq:language>
<iq:language>por</iq:language>
<iq:language>slo</iq:language>
<iq:language>ron</iq:language>
<!-- <iq:language>rus</iq:language> -->
<iq:language>slv</iq:language>
<iq:language>spa</iq:language>
<iq:language>swe</iq:language>
<iq:language>tha</iq:language>
<iq:language>tur</iq:language>
<iq:language>ukr</iq:language>
<iq:language>vie</iq:language>
</iq:languages>
<!--
Use "Monkey C: Configure Monkey Barrel" from the Visual Studio Code
command palette to edit the included barrels.
-->
<iq:barrels />
</iq:application>
</iq:manifest>

View File

@ -29,9 +29,6 @@
watch-app and widget by changing which of the next two lines are commented out
-->
<iq:application id="98c36259-498a-4458-9cef-74a273ad2bc3" type="watch-app" name="@Strings.AppName" entry="HomeAssistantApp" launcherIcon="@Drawables.LauncherIcon" minApiLevel="3.1.0">
<!--
<iq:application id="4901cdfb-b4a2-4f33-96c7-f5be5992809e" type="widget" name="@Strings.AppName" entry="HomeAssistantApp" launcherIcon="@Drawables.LauncherIcon" minApiLevel="3.1.0">
-->
<!--
Use the following from the Visual Studio Code comand palette to edit
the build targets:

View File

@ -1,205 +0,0 @@
#-----------------------------------------------------------------------------------
#
# Distributed under MIT Licence
# See https://github.com/house-of-abbey/GarminHomeAssistant/blob/main/LICENSE.
#
#-----------------------------------------------------------------------------------
#
# GarminHomeAssistant is a Garmin IQ application written in Monkey C and routinely
# tested on a Venu 2 device. The source code is provided at:
# https://github.com/house-of-abbey/GarminHomeAssistant.
#
# J D Abbey & P A Abbey, 28 December 2022
#
# Reference:
# * https://developer.garmin.com/connect-iq/reference-guides/jungle-reference/
#
#-----------------------------------------------------------------------------------
project.manifest = manifest-widget.xml
base.sourcePath = source;include/widget
# Device References
# * https://developer.garmin.com/connect-iq/compatible-devices/
# * https://developer.garmin.com/connect-iq/reference-guides/devices-reference/
#
# Widget launcher icon, multiple resolutions
# https://forums.garmin.com/developer/connect-iq/f/discussion/255433/widget-launcher-icon-multiple-resolutions/1563305
#
# Use the online SVG converter to write out PNGs from "resources\drawables\launcher.svg" by changing
# the 'width' and 'height' attributes of the SVG.
# https://svgtopng.com/
#
# The icons need to scale as a ratio of screen size 48:416 pixels
#
# Icon 53 48 46 42 37 32 30 28 26 24 21 18
# Screen 454 416 390 360 320 280 260 240 218 208 176 156
# Screen Size 390x390 launcher icon size 70x70
approachs7042mm.resourcePath = $(approachs7042mm.resourcePath);resources-launcher-70-70;resources-icons-46
# Screen Size 454x454 launcher icon size 80x80
approachs7047mm.resourcePath = $(approachs7047mm.resourcePath);resources-launcher-80-80;resources-icons-53
# Screen Size 390x390 launcher icon size 60x60
d2air.resourcePath = $(d2air.resourcePath);resources-launcher-60-60;resources-icons-46
# Screen Size 416x416 launcher icon size 70x70
d2airx10.resourcePath = $(d2airx10.resourcePath);resources-launcher-70-70;resources-icons-48
# Screen Size 240x240 launcher icon size 40x40
d2delta.resourcePath = $(d2delta.resourcePath);resources-launcher-40-40;resources-icons-28
d2deltapx.resourcePath = $(d2deltapx.resourcePath);resources-launcher-40-40;resources-icons-28
d2deltas.resourcePath = $(d2deltas.resourcePath);resources-launcher-40-40;resources-icons-28
# Screen Size 416x416 launcher icon size 60x60
d2mach1.resourcePath = $(d2mach1.resourcePath);resources-launcher-60-60;resources-icons-48
# Screen Size 176x176 launcher icon size 62x62
descentg1.resourcePath = $(descentg1.resourcePath);resources-launcher-62-62;resources-icons-21
# Screen Size 280x280 launcher icon size 40x40
descentmk2.resourcePath = $(descentmk2.resourcePath);resources-launcher-40-40;resources-icons-32
# Screen Size 240x240 launcher icon size 40x40
descentmk2s.resourcePath = $(descentmk2s.resourcePath);resources-launcher-40-40;resources-icons-28
# Screen Size 282x470 launcher icon size 36x36
edge1030.resourcePath = $(descentmk2s.resourcePath);resources-launcher-36-36;resources-icons-32
edge1030bontrager.resourcePath = $(edge1030bontrager.resourcePath);resources-launcher-36-36;resources-icons-32
edge1030plus.resourcePath = $(edge1030plus.resourcePath);resources-launcher-36-36;resources-icons-32
# Screen Size 282x470 launcher icon size 40x40
edge1040.resourcePath = $(edge1040.resourcePath);resources-launcher-40-40;resources-icons-32
# Screen Size 200x265 launcher icon size 35x35
edge520plus.resourcePath = $(edge520plus.resourcePath);resources-launcher-35-35;resources-icons-24
# Screen Size 246x322 launcher icon size 35x35
edge530.resourcePath = $(edge530.resourcePath);resources-launcher-35-35;resources-icons-28
# Screen Size 200x265 launcher icon size 35x35
edge820.resourcePath = $(edge820.resourcePath);resources-launcher-35-35;resources-icons-24
# Screen Size 246x322 launcher icon size 35x35
edge830.resourcePath = $(edge830.resourcePath);resources-launcher-35-35;resources-icons-28
# Screen Size 240x400 launcher icon size 36x36
edgeexplore.resourcePath = $(edgeexplore.resourcePath);resources-launcher-36-36;resources-icons-28
edgeexplore2.resourcePath = $(edgeexplore2.resourcePath);resources-launcher-36-36;resources-icons-28
# Screen Size 280x280 launcher icon size 40x40
enduro.resourcePath = $(enduro.resourcePath);resources-launcher-40-40;resources-icons-32
# Screen Size 416x416 launcher icon size 60x60
epix2.resourcePath = $(epix2.resourcePath);resources-launcher-60-60;resources-icons-48
# Screen Size 390x390 launcher icon size 60x60
epix2pro42mm.resourcePath = $(epix2pro42mm.resourcePath);resources-launcher-60-60;resources-icons-46
epix2pro47mm.resourcePath = $(epix2pro47mm.resourcePath);resources-launcher-60-60;resources-icons-46
# Screen Size 454x454 launcher icon size 60x60
epix2pro51mm.resourcePath = $(epix2pro51mm.resourcePath);resources-launcher-60-60;resources-icons-53
# Screen Size 240x240 launcher icon size 40x40
fenix5.resourcePath = $(fenix5.resourcePath);resources-launcher-40-40;resources-icons-28
fenix5plus.resourcePath = $(fenix5plus.resourcePath);resources-launcher-40-40;resources-icons-28
# Screen Size 218x218 launcher icon size 36x36
fenix5s.resourcePath = $(fenix5s.resourcePath);resources-launcher-36-36;resources-icons-26
# Screen Size 240x240 launcher icon size 40x40
fenix5splus.resourcePath = $(fenix5splus.resourcePath);resources-launcher-40-40;resources-icons-28
fenix5x.resourcePath = $(fenix5x.resourcePath);resources-launcher-40-40;resources-icons-28
fenix5xplus.resourcePath = $(fenix5xplus.resourcePath);resources-launcher-40-40;resources-icons-28
# Screen Size 260x260 launcher icon size 40x40
fenix6.resourcePath = $(fenix6.resourcePath);resources-launcher-40-40;resources-icons-30
fenix6pro.resourcePath = $(fenix6pro.resourcePath);resources-launcher-40-40;resources-icons-30
# Screen Size 240x240 launcher icon size 40x40
fenix6s.resourcePath = $(fenix6s.resourcePath);resources-launcher-40-40;resources-icons-28
fenix6spro.resourcePath = $(fenix6spro.resourcePath);resources-launcher-40-40;resources-icons-28
# Screen Size 280x280 launcher icon size 40x40
fenix6xpro.resourcePath = $(fenix6xpro.resourcePath);resources-launcher-40-40;resources-icons-32
# Screen Size 260x260 launcher icon size 40x40
fenix7.resourcePath = $(fenix7.resourcePath);resources-launcher-40-40;resources-icons-30
# Screen Size 260x260 launcher icon size 40x40
fenix7pro.resourcePath = $(fenix7pro.resourcePath);resources-launcher-40-40;resources-icons-30
fenix7pronowifi.resourcePath = $(fenix7pronowifi.resourcePath);resources-launcher-40-40;resources-icons-30
# Screen Size 218x218 launcher icon size 36x36
fenixchronos.resourcePath = $(fenixchronos.resourcePath);resources-launcher-36-36;resources-icons-26
# Screen Size 240x240 launcher icon size 40x40
fenix7s.resourcePath = $(fenix7s.resourcePath);resources-launcher-40-40;resources-icons-28
# Screen Size 240x240 launcher icon size 40x40
fenix7spro.resourcePath = $(fenix7spro.resourcePath);resources-launcher-40-40;resources-icons-28
# Screen Size 280x280 launcher icon size 40x40
fenix7x.resourcePath = $(fenix7x.resourcePath);resources-launcher-40-40;resources-icons-32
# Screen Size 280x280 launcher icon size 40x40
fenix7xpro.resourcePath = $(fenix7xpro.resourcePath);resources-launcher-40-40;resources-icons-32
fenix7xpronowifi.resourcePath = $(fenix7xpronowifi.resourcePath);resources-launcher-40-40;resources-icons-32
# Screen Size 240x240 launcher icon size 40x40
fr245.resourcePath = $(fr245.resourcePath);resources-launcher-40-40;resources-icons-28
fr245m.resourcePath = $(fr245m.resourcePath);resources-launcher-40-40;resources-icons-28
# Screen Size 260x260 launcher icon size 40x40
fr255.resourcePath = $(fr255.resourcePath);resources-launcher-40-40;resources-icons-30
fr255m.resourcePath = $(fr255m.resourcePath);resources-launcher-40-40;resources-icons-30
# Screen Size 218x218 launcher icon size 40x40
fr255s.resourcePath = $(fr255s.resourcePath);resources-launcher-40-40;resources-icons-26
fr255sm.resourcePath = $(fr255sm.resourcePath);resources-launcher-40-40;resources-icons-26
# Screen Size 416x416 launcher icon size 60x60
fr265.resourcePath = $(fr265.resourcePath);resources-launcher-60-60;resources-icons-48
fr265s.resourcePath = $(fr265s.resourcePath);resources-launcher-60-60;resources-icons-48
# Screen Size 208x208 launcher icon size 35x35
fr55.resourcePath = $(fr55.resourcePath);resources-launcher-35-35;resources-icons-24
# Screen Size 240x240 launcher icon size 40x40
fr645.resourcePath = $(fr645.resourcePath);resources-launcher-40-40;resources-icons-28
fr645m.resourcePath = $(fr645m.resourcePath);resources-launcher-40-40;resources-icons-28
# Screen Size 240x240 launcher icon size 40x40
fr745.resourcePath = $(fr745.resourcePath);resources-launcher-40-40;resources-icons-28
fr935.resourcePath = $(fr935.resourcePath);resources-launcher-40-40;resources-icons-28
fr945.resourcePath = $(fr945.resourcePath);resources-launcher-40-40;resources-icons-28
fr945lte.resourcePath = $(fr945lte.resourcePath);resources-launcher-40-40;resources-icons-28
# Screen Size 260x260 launcher icon size 40x40
fr955.resourcePath = $(fr955.resourcePath);resources-launcher-40-40;resources-icons-30
# Screen Size 454x454 launcher icon size 65x65
fr965.resourcePath = $(fr965.resourcePath);resources-launcher-65-65;resources-icons-53
# Screen Size 240x400 launcher icon size 38x33
gpsmap67.resourcePath = $(gpsmap67.resourcePath);resources-launcher-33-33;resources-icons-28
# Screen Size 176x176 launcher icon size 62x62
instinct2.resourcePath = $(instinct2.resourcePath);resources-launcher-62-62;resources-icons-21
# Screen Size 163x156 launcher icon size 54x54
instinct2s.resourcePath = $(instinct2s.resourcePath);resources-launcher-54-54;resources-icons-18
# Screen Size 176x176 launcher icon size 62x62
instinct2x.resourcePath = $(instinct2x.resourcePath);resources-launcher-62-62;resources-icons-21
# Screen Size 176x176 launcher icon size 26x26
instinctcrossover.resourcePath = $(instinctcrossover.resourcePath);resources-launcher-26-26;resources-icons-21
# Screen Size 218x218 launcher icon size 30x30
legacyherocaptainmarvel.resourcePath = $(legacyherocaptainmarvel.resourcePath);resources-launcher-30-30;resources-icons-26
# Screen Size 260x260 launcher icon size 35x35
legacyherofirstavenger.resourcePath = $(legacyherofirstavenger.resourcePath);resources-launcher-35-35;resources-icons-30
legacysagadarthvader.resourcePath = $(legacysagadarthvader.resourcePath);resources-launcher-35-35;resources-icons-30
# Screen Size 218x218 launcher icon size 30x30
legacysagarey.resourcePath = $(legacysagarey.resourcePath);resources-launcher-30-30;resources-icons-26
# Screen Size 390x390 launcher icon size 60x60
marq2.resourcePath = $(marq2.resourcePath);resources-launcher-60-60;resources-icons-46
marq2aviator.resourcePath = $(marq2aviator.resourcePath);resources-launcher-60-60;resources-icons-46
# Screen Size 240x240 launcher icon size 40x40
marqadventurer.resourcePath = $(marqadventurer.resourcePath);resources-launcher-40-40;resources-icons-28
marqathlete.resourcePath = $(marqathlete.resourcePath);resources-launcher-40-40;resources-icons-28
marqaviator.resourcePath = $(marqaviator.resourcePath);resources-launcher-40-40;resources-icons-28
marqcaptain.resourcePath = $(marqcaptain.resourcePath);resources-launcher-40-40;resources-icons-28
marqcommander.resourcePath = $(marqcommander.resourcePath);resources-launcher-40-40;resources-icons-28
marqdriver.resourcePath = $(marqdriver.resourcePath);resources-launcher-40-40;resources-icons-28
marqexpedition.resourcePath = $(marqexpedition.resourcePath);resources-launcher-40-40;resources-icons-28
marqgolfer.resourcePath = $(marqgolfer.resourcePath);resources-launcher-40-40;resources-icons-28
# Screen Size 480x800 launcher icon size 60x60
montana7xx.resourcePath = $(montana7xx.resourcePath);resources-launcher-60-60;resources-icons-53
# Screen Size 390x390 launcher icon size 60x60
venu.resourcePath = $(venu.resourcePath);resources-launcher-60-60;resources-icons-46
# Screen Size 416x416 launcher icon size 70x70
venu2.resourcePath = $(venu2.resourcePath);resources-launcher-70-70;resources-icons-48
venu2plus.resourcePath = $(venu2plus.resourcePath);resources-launcher-70-70;resources-icons-48
# Screen Size 360x360 launcher icon size 61x61
venu2s.resourcePath = $(venu2s.resourcePath);resources-launcher-61-61;resources-icons-42
# Screen Size 454x454 launcher icon size 70x70
venu3.resourcePath = $(venu3.resourcePath);resources-launcher-70-70;resources-icons-53
# Screen Size 390x390 launcher icon size 70x70
venu3s.resourcePath = $(venu3s.resourcePath);resources-launcher-70-70;resources-icons-46
# Screen Size 390x390 launcher icon size 60x60
venud.resourcePath = $(venud.resourcePath);resources-launcher-60-60;resources-icons-46
# Screen Size 240x240 launcher icon size 36x36
venusq.resourcePath = $(venusq.resourcePath);resources-launcher-36-36;resources-icons-28
# Screen Size 320x360 launcher icon size 40x40
venusq2.resourcePath = $(venusq2.resourcePath);resources-launcher-40-40;resources-icons-38
# Screen Size 320x360 launcher icon size 40x40
venusq2m.resourcePath = $(venusq2m.resourcePath);resources-launcher-40-40;resources-icons-38
# Screen Size 240x240 launcher icon size 36x36
venusqm.resourcePath = $(venusqm.resourcePath);resources-launcher-36-36;resources-icons-28
# Screen Size 240x240 launcher icon size 40x33
vivoactive3.resourcePath = $(vivoactive3.resourcePath);resources-launcher-33-33;resources-icons-28
vivoactive3m.resourcePath = $(vivoactive3m.resourcePath);resources-launcher-33-33;resources-icons-28
vivoactive3mlte.resourcePath = $(vivoactive3mlte.resourcePath);resources-launcher-33-33;resources-icons-28
# Screen Size 260x260 launcher icon size 35x35
vivoactive4.resourcePath = $(vivoactive4.resourcePath);resources-launcher-35-35;resources-icons-30
# Screen Size 218x218 launcher icon size 30x30
vivoactive4s.resourcePath = $(vivoactive4s.resourcePath);resources-launcher-30-30;resources-icons-26
# Screen Size 390x390 launcher icon size 70x70
vivoactive5.resourcePath = $(vivoactive5.resourcePath);resources-launcher-70-70;resources-icons-46

View File

@ -18,11 +18,6 @@
project.manifest = manifest.xml
# Testing in VSCode requires monkey.jungle, so for convenience, swap between
# watch-app and widget by changing which of the next two lines are commented out
base.sourcePath = source;include/app
#base.sourcePath = source;include/widget
# Device References
# * https://developer.garmin.com/connect-iq/compatible-devices/
# * https://developer.garmin.com/connect-iq/reference-guides/devices-reference/

View File

@ -51,6 +51,7 @@
<string id="SettingsConfigUrl">عنوان URL لتكوين القائمة (JSON).</string>
<string id="SettingsCacheConfig">هل يجب على التطبيق تخزين تكوين القائمة مؤقتًا؟</string>
<string id="SettingsClearCache">هل يجب على التطبيق مسح ذاكرة التخزين المؤقت الموجودة في المرة القادمة التي يتم فيها تشغيله؟</string>
<string id="SettingsVibration">هل يجب أن يقدم التطبيق تعليقات عبر الاهتزازات؟</string>
<string id="SettingsAppTimeout">المهلة بالثواني. قم بالخروج من التطبيق بعد هذه الفترة من عدم النشاط لحفظ بطارية الجهاز.</string>
<string id="SettingsConfirmTimeout">بعد هذا الوقت (بالثواني)، يتم إغلاق مربع حوار تأكيد الإجراء تلقائيًا ويتم إلغاء الإجراء. اضبط على 0 لتعطيل المهلة.</string>
<string id="SettingsTextAlign">محاذاة القائمة لليسار (إيقاف) أو لليمين (تشغيل).</string>

View File

@ -51,13 +51,14 @@
<string id="SettingsConfigUrl">URL за конфигурация на менюто (JSON).</string>
<string id="SettingsCacheConfig">Трябва ли приложението да кешира конфигурацията на менюто?</string>
<string id="SettingsClearCache">Трябва ли приложението да изчисти съществуващия кеш при следващото стартиране?</string>
<string id="SettingsVibration">Приложението трябва ли да предоставя обратна връзка чрез вибрации?</string>
<string id="SettingsAppTimeout">Изчакване в секунди. Излезте от приложението след този период на неактивност, за да запазите батерията на устройството.</string>
<string id="SettingsConfirmTimeout">След това време (в секунди) диалоговият прозорец за потвърждение за действие се затваря автоматично и действието се отменя. Задайте 0, за да деактивирате изчакването.</string>
<string id="SettingsConfirmTimeout">След това време (в секунди) диалоговият прозорец за потвърждение на действие се затваря автоматично и действието се отменя. Задайте 0, за да деактивирате изчакването.</string>
<string id="SettingsTextAlign">Ляво (изключено) или дясно (включено) подравняване на менюто.</string>
<string id="LeftToRight">Отляво надясно</string>
<string id="RightToLeft">От дясно на ляво</string>
<string id="SettingsWidgetStart">(Само за джаджа) Автоматично стартирайте приложението от джаджата, без да чакате докосване.</string>
<string id="SettingsEnableBatteryLevel">Активирайте услугата на заден план, за да изпраща данни за нивото на батерията на устройството, местоположението и (ако се поддържа) за дейността до Home Assistant.</string>
<string id="SettingsEnableBatteryLevel">Активирайте услугата на заден план, за да изпратите данните за нивото на батерията на устройството, местоположението и (ако се поддържа) за дейността до Home Assistant.</string>
<string id="SettingsBatteryLevelRefreshRate">Честотата на опресняване (в минути), с която фоновата услуга трябва да повтори изпращането на данни.</string>
<string id="WebhookId">(Само за четене) Идентификаторът на Webhook, създаден от устройството за актуализации на фонови услуги. Може да ви е необходимо това за отстраняване на грешки.</string>
<string id="WebhookId">(Само за четене) Идентификационният номер на Webhook, създаден от устройството за актуализации на фонови услуги. Може да ви е необходимо това за отстраняване на грешки.</string>
</strings>

View File

@ -51,13 +51,14 @@
<string id="SettingsConfigUrl">Adresa URL pro konfiguraci nabídky (JSON).</string>
<string id="SettingsCacheConfig">Má aplikace uložit konfiguraci nabídky do mezipaměti?</string>
<string id="SettingsClearCache">Měla by aplikace při příštím spuštění vymazat stávající mezipaměť?</string>
<string id="SettingsVibration">Měla by aplikace poskytovat zpětnou vazbu prostřednictvím vibrací?</string>
<string id="SettingsAppTimeout">Časový limit v sekundách. Po této době nečinnosti aplikaci ukončete, abyste šetřili baterii zařízení.</string>
<string id="SettingsConfirmTimeout">Po uplynutí této doby (v sekundách) se dialog pro potvrzení akce automaticky zavře a akce se zruší. Nastavením na 0 deaktivujete časový limit.</string>
<string id="SettingsTextAlign">Zarovnání nabídky vlevo (vypnuto) nebo vpravo (zapnuto).</string>
<string id="LeftToRight">Zleva do prava</string>
<string id="RightToLeft">Zprava doleva</string>
<string id="SettingsWidgetStart">(Pouze widget) Automaticky spusťte aplikaci z widgetu bez čekání na klepnutí.</string>
<string id="SettingsEnableBatteryLevel">Povolte službu na pozadí pro odesílání údajů o stavu baterie, poloze a (pokud je podporováno) o aktivitě zařízení Home Assistant.</string>
<string id="SettingsEnableBatteryLevel">Povolte službu na pozadí, aby odeslala údaje o stavu baterie, poloze a (pokud je podporována) aktivitě zařízení Home Assistant.</string>
<string id="SettingsBatteryLevelRefreshRate">Obnovovací frekvence (v minutách), při které by služba na pozadí měla opakovat odesílání dat.</string>
<string id="WebhookId">(Pouze pro čtení) ID Webhooku vytvořené zařízením pro aktualizace služby na pozadí. Možná to budete potřebovat pro ladění.</string>
</strings>

View File

@ -51,6 +51,7 @@
<string id="SettingsConfigUrl">URL til menukonfiguration (JSON).</string>
<string id="SettingsCacheConfig">Skal applikationen cache menukonfigurationen?</string>
<string id="SettingsClearCache">Skal applikationen rydde den eksisterende cache næste gang den startes?</string>
<string id="SettingsVibration">Skal applikationen give feedback via vibrationer?</string>
<string id="SettingsAppTimeout">Timeout i sekunder. Afslut applikationen efter denne periode med inaktivitet for at spare på enhedens batteri.</string>
<string id="SettingsConfirmTimeout">Efter dette tidspunkt (i sekunder) lukkes en bekræftelsesdialog for en handling automatisk, og handlingen annulleres. Indstil til 0 for at deaktivere timeout.</string>
<string id="SettingsTextAlign">Venstre (fra) eller Højre (til) menujustering.</string>

View File

@ -51,6 +51,7 @@
<string id="SettingsConfigUrl">URL der Menükonfiguration (JSON).</string>
<string id="SettingsCacheConfig">Soll die Anwendung die Menükonfiguration cachen?</string>
<string id="SettingsClearCache">Soll die Anwendung beim nächsten Start den vorhandenen Cache löschen?</string>
<string id="SettingsVibration">Soll die Anwendung über Vibrationen Feedback geben?</string>
<string id="SettingsAppTimeout">Die App wird nach Ablauf der Zeit (in Sekunden) bei Inaktivität beendet, um den Akku
des Geräts zu schonen.</string>
<string id="SettingsConfirmTimeout">Nach dieser Zeit (in Sekunden) wird der Bestätigungsdialog einer Aktion geschlossen und die

View File

@ -47,10 +47,11 @@
<string id="SettingsSelect">Selecteer...</string>
<string id="SettingsApiKey">API-sleutel voor HomeAssistant.</string>
<string id="SettingsApiKeyPrompt">Toegangstoken met lange levensduur.</string>
<string id="SettingsApiUrl">URL voor HomeAssistant API.</string>
<string id="SettingsApiUrl">URL voor HomeAssistant-API.</string>
<string id="SettingsConfigUrl">URL voor menuconfiguratie (JSON).</string>
<string id="SettingsCacheConfig">Moet de applicatie de menuconfiguratie in de cache opslaan?</string>
<string id="SettingsClearCache">Moet de applicatie de volgende keer dat deze wordt gestart de bestaande cache wissen?</string>
<string id="SettingsVibration">Moet de applicatie feedback geven via trillingen?</string>
<string id="SettingsAppTimeout">Time-out in seconden. Sluit de applicatie af na deze periode van inactiviteit om de batterij van het apparaat te sparen.</string>
<string id="SettingsConfirmTimeout">Na deze tijd (in seconden) wordt automatisch een bevestigingsvenster voor een actie gesloten en wordt de actie geannuleerd. Stel in op 0 om de time-out uit te schakelen.</string>
<string id="SettingsTextAlign">Links (uit) of rechts (aan) Menu-uitlijning.</string>

View File

@ -15,7 +15,7 @@
<!--
Generated by Google Translate: English to Estonian
Inglise keelest loodud Google'i tõlke abil
Loodud Google'i tõlke abil inglise keelest
-->
<strings>
@ -28,13 +28,13 @@
<string id="NoAPIKey" scope="glance">Rakenduse seadetes pole API-võtit</string>
<string id="NoApiUrl" scope="glance">Rakenduse seadetes pole API URL-i</string>
<string id="NoConfigUrl" scope="glance">Rakenduse seadetes pole konfiguratsiooni URL-i</string>
<string id="ApiFlood">API-kutsed liiga kiired. Palun aeglustage oma taotlusi.</string>
<string id="ApiFlood">API-kõned liiga kiired. Palun aeglustage oma taotlusi.</string>
<string id="ApiUrlNotFound">URL-i ei leitud. Võimalik API URL-i viga seadetes.</string>
<string id="ConfigUrlNotFound">URL-i ei leitud. Võimalik konfiguratsiooni URL-i viga seadetes.</string>
<string id="NoJson">HTTP-päringust ei tagastatud ühtegi JSON-i.</string>
<string id="NoJson">HTTP päringust ei tagastatud ühtegi JSON-i.</string>
<string id="UnhandledHttpErr">HTTP päring tagastas veakoodi =</string>
<string id="TrailingSlashErr">API URL-i lõpus ei tohi olla kaldkriipsu „/”</string>
<string id="WebhookFailed">Veebihaagi registreerimine ebaõnnestus</string>
<string id="WebhookFailed">Webhaoki registreerimine ebaõnnestus</string>
<string id="TemplateError">Malli renderdamine ebaõnnestus</string>
<string id="Available" scope="glance">Saadaval</string>
<string id="Checking" scope="glance">Kontrollimine...</string>
@ -51,6 +51,7 @@
<string id="SettingsConfigUrl">URL menüü konfigureerimiseks (JSON).</string>
<string id="SettingsCacheConfig">Kas rakendus peaks menüü konfiguratsiooni vahemällu salvestama?</string>
<string id="SettingsClearCache">Kas rakendus peaks järgmisel käivitamisel olemasoleva vahemälu tühjendama?</string>
<string id="SettingsVibration">Kas rakendus peaks andma tagasisidet vibratsiooni kaudu?</string>
<string id="SettingsAppTimeout">Aegumine sekundites. Seadme aku säästmiseks sulgege rakendus pärast seda tegevusetusperioodi.</string>
<string id="SettingsConfirmTimeout">Pärast seda aega (sekundites) suletakse automaatselt toimingu kinnitusdialoog ja toiming tühistatakse. Ajalõpu keelamiseks määrake väärtusele 0.</string>
<string id="SettingsTextAlign">Vasak (väljas) või parem (sees) menüü joondamine.</string>

View File

@ -51,8 +51,9 @@
<string id="SettingsConfigUrl">URL-osoite valikon määrityksiä varten (JSON).</string>
<string id="SettingsCacheConfig">Pitäisikö sovelluksen tallentaa valikon asetukset välimuistiin?</string>
<string id="SettingsClearCache">Pitäisikö sovelluksen tyhjentää olemassa oleva välimuisti, kun se käynnistetään seuraavan kerran?</string>
<string id="SettingsVibration">Pitäisikö sovelluksen antaa palautetta tärinän kautta?</string>
<string id="SettingsAppTimeout">Aikakatkaisu sekunneissa. Poistu sovelluksesta tämän käyttämättömyyden jälkeen säästääksesi laitteen akkua.</string>
<string id="SettingsConfirmTimeout">Tämän ajan kuluttua (sekunneissa) toiminnon vahvistusikkuna suljetaan automaattisesti ja toiminto peruutetaan. Aseta arvoksi 0, jos haluat poistaa aikakatkaisun käytöstä.</string>
<string id="SettingsConfirmTimeout">Tämän ajan kuluttua (sekunneissa) toiminnon vahvistusikkuna suljetaan automaattisesti ja toiminto peruutetaan. Aseta arvoksi 0 poistaaksesi aikakatkaisun käytöstä.</string>
<string id="SettingsTextAlign">Vasen (pois) tai oikea (päällä) valikon kohdistus.</string>
<string id="LeftToRight">Vasemmalta oikealle</string>
<string id="RightToLeft">Oikealta vasemmalle</string>

View File

@ -51,6 +51,7 @@
<string id="SettingsConfigUrl">URL de configuration des menus (JSON).</string>
<string id="SettingsCacheConfig">L'application doit-elle mettre en cache la configuration du menu ?</string>
<string id="SettingsClearCache">L'application doit-elle vider le cache existant au prochain démarrage ?</string>
<string id="SettingsVibration">L'application doit-elle fournir un retour via des vibrations ?</string>
<string id="SettingsAppTimeout">Délai d'expiration en secondes. Quittez l'application après cette période d'inactivité pour économiser la batterie de l'appareil.</string>
<string id="SettingsConfirmTimeout">Passé ce délai (en secondes), une boîte de dialogue de confirmation d'une action se ferme automatiquement et l'action est annulée. Réglez sur 0 pour désactiver le délai d'attente.</string>
<string id="SettingsTextAlign">Alignement du menu à gauche (désactivé) ou à droite (activé).</string>

View File

@ -51,6 +51,7 @@
<string id="SettingsConfigUrl">URL για τη διαμόρφωση μενού (JSON).</string>
<string id="SettingsCacheConfig">Πρέπει η εφαρμογή να αποθηκεύσει προσωρινά τη διαμόρφωση του μενού;</string>
<string id="SettingsClearCache">Πρέπει η εφαρμογή να διαγράψει την υπάρχουσα προσωρινή μνήμη την επόμενη φορά που θα ξεκινήσει;</string>
<string id="SettingsVibration">Πρέπει η εφαρμογή να παρέχει ανατροφοδότηση μέσω δονήσεων;</string>
<string id="SettingsAppTimeout">Timeout σε δευτερόλεπτα. Κλείστε την εφαρμογή μετά από αυτήν την περίοδο αδράνειας για να εξοικονομήσετε την μπαταρία της συσκευής.</string>
<string id="SettingsConfirmTimeout">Μετά από αυτό το χρονικό διάστημα (σε δευτερόλεπτα), ένα παράθυρο διαλόγου επιβεβαίωσης για μια ενέργεια κλείνει αυτόματα και η ενέργεια ακυρώνεται. Ορίστε στο 0 για να απενεργοποιήσετε το χρονικό όριο.</string>
<string id="SettingsTextAlign">Αριστερά (απενεργοποίηση) ή Δεξιά (ενεργό) Ευθυγράμμιση μενού.</string>

View File

@ -51,13 +51,14 @@
<string id="SettingsConfigUrl">כתובת URL לתצורת תפריט (JSON).</string>
<string id="SettingsCacheConfig">האם האפליקציה צריכה לשמור את תצורת התפריט במטמון?</string>
<string id="SettingsClearCache">האם היישום צריך לנקות את המטמון הקיים בפעם הבאה שהוא יופעל?</string>
<string id="SettingsVibration">האם האפליקציה צריכה לספק משוב באמצעות רעידות?</string>
<string id="SettingsAppTimeout">פסק זמן בשניות. צא מהאפליקציה לאחר תקופה זו של חוסר פעילות כדי לחסוך בסוללת המכשיר.</string>
<string id="SettingsConfirmTimeout">לאחר זמן זה (בשניות), תיבת דו-שיח לאישור פעולה נסגרת אוטומטית והפעולה מבוטלת. הגדר ל-0 כדי לבטל את הזמן הקצוב.</string>
<string id="SettingsTextAlign">יישור תפריט שמאלה (כבוי) או ימינה (מופעל).</string>
<string id="LeftToRight">משמאל לימין</string>
<string id="RightToLeft">מימין לשמאל</string>
<string id="SettingsWidgetStart">(יישומון בלבד) הפעל אוטומטית את האפליקציה מהווידג'ט מבלי לחכות להקשה.</string>
<string id="SettingsEnableBatteryLevel">אפשר את שירות הרקע כדי לשלוח את נתוני רמת הסוללה של המכשיר, המיקום (אם נתמכים) ל-Home Assistant.</string>
<string id="SettingsEnableBatteryLevel">אפשר את שירות הרקע כדי לשלוח את נתוני רמת הסוללה של המכשיר, מיקום (אם נתמכים) נתוני פעילות אל Home Assistant.</string>
<string id="SettingsBatteryLevelRefreshRate">קצב הרענון (בדקות) שבו שירות הרקע צריך לחזור על שליחת נתונים.</string>
<string id="WebhookId">(לקריאה בלבד) מזהה ה-Webhook שנוצר על ידי המכשיר עבור עדכוני שירות ברקע. ייתכן שתדרוש זאת לצורך איתור באגים.</string>
</strings>

View File

@ -51,6 +51,7 @@
<string id="SettingsConfigUrl">URL za konfiguraciju izbornika (JSON).</string>
<string id="SettingsCacheConfig">Treba li aplikacija spremiti konfiguraciju izbornika u predmemoriju?</string>
<string id="SettingsClearCache">Treba li aplikacija prilikom sljedećeg pokretanja očistiti postojeću predmemoriju?</string>
<string id="SettingsVibration">Treba li aplikacija dati povratnu informaciju putem vibracija?</string>
<string id="SettingsAppTimeout">Istek u sekundama. Izađite iz aplikacije nakon ovog razdoblja neaktivnosti kako biste uštedjeli bateriju uređaja.</string>
<string id="SettingsConfirmTimeout">Nakon tog vremena (u sekundama), dijaloški okvir za potvrdu radnje automatski se zatvara i radnja se poništava. Postavite na 0 da onemogućite vremensko ograničenje.</string>
<string id="SettingsTextAlign">Lijevo (isključeno) ili desno (uključeno) poravnanje izbornika.</string>

View File

@ -49,15 +49,16 @@
<string id="SettingsApiKeyPrompt">Hosszú életű hozzáférési token.</string>
<string id="SettingsApiUrl">A HomeAssistant API URL-je.</string>
<string id="SettingsConfigUrl">URL a menükonfigurációhoz (JSON).</string>
<string id="SettingsCacheConfig">Az alkalmazásnak gyorsítótárba kell helyeznie a menü konfigurációt?</string>
<string id="SettingsCacheConfig">Az alkalmazásnak gyorsítótárba kell helyeznie a menükonfigurációt?</string>
<string id="SettingsClearCache">Törölje az alkalmazásnak a meglévő gyorsítótárat a következő indításakor?</string>
<string id="SettingsVibration">Az alkalmazásnak rezgésekkel kell visszajelzést adnia?</string>
<string id="SettingsAppTimeout">Időtúllépés másodpercben. Az eszköz akkumulátorának kímélése érdekében lépjen ki az alkalmazásból ezen inaktivitási időszak után.</string>
<string id="SettingsConfirmTimeout">Ezen idő elteltével (másodpercben) egy művelet megerősítő párbeszédpanele automatikusan bezárul, és a művelet megszakad. Állítsa 0-ra az időtúllépés letiltásához.</string>
<string id="SettingsConfirmTimeout">Ezen idő letelte után (másodpercben) a művelet megerősítő párbeszédablakja automatikusan bezárul, és a művelet megszakad. Állítsa 0-ra az időtúllépés letiltásához.</string>
<string id="SettingsTextAlign">Balra (ki) vagy Jobbra (be) Menüigazítás.</string>
<string id="LeftToRight">Balról jobbra</string>
<string id="RightToLeft">Jobbról balra</string>
<string id="SettingsWidgetStart">(Csak Widget) Az alkalmazás automatikus indítása a widgetről anélkül, hogy egy érintésre várna.</string>
<string id="SettingsEnableBatteryLevel">Engedélyezze a háttérszolgáltatást, hogy elküldje az eszköz akkumulátorának töltöttségi szintjét, helyét és (ha támogatott) tevékenységi adatait a Home Assistantnek.</string>
<string id="SettingsWidgetStart">(Csak widget) Az alkalmazás automatikus indítása a widgetről anélkül, hogy egy érintésre várna.</string>
<string id="SettingsEnableBatteryLevel">Engedélyezze a háttérszolgáltatást, hogy elküldje az eszköz akkumulátorszintjét, helyét és (ha támogatott) tevékenységi adatait a Home Assistantnek.</string>
<string id="SettingsBatteryLevelRefreshRate">Az a frissítési gyakoriság (percben), amellyel a háttérszolgáltatásnak meg kell ismételnie az adatok küldését.</string>
<string id="WebhookId">(Csak olvasható) Az eszköz által a háttérszolgáltatás frissítéséhez létrehozott Webhook-azonosító. Erre szükség lehet a hibakereséshez.</string>
</strings>

View File

@ -51,6 +51,7 @@
<string id="SettingsConfigUrl">URL untuk konfigurasi menu (JSON).</string>
<string id="SettingsCacheConfig">Haruskah aplikasi menyimpan konfigurasi menu dalam cache?</string>
<string id="SettingsClearCache">Haruskah aplikasi menghapus cache yang ada saat dijalankan lagi?</string>
<string id="SettingsVibration">Haruskah aplikasi memberikan umpan balik melalui getaran?</string>
<string id="SettingsAppTimeout">Batas waktu dalam hitungan detik. Keluar dari aplikasi setelah periode tidak aktif ini untuk menghemat baterai perangkat.</string>
<string id="SettingsConfirmTimeout">Setelah waktu ini (dalam detik), dialog konfirmasi untuk suatu tindakan secara otomatis ditutup dan tindakan tersebut dibatalkan. Setel ke 0 untuk menonaktifkan batas waktu.</string>
<string id="SettingsTextAlign">Penyelarasan Menu Kiri (mati) atau Kanan (hidup).</string>

View File

@ -51,13 +51,14 @@
<string id="SettingsConfigUrl">URL per la configurazione del menu (JSON).</string>
<string id="SettingsCacheConfig">L'applicazione dovrebbe memorizzare nella cache la configurazione del menu?</string>
<string id="SettingsClearCache">L'applicazione dovrebbe svuotare la cache esistente al successivo avvio?</string>
<string id="SettingsVibration">L'applicazione dovrebbe fornire feedback tramite vibrazioni?</string>
<string id="SettingsAppTimeout">Timeout in secondi. Uscire dall'applicazione dopo questo periodo di inattività per risparmiare la batteria del dispositivo.</string>
<string id="SettingsConfirmTimeout">Trascorso questo tempo (in secondi), una finestra di dialogo di conferma per un'azione viene chiusa automaticamente e l'azione viene annullata. Impostare su 0 per disabilitare il timeout.</string>
<string id="SettingsTextAlign">Allineamento del menu a sinistra (spento) o a destra (acceso).</string>
<string id="LeftToRight">Da sinistra a destra</string>
<string id="RightToLeft">Da destra a sinistra</string>
<string id="SettingsWidgetStart">(Solo widget) Avvia automaticamente l'applicazione dal widget senza attendere un tocco.</string>
<string id="SettingsEnableBatteryLevel">Abilita il servizio in background per inviare i dati sul livello della batteria del dispositivo, sulla posizione e (se supportato) sull'attività a Home Assistant.</string>
<string id="SettingsEnableBatteryLevel">Abilita il servizio in background per inviare i dati relativi al livello della batteria del dispositivo, alla posizione e (se supportato) sull'attività a Home Assistant.</string>
<string id="SettingsBatteryLevelRefreshRate">La frequenza di aggiornamento (in minuti) alla quale il servizio in background deve ripetere l'invio dei dati.</string>
<string id="WebhookId">(Sola lettura) L'ID webhook creato dal dispositivo per gli aggiornamenti del servizio in background. Potrebbe essere necessario per il debug.</string>
</strings>

View File

@ -46,11 +46,12 @@
<!-- 設定GUIの場合 -->
<string id="SettingsSelect">選択する...</string>
<string id="SettingsApiKey">ホームアシスタントの API キー。</string>
<string id="SettingsApiKeyPrompt">有効期の長いアクセス トークン。</string>
<string id="SettingsApiKeyPrompt">有効期の長いアクセス トークン。</string>
<string id="SettingsApiUrl">ホームアシスタント API の URL。</string>
<string id="SettingsConfigUrl">メニュー構成の URL (JSON)。</string>
<string id="SettingsCacheConfig">アプリケーションはメニュー構成をキャッシュする必要がありますか?</string>
<string id="SettingsClearCache">アプリケーションは次回起動時に既存のキャッシュをクリアする必要がありますか?</string>
<string id="SettingsVibration">アプリケーションは振動を介してフィードバックを提供する必要がありますか?</string>
<string id="SettingsAppTimeout">秒単位のタイムアウト。デバイスのバッテリーを節約するために、この期間非アクティブになった後はアプリケーションを終了してください。</string>
<string id="SettingsConfirmTimeout">この時間 (秒単位) が経過すると、アクションの確認ダイアログが自動的に閉じられ、アクションがキャンセルされます。タイムアウトを無効にするには、0 に設定します。</string>
<string id="SettingsTextAlign">左 (オフ) または右 (オン) メニューの配置。</string>

View File

@ -51,6 +51,7 @@
<string id="SettingsConfigUrl">메뉴 구성을 위한 URL(JSON)입니다.</string>
<string id="SettingsCacheConfig">애플리케이션이 메뉴 구성을 캐시해야 합니까?</string>
<string id="SettingsClearCache">애플리케이션이 다음에 시작될 때 기존 캐시를 지워야 합니까?</string>
<string id="SettingsVibration">애플리케이션이 진동을 통해 피드백을 제공해야 합니까?</string>
<string id="SettingsAppTimeout">시간 초과(초)입니다. 장치 배터리를 절약하려면 이 비활성 기간 후에 애플리케이션을 종료하십시오.</string>
<string id="SettingsConfirmTimeout">이 시간(초)이 지나면 작업에 대한 확인 대화 상자가 자동으로 닫히고 작업이 취소됩니다. 시간 초과를 비활성화하려면 0으로 설정합니다.</string>
<string id="SettingsTextAlign">왼쪽(끄기) 또는 오른쪽(켜기) 메뉴 정렬.</string>

View File

@ -51,13 +51,14 @@
<string id="SettingsConfigUrl">URL izvēlnes konfigurācijai (JSON).</string>
<string id="SettingsCacheConfig">Vai lietojumprogrammai vajadzētu saglabāt izvēlnes konfigurāciju kešatmiņā?</string>
<string id="SettingsClearCache">Vai lietojumprogrammai nākamajā startēšanas reizē vajadzētu notīrīt esošo kešatmiņu?</string>
<string id="SettingsVibration">Vai lietojumprogrammai ir jāsniedz atgriezeniskā saite, izmantojot vibrācijas?</string>
<string id="SettingsAppTimeout">Taimauts sekundēs. Pēc šī neaktivitātes perioda izejiet no lietojumprogrammas, lai taupītu ierīces akumulatoru.</string>
<string id="SettingsConfirmTimeout">Pēc šī laika (sekundēs) tiek automātiski aizvērts darbības apstiprinājuma dialoglodziņš un darbība tiek atcelta. Iestatiet uz 0, lai atspējotu taimautu.</string>
<string id="SettingsTextAlign">Kreisā (izslēgta) vai labā (ieslēgta) izvēlnes izlīdzināšana.</string>
<string id="SettingsTextAlign">Kreisā (izslēgta) vai labā (ieslēgta) izvēlnes līdzināšana.</string>
<string id="LeftToRight">No kreisās uz labo</string>
<string id="RightToLeft">No labās uz kreiso</string>
<string id="SettingsWidgetStart">(tikai logrīkam) Automātiski startējiet lietojumprogrammu no logrīka, negaidot pieskārienu.</string>
<string id="SettingsEnableBatteryLevel">Iespējojiet fona pakalpojumu, lai Home Assistant nosūtītu ierīces akumulatora uzlādes līmeni, atrašanās vietu un (ja tiek atbalstīts) darbības datus.</string>
<string id="SettingsBatteryLevelRefreshRate">Atsvaidzes biežums (minūtēs), ar kādu fona pakalpojumam ir jāatkārto datu sūtīšana.</string>
<string id="SettingsBatteryLevelRefreshRate">Atsvaidzes intensitāte (minūtēs), ar kādu fona pakalpojumam ir jāatkārto datu sūtīšana.</string>
<string id="WebhookId">(Tikai lasāms) Web aizķeres ID, ko ierīce izveidojusi fona pakalpojumu atjauninājumiem. Tas var būt nepieciešams atkļūdošanai.</string>
</strings>

View File

@ -45,18 +45,19 @@
<string id="Memory" scope="glance">Atmintis</string>
<!-- Dėl nustatymų GUI -->
<string id="SettingsSelect">Pasirinkite...</string>
<string id="SettingsApiKey">API raktas, skirtas HomeAssistant.</string>
<string id="SettingsApiKey">API raktas, skirtas HomeAssistant.</string>
<string id="SettingsApiKeyPrompt">Ilgalaikis prieigos raktas.</string>
<string id="SettingsApiUrl">„HomeAssistant“ API URL.</string>
<string id="SettingsConfigUrl">Meniu konfigūravimo URL (JSON).</string>
<string id="SettingsCacheConfig">Ar programa turėtų talpykloje išsaugoti meniu konfigūraciją?</string>
<string id="SettingsCacheConfig">Ar programa turėtų išsaugoti meniu konfigūraciją talpykloje?</string>
<string id="SettingsClearCache">Ar programa turėtų išvalyti esamą talpyklą kitą kartą paleidus?</string>
<string id="SettingsVibration">Ar programa turėtų teikti grįžtamąjį ryšį per vibraciją?</string>
<string id="SettingsAppTimeout">Skirtasis laikas sekundėmis. Po šio neveiklumo laikotarpio išeikite iš programos, kad taupytumėte įrenginio akumuliatorių.</string>
<string id="SettingsConfirmTimeout">Praėjus šiam laikui (sekundėmis), veiksmo patvirtinimo dialogo langas automatiškai uždaromas ir veiksmas atšaukiamas. Nustatykite 0, kad išjungtumėte skirtąjį laiką.</string>
<string id="SettingsTextAlign">Kairysis (išjungtas) arba dešinysis (įjungtas) meniu lygiavimas.</string>
<string id="LeftToRight">Iš kairės į dešinę</string>
<string id="RightToLeft">Iš dešinės į kairę</string>
<string id="SettingsWidgetStart">(Tik valdikliui) Automatiškai paleiskite programą iš valdiklio, nelaukdami, kol bus palietus.</string>
<string id="SettingsWidgetStart">(Tik valdiklis) Automatiškai paleiskite programą iš valdiklio, nelaukdami palietimo.</string>
<string id="SettingsEnableBatteryLevel">Įgalinkite foninę paslaugą, kad į „Home Assistant“ būtų išsiųsti įrenginio akumuliatoriaus lygio, vietos ir (jei palaikoma) veiklos duomenys.</string>
<string id="SettingsBatteryLevelRefreshRate">Atnaujinimo dažnis (minutėmis), kuriuo foninė paslauga turėtų pakartoti duomenų siuntimą.</string>
<string id="WebhookId">(Tik skaitoma) Įrenginio sukurtas „Webhook“ ID, skirtas foninėms paslaugoms atnaujinti. Jums gali prireikti derinimo.</string>

View File

@ -51,6 +51,7 @@
<string id="SettingsConfigUrl">URL for menykonfigurasjon (JSON).</string>
<string id="SettingsCacheConfig">Skal applikasjonen bufre menykonfigurasjonen?</string>
<string id="SettingsClearCache">Bør applikasjonen tømme den eksisterende cachen neste gang den startes?</string>
<string id="SettingsVibration">Skal applikasjonen gi tilbakemelding via vibrasjoner?</string>
<string id="SettingsAppTimeout">Tidsavbrudd i sekunder. Avslutt applikasjonen etter denne perioden med inaktivitet for å spare enhetens batteri.</string>
<string id="SettingsConfirmTimeout">Etter denne tiden (i sekunder), lukkes en bekreftelsesdialog for en handling automatisk og handlingen avbrytes. Sett til 0 for å deaktivere tidsavbruddet.</string>
<string id="SettingsTextAlign">Venstre (av) eller Høyre (på) Menyjustering.</string>

View File

@ -51,6 +51,7 @@
<string id="SettingsConfigUrl">Adres URL konfiguracji menu (JSON).</string>
<string id="SettingsCacheConfig">Czy aplikacja powinna buforować konfigurację menu?</string>
<string id="SettingsClearCache">Czy aplikacja powinna wyczyścić istniejącą pamięć podręczną przy następnym uruchomieniu?</string>
<string id="SettingsVibration">Czy aplikacja powinna przekazywać informację zwrotną za pomocą wibracji?</string>
<string id="SettingsAppTimeout">Limit czasu w sekundach. Wyjdź z aplikacji po tym okresie bezczynności, aby oszczędzać baterię urządzenia.</string>
<string id="SettingsConfirmTimeout">Po tym czasie (w sekundach) okno dialogowe z potwierdzeniem akcji zamyka się automatycznie, a akcja zostaje anulowana. Ustaw na 0, aby wyłączyć limit czasu.</string>
<string id="SettingsTextAlign">Wyrównanie menu do lewej (wyłączone) lub do prawej (włączone).</string>
@ -59,5 +60,5 @@
<string id="SettingsWidgetStart">(Tylko widget) Automatycznie uruchamiaj aplikację z widgetu, bez czekania na dotknięcie.</string>
<string id="SettingsEnableBatteryLevel">Włącz usługę działającą w tle, aby wysyłać dane dotyczące poziomu naładowania baterii urządzenia, lokalizacji i (jeśli są obsługiwane) do Home Assistant.</string>
<string id="SettingsBatteryLevelRefreshRate">Częstotliwość odświeżania (w minutach), z jaką usługa działająca w tle powinna powtarzać wysyłanie danych.</string>
<string id="WebhookId">(Tylko do odczytu) Identyfikator webhook utworzony przez urządzenie na potrzeby aktualizacji usług w tle. Możesz tego potrzebować do debugowania.</string>
<string id="WebhookId">(Tylko do odczytu) Identyfikator webhooka utworzony przez urządzenie na potrzeby aktualizacji usług w tle. Możesz tego potrzebować do debugowania.</string>
</strings>

View File

@ -51,6 +51,7 @@
<string id="SettingsConfigUrl">URL para configuração do menu (JSON).</string>
<string id="SettingsCacheConfig">O aplicativo deve armazenar em cache a configuração do menu?</string>
<string id="SettingsClearCache">O aplicativo deverá limpar o cache existente na próxima vez que for iniciado?</string>
<string id="SettingsVibration">O aplicativo deve fornecer feedback por meio de vibrações?</string>
<string id="SettingsAppTimeout">Tempo limite em segundos. Saia do aplicativo após esse período de inatividade para economizar bateria do aparelho.</string>
<string id="SettingsConfirmTimeout">Após esse tempo (em segundos), uma caixa de diálogo de confirmação de uma ação é automaticamente fechada e a ação é cancelada. Defina como 0 para desativar o tempo limite.</string>
<string id="SettingsTextAlign">Alinhamento do menu à esquerda (desligado) ou à direita (ligado).</string>

View File

@ -28,7 +28,7 @@
<string id="NoAPIKey" scope="glance">Nicio cheie API în setările aplicației</string>
<string id="NoApiUrl" scope="glance">Nicio adresă URL API în setările aplicației</string>
<string id="NoConfigUrl" scope="glance">Nicio adresă URL de configurare în setările aplicației</string>
<string id="ApiFlood">Apeluri API prea rapide. Vă rugăm să încetiniți cererile dvs.</string>
<string id="ApiFlood">Apeluri API prea rapide. Vă rugăm să încetiniți solicitările.</string>
<string id="ApiUrlNotFound">Adresa URL nu a fost găsită. Potențială eroare URL API în setări.</string>
<string id="ConfigUrlNotFound">Adresa URL nu a fost găsită. Potențială eroare URL de configurare în setări.</string>
<string id="NoJson">Niciun JSON nu a fost returnat de la solicitarea HTTP.</string>
@ -51,13 +51,14 @@
<string id="SettingsConfigUrl">URL pentru configurarea meniului (JSON).</string>
<string id="SettingsCacheConfig">Ar trebui aplicația să memoreze în cache configurația meniului?</string>
<string id="SettingsClearCache">Ar trebui aplicația să golească memoria cache existentă data viitoare când este pornită?</string>
<string id="SettingsVibration">Ar trebui aplicația să ofere feedback prin vibrații?</string>
<string id="SettingsAppTimeout">Timeout în secunde. Ieșiți din aplicație după această perioadă de inactivitate pentru a economisi bateria dispozitivului.</string>
<string id="SettingsConfirmTimeout">După acest timp (în secunde), un dialog de confirmare pentru o acțiune este închis automat și acțiunea este anulată. Setați la 0 pentru a dezactiva timeout-ul.</string>
<string id="SettingsTextAlign">Alinierea meniului la stânga (dezactivată) sau la dreapta (activată).</string>
<string id="LeftToRight">De la stânga la dreapta</string>
<string id="RightToLeft">De la dreapta la stanga</string>
<string id="SettingsWidgetStart">(Numai widget) Porniți automat aplicația din widget fără a aștepta o atingere.</string>
<string id="SettingsEnableBatteryLevel">Activați serviciul de fundal pentru a trimite datele despre nivelul bateriei dispozitivului, locația și (dacă este acceptat) datele de activitate către Home Assistant.</string>
<string id="SettingsEnableBatteryLevel">Activați serviciul de fundal pentru a trimite datele despre nivelul bateriei dispozitivului, locația și (dacă sunt acceptate) datele de activitate către Home Assistant.</string>
<string id="SettingsBatteryLevelRefreshRate">Rata de reîmprospătare (în minute) la care serviciul de fundal ar trebui să repete trimiterea datelor.</string>
<string id="WebhookId">(Numai pentru citire) ID-ul Webhook creat de dispozitiv pentru actualizările serviciului de fundal. Este posibil să aveți nevoie de acest lucru pentru depanare.</string>
</strings>

View File

@ -36,7 +36,7 @@
<string id="TrailingSlashErr">Adresa URL rozhrania API nesmie obsahovať koncovú lomku „/“</string>
<string id="WebhookFailed">Registrácia Webhooku zlyhala</string>
<string id="TemplateError">Vykreslenie šablóny zlyhalo</string>
<string id="Available" scope="glance">Dostupné</string>
<string id="Available" scope="glance">K dispozícii</string>
<string id="Checking" scope="glance">Prebieha kontrola...</string>
<string id="Unavailable" scope="glance">nedostupné</string>
<string id="Unconfigured" scope="glance">Nekonfigurované</string>
@ -46,18 +46,19 @@
<!-- Pre nastavenia GUI -->
<string id="SettingsSelect">Vybrať...</string>
<string id="SettingsApiKey">Kľúč API pre HomeAssistant.</string>
<string id="SettingsApiKeyPrompt">Dlhotrvajúci prístupový token.</string>
<string id="SettingsApiKeyPrompt">Prístupový token s dlhou životnosťou.</string>
<string id="SettingsApiUrl">URL pre HomeAssistant API.</string>
<string id="SettingsConfigUrl">Webová adresa pre konfiguráciu ponuky (JSON).</string>
<string id="SettingsCacheConfig">Má aplikácia uložiť do vyrovnávacej pamäte konfiguráciu ponuky?</string>
<string id="SettingsClearCache">Mala by aplikácia pri ďalšom spustení vymazať existujúcu vyrovnávaciu pamäť?</string>
<string id="SettingsVibration">Mala by aplikácia poskytovať spätnú väzbu prostredníctvom vibrácií?</string>
<string id="SettingsAppTimeout">Časový limit v sekundách. Po tejto dobe nečinnosti ukončite aplikáciu, aby ste šetrili batériu zariadenia.</string>
<string id="SettingsConfirmTimeout">Po tomto čase (v sekundách) sa dialógové okno s potvrdením akcie automaticky zatvorí a akcia sa zruší. Ak chcete časový limit deaktivovať, nastavte na 0.</string>
<string id="SettingsTextAlign">Zarovnanie ponuky vľavo (vypnuté) alebo vpravo (zapnuté).</string>
<string id="LeftToRight">Zľava doprava</string>
<string id="RightToLeft">Zprava doľava</string>
<string id="SettingsWidgetStart">(Len miniaplikácia) Automaticky spustite aplikáciu z miniaplikácie bez čakania na klepnutie.</string>
<string id="SettingsEnableBatteryLevel">Povoľte službu na pozadí na odosielanie údajov o stave batérie zariadenia, polohe a (ak podporované) o aktivite domácemu asistentovi.</string>
<string id="SettingsEnableBatteryLevel">Povoľte službu na pozadí na odosielanie údajov o stave batérie zariadenia, polohe a (ak je podporované) o aktivite domácemu asistentovi.</string>
<string id="SettingsBatteryLevelRefreshRate">Obnovovacia frekvencia (v minútach), pri ktorej by služba na pozadí mala opakovať odosielanie údajov.</string>
<string id="WebhookId">(Len na čítanie) Webhook ID vytvorené zariadením pre aktualizácie služby na pozadí. Možno to budete potrebovať na ladenie.</string>
</strings>

View File

@ -47,10 +47,11 @@
<string id="SettingsSelect">Izberite ...</string>
<string id="SettingsApiKey">API ključ za HomeAssistant.</string>
<string id="SettingsApiKeyPrompt">Dolgoživ dostopni žeton.</string>
<string id="SettingsApiUrl">URL za API HomeAssistant.</string>
<string id="SettingsApiUrl">URL za HomeAssistant API.</string>
<string id="SettingsConfigUrl">URL za konfiguracijo menija (JSON).</string>
<string id="SettingsCacheConfig">Ali naj aplikacija predpomni konfiguracijo menija?</string>
<string id="SettingsClearCache">Ali naj aplikacija ob naslednjem zagonu počisti obstoječi predpomnilnik?</string>
<string id="SettingsVibration">Ali naj aplikacija posreduje povratne informacije prek vibriranja?</string>
<string id="SettingsAppTimeout">Časovna omejitev v sekundah. Po tem obdobju nedejavnosti zaprite aplikacijo, da prihranite baterijo naprave.</string>
<string id="SettingsConfirmTimeout">Po tem času (v sekundah) se potrditveno pogovorno okno za dejanje samodejno zapre in dejanje je preklicano. Nastavite na 0, da onemogočite časovno omejitev.</string>
<string id="SettingsTextAlign">Leva (izklopljena) ali desna (vklopljena) poravnava menija.</string>

View File

@ -51,6 +51,7 @@
<string id="SettingsConfigUrl">URL para configuración del menú (JSON).</string>
<string id="SettingsCacheConfig">¿La aplicación debería almacenar en caché la configuración del menú?</string>
<string id="SettingsClearCache">¿La aplicación debería borrar el caché existente la próxima vez que se inicie?</string>
<string id="SettingsVibration">¿La aplicación debería proporcionar retroalimentación mediante vibraciones?</string>
<string id="SettingsAppTimeout">Tiempo de espera en segundos. Salga de la aplicación después de este período de inactividad para ahorrar batería del dispositivo.</string>
<string id="SettingsConfirmTimeout">Después de este tiempo (en segundos), se cierra automáticamente un cuadro de diálogo de confirmación de una acción y se cancela la acción. Establezca en 0 para desactivar el tiempo de espera.</string>
<string id="SettingsTextAlign">Alineación del menú izquierda (desactivada) o derecha (activada).</string>

View File

@ -51,6 +51,7 @@
<string id="SettingsConfigUrl">URL för menykonfiguration (JSON).</string>
<string id="SettingsCacheConfig">Ska programmet cachelagra menykonfigurationen?</string>
<string id="SettingsClearCache">Ska programmet rensa den befintliga cachen nästa gång den startas?</string>
<string id="SettingsVibration">Ska applikationen ge feedback via vibrationer?</string>
<string id="SettingsAppTimeout">Timeout på sekunder. Avsluta programmet efter denna period av inaktivitet för att spara enhetens batteri.</string>
<string id="SettingsConfirmTimeout">Efter denna tid (i sekunder) stängs en bekräftelsedialog för en åtgärd automatiskt och åtgärden avbryts. Ställ in på 0 för att inaktivera timeout.</string>
<string id="SettingsTextAlign">Vänster (av) eller höger (på) menyjustering.</string>

View File

@ -51,6 +51,7 @@
<string id="SettingsConfigUrl">URL สำหรับการกำหนดค่าเมนู (JSON)</string>
<string id="SettingsCacheConfig">แอปพลิเคชันควรแคชการกำหนดค่าเมนูหรือไม่</string>
<string id="SettingsClearCache">แอปพลิเคชันควรล้างแคชที่มีอยู่ในครั้งถัดไปที่เริ่มทำงานหรือไม่</string>
<string id="SettingsVibration">แอปพลิเคชันควรให้ข้อเสนอแนะผ่านการสั่นสะเทือนหรือไม่</string>
<string id="SettingsAppTimeout">หมดเวลาเป็นวินาที ออกจากแอปพลิเคชันหลังจากไม่มีการใช้งานเป็นระยะเวลาหนึ่งเพื่อประหยัดแบตเตอรี่ของอุปกรณ์</string>
<string id="SettingsConfirmTimeout">หลังจากเวลานี้ (เป็นวินาที) กล่องโต้ตอบการยืนยันสำหรับการดำเนินการจะปิดโดยอัตโนมัติและการดำเนินการจะถูกยกเลิก ตั้งค่าเป็น 0 เพื่อปิดใช้งานการหมดเวลา</string>
<string id="SettingsTextAlign">การจัดตำแหน่งเมนูซ้าย (ปิด) หรือขวา (เปิด)</string>

View File

@ -40,7 +40,7 @@
<string id="Checking" scope="glance">Kontrol etme...</string>
<string id="Unavailable" scope="glance">Kullanım dışı</string>
<string id="Unconfigured" scope="glance">Yapılandırılmamış</string>
<string id="Cached" scope="glance">Önbelleğe alınmış</string>
<string id="Cached" scope="glance">Önbelleğe alındı</string>
<string id="GlanceMenu" scope="glance">Menü</string>
<string id="Memory" scope="glance">Hafıza</string>
<!-- Ayarlar GUI'si için -->
@ -51,6 +51,7 @@
<string id="SettingsConfigUrl">Menü yapılandırmasının URL'si (JSON).</string>
<string id="SettingsCacheConfig">Uygulama menü yapılandırmasını önbelleğe almalı mı?</string>
<string id="SettingsClearCache">Uygulama bir sonraki başlatılışında mevcut önbelleği temizlemeli mi?</string>
<string id="SettingsVibration">Uygulama titreşim yoluyla geri bildirim sağlamalı mı?</string>
<string id="SettingsAppTimeout">Saniye cinsinden zaman aşımı. Cihazın pilinden tasarruf etmek için bu süre boyunca işlem yapılmadığında uygulamadan çıkın.</string>
<string id="SettingsConfirmTimeout">Bu sürenin sonunda (saniye olarak), bir eyleme ilişkin onay iletişim kutusu otomatik olarak kapatılır ve eylem iptal edilir. Zaman aşımını devre dışı bırakmak için 0'a ayarlayın.</string>
<string id="SettingsTextAlign">Sol (kapalı) veya Sağ (açık) Menü Hizalaması.</string>

View File

@ -15,7 +15,7 @@
<!--
Generated by Google Translate: English to Ukrainian
Створено Google Translate з англійської
Згенеровано Google Translate з англійської
-->
<strings>
@ -48,9 +48,10 @@
<string id="SettingsApiKey">Ключ API для HomeAssistant.</string>
<string id="SettingsApiKeyPrompt">Довговічний маркер доступу.</string>
<string id="SettingsApiUrl">URL для HomeAssistant API.</string>
<string id="SettingsConfigUrl">URL для налаштування меню (JSON).</string>
<string id="SettingsConfigUrl">URL-адреса для налаштування меню (JSON).</string>
<string id="SettingsCacheConfig">Чи має програма кешувати конфігурацію меню?</string>
<string id="SettingsClearCache">Чи слід програмі очистити наявний кеш під час наступного запуску?</string>
<string id="SettingsVibration">Чи має додаток надавати зворотній зв’язок за допомогою вібрації?</string>
<string id="SettingsAppTimeout">Час очікування в секундах. Вийдіть із програми після цього періоду бездіяльності, щоб заощадити батарею пристрою.</string>
<string id="SettingsConfirmTimeout">Після закінчення цього часу (у секундах) діалогове вікно підтвердження дії автоматично закривається, а дія скасовується. Встановіть 0, щоб вимкнути тайм-аут.</string>
<string id="SettingsTextAlign">Ліворуч (вимкнено) або праворуч (увімкнено) вирівнювання меню.</string>
@ -59,5 +60,5 @@
<string id="SettingsWidgetStart">(Лише віджет) Автоматично запускайте програму з віджета, не чекаючи дотику.</string>
<string id="SettingsEnableBatteryLevel">Увімкніть фонову службу, щоб надсилати дані про рівень заряду акумулятора пристрою, місцезнаходження та (якщо підтримується) дані про діяльність до Home Assistant.</string>
<string id="SettingsBatteryLevelRefreshRate">Частота оновлення (у хвилинах), з якою фонова служба має повторювати надсилання даних.</string>
<string id="WebhookId">(Лише для читання) Ідентифікатор Webhook, створений пристроєм для фонового оновлення служби. Це може знадобитися для налагодження.</string>
<string id="WebhookId">(Лише читання) Ідентифікатор Webhook, створений пристроєм для фонового оновлення служби. Це може знадобитися для налагодження.</string>
</strings>

View File

@ -51,6 +51,7 @@
<string id="SettingsConfigUrl">URL cho cấu hình menu (JSON).</string>
<string id="SettingsCacheConfig">Ứng dụng có nên lưu trữ cấu hình menu không?</string>
<string id="SettingsClearCache">Ứng dụng có nên xóa bộ nhớ đệm hiện có vào lần khởi động tiếp theo không?</string>
<string id="SettingsVibration">Ứng dụng có nên cung cấp phản hồi thông qua rung động không?</string>
<string id="SettingsAppTimeout">Thời gian chờ tính bằng giây. Thoát khỏi ứng dụng sau khoảng thời gian không hoạt động này để tiết kiệm pin cho thiết bị.</string>
<string id="SettingsConfirmTimeout">Sau thời gian này (tính bằng giây), hộp thoại xác nhận cho một hành động sẽ tự động đóng và hành động đó sẽ bị hủy. Đặt thành 0 để tắt thời gian chờ.</string>
<string id="SettingsTextAlign">Căn chỉnh menu Trái (tắt) hoặc Phải (bật).</string>

View File

@ -51,6 +51,7 @@
<string id="SettingsConfigUrl">菜单配置的 URL (JSON)。</string>
<string id="SettingsCacheConfig">应用程序是否应该缓存菜单配置?</string>
<string id="SettingsClearCache">应用程序是否应该在下次启动时清除现有缓存?</string>
<string id="SettingsVibration">应用程序是否应该通过振动提供反馈?</string>
<string id="SettingsAppTimeout">超时(以秒为单位)。闲置一段时间后退出应用程序以节省设备电池。</string>
<string id="SettingsConfirmTimeout">在此时间(以秒为单位)之后,操作的确认对话框将自动关闭并取消该操作。设置为 0 以禁用超时。</string>
<string id="SettingsTextAlign">左(关)或右(开)菜单对齐。</string>

View File

@ -51,13 +51,14 @@
<string id="SettingsConfigUrl">選單配置的 URL (JSON)。</string>
<string id="SettingsCacheConfig">應用程式是否應該快取選單配置?</string>
<string id="SettingsClearCache">應用程式是否應該在下次啟動時清除現有快取?</string>
<string id="SettingsVibration">應用程式是否應該透過振動提供回饋?</string>
<string id="SettingsAppTimeout">超時(以秒為單位)。閒置一段時間後退出應用程式以節省設備電池。</string>
<string id="SettingsConfirmTimeout">在此時間(以秒為單位)之後,操作的確認對話方塊將自動關閉並取消該操作。設定為 0 以停用逾時。</string>
<string id="SettingsTextAlign">左(關)或右(開)選單對齊。</string>
<string id="LeftToRight">左至右</string>
<string id="RightToLeft">右到左</string>
<string id="SettingsWidgetStart">(僅限小部件)從小部件自動啟動應用程序,無需等待點擊。</string>
<string id="SettingsEnableBatteryLevel">啟用後台服務將裝置電池電量、位置和(如果支援)活動資料傳送 Home Assistant。</string>
<string id="SettingsEnableBatteryLevel">啟用後台服務將裝置電池電量、位置和(如果支援)活動資料傳送 Home Assistant。</string>
<string id="SettingsBatteryLevelRefreshRate">後台服務應重複傳送資料的更新率(以分鐘為單位)。</string>
<string id="WebhookId">(唯讀)裝置為後台服務更新所建立的 Webhook ID。您可能需要它來進行調試。</string>
</strings>

View File

@ -51,6 +51,7 @@
<string id="SettingsConfigUrl">URL untuk konfigurasi menu (JSON).</string>
<string id="SettingsCacheConfig">Sekiranya aplikasi cache konfigurasi menu?</string>
<string id="SettingsClearCache">Patutkah aplikasi mengosongkan cache sedia ada pada kali seterusnya ia dimulakan?</string>
<string id="SettingsVibration">Patutkah aplikasi memberikan maklum balas melalui getaran?</string>
<string id="SettingsAppTimeout">Tamat masa dalam beberapa saat. Keluar dari aplikasi selepas tempoh tidak aktif ini untuk menjimatkan bateri peranti.</string>
<string id="SettingsConfirmTimeout">Selepas masa ini (dalam beberapa saat), dialog pengesahan untuk tindakan ditutup secara automatik dan tindakan itu dibatalkan. Tetapkan kepada 0 untuk melumpuhkan tamat masa.</string>
<string id="SettingsTextAlign">Penjajaran Menu Kiri (mati) atau Kanan (hidup).</string>

View File

@ -36,6 +36,11 @@
-->
<property id="clear_cache" type="boolean">false</property>
<!--
Enable notification via vibrations, typically for confirmation of actions
-->
<property id="enable_vibration" type="boolean">true</property>
<!--
Application timeout in seconds, except 0 for no
timeout (default). After this amount of elapsed
@ -56,14 +61,6 @@
-->
<property id="menu_alignment" type="number">1</property>
<!--
Widget specific setting:
As soon as the menu has been fetched start show the menu of items.
This behaviour is inconsistent with the standard Garmin User Interface,
but has been requested by users so has been made the non-default option.
-->
<property id="widget_start_no_tap" type="boolean">false</property>
<!--
Enable the background service to send the clock battery level to Home Assistant.
-->

View File

@ -51,6 +51,13 @@
<settingConfig type="boolean" />
</setting>
<setting
propertyKey="@Properties.enable_vibration"
title="@Strings.SettingsVibration"
>
<settingConfig type="boolean" />
</setting>
<setting
propertyKey="@Properties.app_timeout"
title="@Strings.SettingsAppTimeout"
@ -75,13 +82,6 @@
</settingConfig>
</setting>
<setting
propertyKey="@Properties.widget_start_no_tap"
title="@Strings.SettingsWidgetStart"
>
<settingConfig type="boolean" />
</setting>
<setting
propertyKey="@Properties.enable_battery_level"
title="@Strings.SettingsEnableBatteryLevel"

View File

@ -46,6 +46,7 @@
<string id="SettingsConfigUrl">URL for menu configuration (JSON).</string>
<string id="SettingsCacheConfig">Should the application cache the menu configuration?</string>
<string id="SettingsClearCache">Should the application clear the existing cache next time it is started?</string>
<string id="SettingsVibration">Should the application provide feedback via vibrations?</string>
<string id="SettingsAppTimeout">Timeout in seconds. Exit the application after this period of inactivity to save the device battery.</string>
<string id="SettingsConfirmTimeout">After this time (in seconds), a confirmation dialog for an action is automatically closed and the action is cancelled. Set to 0 to disable the timeout.</string>
<string id="SettingsTextAlign">Left (off) or Right (on) Menu Alignment.</string>

View File

@ -115,14 +115,10 @@ class HomeAssistantApp extends Application.AppBase {
} else {
var isCached = fetchMenuConfig();
fetchApiStatus();
if (WidgetApp.isWidget) {
return [new RootView(self), new RootViewDelegate(self)] as Lang.Array<WatchUi.Views or WatchUi.InputDelegates>;
if (isCached) {
return [mHaMenu, new HomeAssistantViewDelegate(true)] as Lang.Array<WatchUi.Views or WatchUi.InputDelegates>;
} else {
if (isCached) {
return [mHaMenu, new HomeAssistantViewDelegate(true)] as Lang.Array<WatchUi.Views or WatchUi.InputDelegates>;
} else {
return [new WatchUi.View(), new WatchUi.BehaviorDelegate()] as Lang.Array<WatchUi.Views or WatchUi.InputDelegates>;
}
return [new WatchUi.View(), new WatchUi.BehaviorDelegate()] as Lang.Array<WatchUi.Views or WatchUi.InputDelegates>;
}
}
}
@ -173,15 +169,21 @@ class HomeAssistantApp extends Application.AppBase {
break;
case 200:
if (Settings.getCacheConfig()) {
Storage.setValue("menu", data as Lang.Dictionary);
mMenuStatus = WatchUi.loadResource($.Rez.Strings.Cached) as Lang.String;
if (data == null) {
mMenuStatus = WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String;
} else {
mMenuStatus = WatchUi.loadResource($.Rez.Strings.Available) as Lang.String;
if (Settings.getCacheConfig()) {
Storage.setValue("menu", data as Lang.Dictionary);
mMenuStatus = WatchUi.loadResource($.Rez.Strings.Cached) as Lang.String;
} else {
mMenuStatus = WatchUi.loadResource($.Rez.Strings.Available) as Lang.String;
}
}
if (!mIsGlance) {
buildMenu(data);
if (!WidgetApp.isWidget) {
if (data == null) {
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoJson) as Lang.String);
} else {
buildMenu(data);
WatchUi.switchToView(mHaMenu, new HomeAssistantViewDelegate(false), WatchUi.SLIDE_IMMEDIATE);
}
}
@ -254,12 +256,6 @@ class HomeAssistantApp extends Application.AppBase {
private function buildMenu(menu as Lang.Dictionary) {
mHaMenu = new HomeAssistantView(menu, null);
mQuitTimer.begin();
if (Settings.getIsWidgetStartNoTap()) {
// As soon as the menu has been fetched start show the menu of items.
// This behaviour is inconsistent with the standard Garmin User Interface, but has been
// requested by users so has been made the non-default option.
pushHomeAssistantMenuView();
}
mItemsToUpdate = mHaMenu.getItemsToUpdate();
// Start the continuous update process that continues for as long as the application is running.
// The chain of functions from 'updateNextMenuItem()' calls 'updateNextMenuItem()' on completion.
@ -401,14 +397,11 @@ class HomeAssistantApp extends Application.AppBase {
// (-101) error. This function is called by a timer every Globals.menuItemUpdateInterval ms.
function updateNextMenuItem() as Void {
var itu = mItemsToUpdate as Lang.Array<HomeAssistantToggleMenuItem>;
if (itu == null) {
// System.println("HomeAssistantApp updateNextMenuItem(): No menu items to update");
if (!mIsGlance) {
ErrorView.show(WatchUi.loadResource($.Rez.Strings.ConfigUrlNotFound) as Lang.String);
}
} else {
if (itu != null) {
itu[mNextItemToUpdate].getState();
mNextItemToUpdate = (mNextItemToUpdate + 1) % itu.size();
// } else {
// System.println("HomeAssistantApp updateNextMenuItem(): No menu items to update");
}
}
@ -417,8 +410,7 @@ class HomeAssistantApp extends Application.AppBase {
}
function getGlanceView() as Lang.Array<WatchUi.GlanceView or WatchUi.GlanceViewDelegate> or Null {
mIsGlance = true;
// RezStrings.update_glance();
mIsGlance = true;
mApiStatus = WatchUi.loadResource($.Rez.Strings.Checking) as Lang.String;
mMenuStatus = WatchUi.loadResource($.Rez.Strings.Checking) as Lang.String;
updateStatus();
@ -434,8 +426,6 @@ class HomeAssistantApp extends Application.AppBase {
fetchApiStatus();
}
// Replace this functionality with a more central settings class as proposed in
// https://github.com/house-of-abbey/GarminHomeAssistant/pull/17.
function onSettingsChanged() as Void {
// System.println("HomeAssistantApp onSettingsChanged()");
Settings.update();

View File

@ -122,9 +122,12 @@ class HomeAssistantService {
// System.println("HomeAssistantService call() URL=" + url);
// System.println("HomeAssistantService call() service=" + service);
var entity_id = data.get("entity_id");
if (entity_id == null) {
entity_id = "";
var entity_id = "";
if (data != null) {
entity_id = data.get("entity_id");
if (entity_id == null) {
entity_id = "";
}
}
Communications.makeWebRequest(
@ -141,7 +144,7 @@ class HomeAssistantService {
},
method(:onReturnCall)
);
if (mHasVibrate) {
if (mHasVibrate and Settings.getVibrate()) {
Attention.vibrate([
new Attention.VibeProfile(50, 100), // On for 100ms
new Attention.VibeProfile( 0, 100), // Off for 100ms

View File

@ -41,38 +41,40 @@ class HomeAssistantView extends WatchUi.Menu2 {
}
WatchUi.Menu2.initialize(options);
var items = definition.get("items") as Lang.Dictionary;
for(var i = 0; i < items.size(); i++) {
var type = items[i].get("type") as Lang.String or Null;
var name = items[i].get("name") as Lang.String or Null;
var content = items[i].get("content") as Lang.String or Null;
var entity = items[i].get("entity") as Lang.String or Null;
var tap_action = items[i].get("tap_action") as Lang.Dictionary or Null;
var service = items[i].get("service") as Lang.String or Null; // Deprecated schema
var confirm = false as Lang.Boolean or Null;
var data = null as Lang.Dictionary or Null;
if (tap_action != null) {
service = tap_action.get("service");
confirm = tap_action.get("confirm"); // Optional
data = tap_action.get("data"); // Optional
if (confirm == null) {
confirm = false;
}
}
if (type != null && name != null) {
if (type.equals("toggle") && entity != null) {
addItem(HomeAssistantMenuItemFactory.create().toggle(name, entity, confirm));
} else if (type.equals("template") && content != null) {
if (service == null) {
addItem(HomeAssistantMenuItemFactory.create().template_notap(name, content));
} else {
addItem(HomeAssistantMenuItemFactory.create().template_tap(name, entity, content, service, confirm, data));
var items = definition.get("items") as Lang.Array<Lang.Dictionary>;
for (var i = 0; i < items.size(); i++) {
if (items[i] instanceof(Lang.Dictionary)) {
var type = items[i].get("type") as Lang.String or Null;
var name = items[i].get("name") as Lang.String or Null;
var content = items[i].get("content") as Lang.String or Null;
var entity = items[i].get("entity") as Lang.String or Null;
var tap_action = items[i].get("tap_action") as Lang.Dictionary or Null;
var service = items[i].get("service") as Lang.String or Null; // Deprecated schema
var confirm = false as Lang.Boolean or Null;
var data = null as Lang.Dictionary or Null;
if (tap_action != null) {
service = tap_action.get("service");
confirm = tap_action.get("confirm"); // Optional
data = tap_action.get("data"); // Optional
if (confirm == null) {
confirm = false;
}
}
if (type != null && name != null) {
if (type.equals("toggle") && entity != null) {
addItem(HomeAssistantMenuItemFactory.create().toggle(name, entity, confirm));
} else if (type.equals("template") && content != null) {
if (service == null) {
addItem(HomeAssistantMenuItemFactory.create().template_notap(name, content));
} else {
addItem(HomeAssistantMenuItemFactory.create().template_tap(name, entity, content, service, confirm, data));
}
} else if (type.equals("tap") && service != null) {
addItem(HomeAssistantMenuItemFactory.create().tap(name, entity, service, confirm, data));
} else if (type.equals("group")) {
addItem(HomeAssistantMenuItemFactory.create().group(items[i]));
} else if (type.equals("tap") && service != null) {
addItem(HomeAssistantMenuItemFactory.create().tap(name, entity, service, confirm, data));
} else if (type.equals("group")) {
addItem(HomeAssistantMenuItemFactory.create().group(items[i]));
}
}
}
}

View File

@ -1,185 +0,0 @@
//-----------------------------------------------------------------------------------
//
// Distributed under MIT Licence
// See https://github.com/house-of-abbey/GarminHomeAssistant/blob/main/LICENSE.
//
//-----------------------------------------------------------------------------------
//
// GarminHomeAssistant is a Garmin IQ application written in Monkey C and routinely
// tested on a Venu 2 device. The source code is provided at:
// https://github.com/house-of-abbey/GarminHomeAssistant.
//
// P A Abbey & J D Abbey & Someone0nEarth, 5 December 2023
//
//
// Description:
//
// Application root view for GarminHomeAssistant
//
//-----------------------------------------------------------------------------------
using Toybox.Graphics;
using Toybox.Lang;
using Toybox.WatchUi;
using Toybox.System;
class RootView extends ScalableView {
// ATTENTION when the app is running as a "widget" (that means, it runs on devices
// without glance view support), the input events in this view are limited, as
// described under "Base View and the Widget Carousel" on:
//
// https://developer.garmin.com/connect-iq/connect-iq-basics/app-types/
//
// Also the view type of the base view is limited too (for example "WatchUi.Menu2"
// is not possible)).
//
// Also System.exit() is not working/do nothing when running as a widget: A widget will be
// terminated automatically by OS after some time or can be quit manually, when on the base
// view a swipe to left / "back button" press is done.
private static const scMidSep = 10; // Middle Separator "text:_text" in pixels
private var mApp as HomeAssistantApp;
private var mTitle as WatchUi.Text or Null;
private var mApiText as WatchUi.Text or Null;
private var mApiStatus as WatchUi.Text or Null;
private var mMenuText as WatchUi.Text or Null;
private var mMenuStatus as WatchUi.Text or Null;
private var mMemText as WatchUi.Text or Null;
private var mMemStatus as WatchUi.Text or Null;
private var mAntiAlias as Lang.Boolean = false;
function initialize(app as HomeAssistantApp) {
ScalableView.initialize();
mApp = app;
if (Graphics.Dc has :setAntiAlias) {
mAntiAlias = true;
}
}
function onLayout(dc as Graphics.Dc) as Void {
var w = dc.getWidth();
mTitle = new WatchUi.Text({
:text => WatchUi.loadResource($.Rez.Strings.AppName) as Lang.String,
:color => Graphics.COLOR_WHITE,
:font => Graphics.FONT_TINY,
:justification => Graphics.TEXT_JUSTIFY_CENTER | Graphics.TEXT_JUSTIFY_VCENTER,
:locX => w/2,
:locY => pixelsForScreen(30.0)
});
mApiText = new WatchUi.Text({
:text => "API:",
:color => Graphics.COLOR_WHITE,
:font => Graphics.FONT_XTINY,
:justification => Graphics.TEXT_JUSTIFY_RIGHT | Graphics.TEXT_JUSTIFY_VCENTER,
:locX => w/2 - scMidSep/2,
:locY => pixelsForScreen(50.0)
});
mApiStatus = new WatchUi.Text({
:text => WatchUi.loadResource($.Rez.Strings.Checking) as Lang.String,
:color => Graphics.COLOR_WHITE,
:font => Graphics.FONT_XTINY,
:justification => Graphics.TEXT_JUSTIFY_LEFT | Graphics.TEXT_JUSTIFY_VCENTER,
:locX => w/2 + scMidSep/2,
:locY => pixelsForScreen(50.0)
});
mMenuText = new WatchUi.Text({
:text => WatchUi.loadResource($.Rez.Strings.GlanceMenu) as Lang.String + ":",
:color => Graphics.COLOR_WHITE,
:font => Graphics.FONT_XTINY,
:justification => Graphics.TEXT_JUSTIFY_RIGHT | Graphics.TEXT_JUSTIFY_VCENTER,
:locX => w/2 - scMidSep/2,
:locY => pixelsForScreen(60.0)
});
mMenuStatus = new WatchUi.Text({
:text => WatchUi.loadResource($.Rez.Strings.Checking) as Lang.String,
:color => Graphics.COLOR_WHITE,
:font => Graphics.FONT_XTINY,
:justification => Graphics.TEXT_JUSTIFY_LEFT | Graphics.TEXT_JUSTIFY_VCENTER,
:locX => w/2 + scMidSep/2,
:locY => pixelsForScreen(60.0)
});
mMemText = new WatchUi.Text({
:text => WatchUi.loadResource($.Rez.Strings.Memory) as Lang.String + ":",
:color => Graphics.COLOR_WHITE,
:font => Graphics.FONT_XTINY,
:justification => Graphics.TEXT_JUSTIFY_RIGHT | Graphics.TEXT_JUSTIFY_VCENTER,
:locX => w/2 - scMidSep/2,
:locY => pixelsForScreen(70.0)
});
mMemStatus = new WatchUi.Text({
:text => WatchUi.loadResource($.Rez.Strings.Checking) as Lang.String,
:color => Graphics.COLOR_WHITE,
:font => Graphics.FONT_XTINY,
:justification => Graphics.TEXT_JUSTIFY_LEFT | Graphics.TEXT_JUSTIFY_VCENTER,
:locX => w/2 + scMidSep/2,
:locY => pixelsForScreen(70.0)
});
}
function onUpdate(dc as Graphics.Dc) as Void {
if (mAntiAlias) {
dc.setAntiAlias(true);
}
dc.setColor(Graphics.COLOR_WHITE, Graphics.COLOR_BLACK);
dc.clear();
// Initialise this locally, otherwise the venu1 device runs out of memory when stored at class level.
var launcherIcon = Application.loadResource(Rez.Drawables.LauncherIcon);
var w = dc.getWidth();
var h = dc.getHeight();
dc.drawBitmap(w/2 - launcherIcon.getWidth()/2, h/8 - launcherIcon.getHeight()/2, launcherIcon);
mTitle.draw(dc);
mApiText.draw(dc);
mApiStatus.setText(mApp.getApiStatus());
mApiStatus.draw(dc);
mMenuText.draw(dc);
mMenuStatus.setText(mApp.getMenuStatus());
mMenuStatus.draw(dc);
mMemText.draw(dc);
var stats = System.getSystemStats();
var memUsed = (100f * stats.usedMemory) / stats.totalMemory;
mMemStatus.setText(memUsed.format("%.1f") + "%");
if (stats.usedMemory > Globals.scLowMem * stats.totalMemory) {
mMemStatus.setColor(Graphics.COLOR_RED);
} else {
mMemStatus.setColor(Graphics.COLOR_WHITE);
}
mMemStatus.draw(dc);
}
function onShow() as Void {
WatchUi.requestUpdate();
}
}
class RootViewDelegate extends WatchUi.BehaviorDelegate {
var mApp as HomeAssistantApp;
function initialize(app as HomeAssistantApp) {
BehaviorDelegate.initialize();
mApp = app;
}
function onTap(evt as WatchUi.ClickEvent) as Lang.Boolean {
return backToMainMenu();
}
function onSelect() as Lang.Boolean {
return backToMainMenu();
}
function onMenu() as Lang.Boolean {
return backToMainMenu();
}
private function backToMainMenu() as Lang.Boolean {
if (mApp.isHomeAssistantMenuLoaded()) {
mApp.pushHomeAssistantMenuView();
return true;
}
return false;
}
}

View File

@ -34,10 +34,10 @@ class Settings {
private static var mConfigUrl as Lang.String = "";
private static var mCacheConfig as Lang.Boolean = false;
private static var mClearCache as Lang.Boolean = false;
private static var mVibrate as Lang.Boolean = false;
private static var mAppTimeout as Lang.Number = 0; // seconds
private static var mConfirmTimeout as Lang.Number = 3; // seconds
private static var mMenuAlignment as Lang.Number = WatchUi.MenuItem.MENU_ITEM_LABEL_ALIGN_LEFT;
private static var mIsWidgetStartNoTap as Lang.Boolean = false;
private static var mIsBatteryLevelEnabled as Lang.Boolean = false;
private static var mBatteryRefreshRate as Lang.Number = 15; // minutes
private static var mIsApp as Lang.Boolean = false;
@ -54,10 +54,10 @@ class Settings {
mConfigUrl = Properties.getValue("config_url");
mCacheConfig = Properties.getValue("cache_config");
mClearCache = Properties.getValue("clear_cache");
mVibrate = Properties.getValue("enable_vibration");
mAppTimeout = Properties.getValue("app_timeout");
mConfirmTimeout = Properties.getValue("confirm_timeout");
mMenuAlignment = Properties.getValue("menu_alignment");
mIsWidgetStartNoTap = Properties.getValue("widget_start_no_tap");
mIsBatteryLevelEnabled = Properties.getValue("enable_battery_level");
mBatteryRefreshRate = Properties.getValue("battery_level_refresh_rate");
@ -67,22 +67,19 @@ class Settings {
// Manage this inside the application or widget only (not a glance or background service process)
if (mIsApp) {
if (mIsBatteryLevelEnabled) {
if (mIsBatteryLevelEnabled and mHasService) {
if (getWebhookId().equals("")) {
mWebhookManager = new WebhookManager();
mWebhookManager.requestWebhookId();
} else if (
mHasService and
((Background.getTemporalEventRegisteredTime() == null) or
(Background.getTemporalEventRegisteredTime() != (mBatteryRefreshRate * 60)))
) {
}
if ((Background.getTemporalEventRegisteredTime() == null) or
(Background.getTemporalEventRegisteredTime() != (mBatteryRefreshRate * 60))) {
Background.registerForTemporalEvent(new Time.Duration(mBatteryRefreshRate * 60)); // Convert to seconds
}
} else {
// Explicitly disable the background event which persists when the application closes.
if (mHasService and (Background.getTemporalEventRegisteredTime() != null)) {
Background.deleteTemporalEvent();
}
// If !mHasService disable the Settings option as user feedback
unsetIsBatteryLevelEnabled();
unsetWebhookId();
}
}
@ -133,6 +130,10 @@ class Settings {
Properties.setValue("clear_cache", mClearCache);
}
static function getVibrate() as Lang.Boolean {
return mVibrate;
}
static function getAppTimeout() as Lang.Number {
return mAppTimeout * 1000; // Convert to milliseconds
}
@ -145,10 +146,6 @@ class Settings {
return mMenuAlignment; // Either WatchUi.MenuItem.MENU_ITEM_LABEL_ALIGN_RIGHT or WatchUi.MenuItem.MENU_ITEM_LABEL_ALIGN_LEFT
}
static function getIsWidgetStartNoTap() as Lang.Boolean {
return mIsWidgetStartNoTap;
}
static function unsetIsBatteryLevelEnabled() {
mIsBatteryLevelEnabled = false;
Properties.setValue("enable_battery_level", mIsBatteryLevelEnabled);