Compare commits
144 Commits
79-confirm
...
v2.12
Author | SHA1 | Date | |
---|---|---|---|
e6544b5b20 | |||
83914e8d8d | |||
bd4b6d68a8 | |||
f4ca55d741 | |||
5d34db7b6a | |||
cfaa31d5ee | |||
52ee270788 | |||
dec38889a5 | |||
586d85e706 | |||
30b55aec3e | |||
93d672dd40 | |||
9130bc7121 | |||
a6e386c5e6 | |||
2ffd83ebf5 | |||
48b7e7efe5 | |||
7bb270aae8 | |||
ac117952d0 | |||
8f685af8ca | |||
b17d12fe54 | |||
d5c39fa7f0 | |||
b4b113f4e1 | |||
517e36cfb0 | |||
7071362656 | |||
e37b2a76aa | |||
e3f8291299 | |||
2f4c14d7d5 | |||
5b9dd6d2eb | |||
6599c22664 | |||
c66950cfb0 | |||
2a99069f48 | |||
bb9c8b1088 | |||
34e56c5da0 | |||
0a93f4f9ba | |||
eb0d0f5044 | |||
a0fe746c1d | |||
00b071c132 | |||
cacd9f856f | |||
eebf5c9dcd | |||
da645f17ad | |||
dbd0a42d2e | |||
aeeb1aa96e | |||
be66c282df | |||
4dc31e3c65 | |||
92d3fbee57 | |||
181335bfd7 | |||
b684c1172a | |||
0ee20de6c5 | |||
d5ed16e6d2 | |||
8e2a4333ca | |||
a65dcd6811 | |||
7b6fc65bf2 | |||
b65d45c955 | |||
85b01eca91 | |||
3ffaa744e0 | |||
d488897fbd | |||
457dcca002 | |||
3a96f24f1d | |||
5971e7f852 | |||
f486a2c868 | |||
0dfcc65469 | |||
4d4a86f195 | |||
9e1c5959ab | |||
41bc27262d | |||
4119997ddd | |||
6e842af372 | |||
9c5aad889d | |||
2ad0480bbf | |||
1d5ee735e8 | |||
d694880969 | |||
763c9cc5e0 | |||
e332c7c466 | |||
d0109fe0af | |||
28a03282a5 | |||
c148ef7080 | |||
69ddb0f197 | |||
55423c4eb7 | |||
66193f080a | |||
b31aff652f | |||
5e9673ba0e | |||
da4f4401fe | |||
f531ad8004 | |||
930f1525b3 | |||
5de67382bc | |||
a45785cd88 | |||
6fc639f17f | |||
997e1c87e2 | |||
2542d9e9a5 | |||
c2883f883e | |||
d991f7f180 | |||
9f759b1dad | |||
bbb4d13eb2 | |||
cf6552410e | |||
6b3a17bea3 | |||
8f372c03e3 | |||
f5f88ced4e | |||
96abff9339 | |||
4ff1509046 | |||
1ec80a1704 | |||
e3288c9353 | |||
2ba102f8dd | |||
3e0789e808 | |||
bd56c6b4e6 | |||
6063ae8ba3 | |||
f00bbdcb13 | |||
2b98ed885e | |||
4a8185a937 | |||
bb55ed4c69 | |||
4ddf8339b8 | |||
7b227499c8 | |||
0849524ea9 | |||
b54b1d8cae | |||
17b1e38145 | |||
2afd0295b4 | |||
83f8b7bf26 | |||
c4066e9fe3 | |||
c062a6fcff | |||
7ab8246197 | |||
776134e842 | |||
a95736ebed | |||
9c001f3402 | |||
7786efd883 | |||
0b80e4546d | |||
6e67c4cf2a | |||
b80227e484 | |||
d9b345e5b8 | |||
fc7302ad3b | |||
d9ecaf34ee | |||
62b8f0fccf | |||
26954cbc60 | |||
a5b2af81bc | |||
10c64c0fdc | |||
ed3dce8827 | |||
35a65ebdf4 | |||
b46c4d2eb4 | |||
2b21c840c6 | |||
1448f6b0c2 | |||
ce2f4d38d0 | |||
13d3ffd1ec | |||
5620ea6695 | |||
7243917103 | |||
49fb42cc0f | |||
39fc04fc5c | |||
3c5e970892 | |||
f0b84856ad |
10
.github/ISSUE_TEMPLATE/blank-issue.md
vendored
Normal 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
@ -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.
|
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal 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.
|
5
.github/restyled.yml
vendored
@ -1,2 +1,5 @@
|
||||
exclude:
|
||||
- "**/*.md"
|
||||
- '**/*.md'
|
||||
- '**/pnpm-lock.yaml'
|
||||
- 'manifest.xml'
|
||||
- 'manifest-widget.xml'
|
||||
|
10
.prettierrc
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"singleQuote": true,
|
||||
"bracketSameLine": true,
|
||||
"arrowParens": "always",
|
||||
"experimentalTernaries": true,
|
||||
"semi": true,
|
||||
"trailingComma": "es5"
|
||||
}
|
@ -1,12 +1,59 @@
|
||||
# Battery Reporting
|
||||
[Home](README.md) | [Switches](examples/Switches.md) | [Actions](examples/Actions.md) | [Templates](examples/Templates.md) | Battery Reporting | [Trouble Shooting](TroubleShooting.md) | [Version History](HISTORY.md)
|
||||
|
||||
# Background Service
|
||||
|
||||
The background service can report the following statuses from your device to your Home Assistant:
|
||||
|
||||
- Battery Level with charging status.
|
||||
- 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.
|
||||
|
||||
**Please do not ask for these to be made 'events'.** Garmin's [Connect IQ background service](https://developer.garmin.com/connect-iq/api-docs/Toybox/System/ServiceDelegate.html) is limited in that while it does provide an `onActivityCompleted()` method, it does not provide an `onActivityStarted()` method, so you would not have the complete activity life cycle anyway. So we're keeping this implementation simple, you just get a sampling at one refresh rate. This probably limits you to updating a status on a Home Assistant Dashboard only.
|
||||
|
||||
## Battery Reporting
|
||||
|
||||
From version 2.1 the application includes a background service to report the current device battery level and charging status back to Home Assistant. This is a feature that Garmin omitted to include with the Bluetooth connection.
|
||||
|
||||
## Location Reporting
|
||||
|
||||
From version 2.6 the application includes reporting your location. The location data reported includes:
|
||||
|
||||
- Location (latitude and longitude)
|
||||
- Location accuracy
|
||||
- Speed
|
||||
- Direction
|
||||
- Altitude
|
||||
|
||||
You get whatever your device provides at the moment, i.e. at the accuracy the device currently provides. If your watch is not calibrated you get poor data. It might mean that you get more accurate location data when you are in a location tracking activity (i.e. not swimming pool lengths). The device [indicates an accuracy](https://developer.garmin.com/connect-iq/api-docs/Toybox/Position.html#Quality-module) in units of:
|
||||
|
||||
- `Position.QUALITY_NOT_AVAILABLE` - No update provided
|
||||
- `Position.QUALITY_LAST_KNOWN` - No update provided
|
||||
- `Position.QUALITY_POOR` - We translate that to 500 m arbitrarily
|
||||
- `Position.QUALITY_USABLE` - We translate that to 100 m arbitrarily
|
||||
- `Position.QUALITY_GOOD` - We translate that to 10 m arbitrarily
|
||||
|
||||
**You cannot rely on the radius of the circle of accuracy in any resulting maps as any meaningful indication of error.**
|
||||
|
||||
## Activity Reporting
|
||||
|
||||
From version 2.6 the application includes reporting your activity. The activity data includes:
|
||||
|
||||
- Activity - This is an integer as defined by [Toybox.Activity `SPORT`](https://developer.garmin.com/connect-iq/api-docs/Toybox/Activity.html#Sport-module)
|
||||
- Sub-activity - This is an integer as defined by [Toybox.Activity `SUB_SPORT`](https://developer.garmin.com/connect-iq/api-docs/Toybox/Activity.html#SubSport-module)
|
||||
|
||||
The application only provides the integers without translation. When using the values in Home Assistant, you will need to provide you own mapping from the `Activity` enumerated type to the human readable text. As developers of the application we are pushing this translation to the server to keep the Garmin application code 'lean'. You will also need to add to both the list of activities (sports) and sub-activities (sub-sports) an interpretation of integer `-1` for no activity/sub-activity at present.
|
||||
|
||||
## Start Reporting
|
||||
|
||||
The main drawback of this solution is that the Garmin application must be run once with the feature enabled in the settings before reporting will start. Reporting continues after you have exited the application. This is a limit we cannot code around.
|
||||
|
||||
It should be as simple as that, there should be a new device in the mobile app integration called `Garmin Watch` with the battery level and charging status.
|
||||
It should be as simple as starting the application (or widget). There should be a new device in the mobile app integration called `Garmin Watch` with the battery level and charging status.
|
||||
|
||||
[](https://my.home-assistant.io/redirect/integration/?domain=mobile_app)
|
||||
|
||||
@ -14,9 +61,7 @@ If this is not the case, head over to the [troubleshooting page](Troubleshooting
|
||||
|
||||
## Stop Reporting
|
||||
|
||||
To stop the reporting, the option must be turned off in the settings and then the application run once. Running the application then removes the background service.
|
||||
|
||||
In both cases, the enable and repeat time settings can be changed whilst the application is running (i.e. live) and the background service will be amended.
|
||||
To stop the reporting, the option must be turned off in the settings and then the application run once. Running the application then removes the background service. Both the enable and repeat time settings can be changed whilst the application is running (i.e. live) and the background service will be amended.
|
||||
|
||||
## Renaming the device
|
||||
|
||||
@ -32,7 +77,7 @@ Select the device called `Garmin Watch` and then click on the edit icon in the t
|
||||
|
||||
## Fixing the icon
|
||||
|
||||
In configuration.yaml:
|
||||
In `configuration.yaml`:
|
||||
|
||||
```yaml
|
||||
template:
|
||||
@ -116,7 +161,7 @@ N.B. `sensor.<device>_battery_level` will likely need to be changed to `sensor.<
|
||||
|
||||
## Migrating
|
||||
|
||||
You should remove your old template sensors before migrating to the new integration. You can do this by removing the `sensor.<device>_battery_level` and `binary_sensor.<device>_battery_is_charging` entities from `configuration.yaml` and then restarting Home Assistant or reloading the yaml.
|
||||
You should remove your old template sensors before migrating to the new integration. You can do this by removing the `sensor.<device>_battery_level` and `binary_sensor.<device>_battery_is_charging` entities from `configuration.yaml` and then restarting Home Assistant or reloading the YAML.
|
||||
|
||||
[Here is the old configuration method for reference.](https://github.com/house-of-abbey/GarminHomeAssistant/blob/b51e2aa2a4afbc58ad466f3b81667d1cd252d091/BatteryReporting.md)
|
||||
|
27
HISTORY.md
Normal file
@ -0,0 +1,27 @@
|
||||
[Home](README.md) | [Switches](examples/Switches.md) | [Actions](examples/Actions.md) | [Templates](examples/Templates.md) | [Background Service](BackgroundService.md) | [Trouble Shooting](TroubleShooting.md) | Version History
|
||||
|
||||
# Version History
|
||||
|
||||
| Version | Comment |
|
||||
|:-------:|---------|
|
||||
| 1.0 | Initial release for 26 devices. |
|
||||
| 1.1 | Updated for 54 more devices, 80 in total. Scene support. Added vibrate acknowledgement for tap-based menu items. Falls back to a custom visual confirmation in the absence of 'toast' and vibrate support. Bug fix for large menus needing status updates. |
|
||||
| 1.2 | Do not crash on zero items to update. Report unreachable URLs. Verify API URL does not have a trailing slash '/'. Increased HTTP response diagnosis. Reduced minimum API Level required from 3.3.0 to 3.1.0 to allow more device "part numbers" to be satisfied. |
|
||||
| 1.3 | Tap for scripts was working in emulation but not on some phones. Decision is to make the 'service' field in the JSON compulsory for 'tap' menu items. This is a breaking change, but for many might be a fix for something not working correctly. Improve language support, we can now accept language corrections and prevent the automated translation of strings from clobbering manually refined entries. Thank you to two new contributors. |
|
||||
| 1.4 | New lean user Interface with thanks to [Someone0nEarth](https://github.com/Someone0nEarth) for their contribution which is now the default. If you prefer the old style you can still select it in the settings. The provision of a 'service' tag is now not just heavily suggested by the JSON schema, it is enforced in code. With apologies to anyone suffering a breakage as a result. |
|
||||
| 1.5 | <img src="images/confirmation_view.png" width="200" title="Confirmation View"/><br/>Added an optional confirmation dialogue view to prevent accidental execution of actions on mistaken tap. This also brings a change in the JSON schema to allow an optional field to specify that the confirmation should be used for a menu item. As we are now maturing and adding features we have decided to mitigate breaking changes to the JSON schema by being more careful to adopt the Home Assistant schema (noting there is a 1:1 mapping between YAML and JSON). This change does deprecate the top level `service` tag in favour of `tag_action` containing multiple fields including `service` & `confirm`. Users should migrate to the new format for the new functionality, but the timescale for actual deprecation are long and undecided. |
|
||||
| 1.6 | Added a user configurable 'timeout' in seconds so that when no action is taken the application automatically closes, stopping the continuous polling for changes of status and hence saving the drain on the battery. This can be disabled with timeout=0. |
|
||||
| 1.7 | Added timeout to confirmation views so that when used for security devices it does not linger when left unconfirmed. Thanks to [Jan Schneider](https://github.com/j-a-n) for the contribution. Known bug for devices not supporting [`WatchUi.getCurrentView()`](https://developer.garmin.com/connect-iq/api-docs/Toybox/WatchUi.html#getCurrentView-instance_function) API call which is only available on API Level 3.4.0, e.g. Vivoactive 4S. |
|
||||
| 2.0 | A significant code base change to enable both a 'widget' version for older devices, e.g. Venu (1), and an application with a glance, e.g. Venu2. These two versions must now be distributed under separate application IDs, but they have the same code base. A further 20 more devices are now supported, the settings have been internationalised, and there's a bug fix for older devices when trying to display a helpful error message but instead the application crashed. This version has come from a significant collaboration with [Someone0nEarth](https://github.com/Someone0nEarth). |
|
||||
| 2.1 | Deployment of an idea to provide Home Assistant with access to the watch battery level. Using this requires [significant setup](BackgroundService.md) on the Home Assistant configuration and hence is detailed separately. Due to this, the default state for this battery option is _off_. Changed the application settings user interface to be more intuitive, and hence amended the way settings are managed in the background. |
|
||||
| 2.2 | Adds a feature to cache the menu configuration and save the time taken for an HTTP request to fetch it. You as the user are responsible for managing the cache by clearing it when you update your configuration. Improvement to widget root display updates. Bug fix for battery level reporting when in the glance carousel. Fixed an uninternationalised string, "Execute". Unfixed issue with battery level updates when the user is not an administrator. |
|
||||
| 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.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. |
|
||||
| 2.10 | Added a user requested feature to slow down the rate of API calls in order to reduce battery wear for a situation where the application is kept open permanently on the device for convenience. Added 4 new devices. |
|
||||
| 2.11 | Bug fix release for menu caching being turned off and language corrections (Czech & Slovenian). |
|
||||
| 2.12 | Re-enabled Edge 540 and Edge 840 devices which we are unable to support due to simulator issues, but the Edge 840 device has been confirmed as working by a @Petucky. |
|
171
README.md
@ -1,42 +1,53 @@
|
||||
Home | [Switches](examples/Switches.md) | [Actions](examples/Actions.md) | [Templates](examples/Templates.md) | [Background Service](BackgroundService.md) | [Trouble Shooting](TroubleShooting.md) | [Version History](HISTORY.md)
|
||||
|
||||
# GarminHomeAssistant
|
||||
|
||||
<img src="images/Actual_Venu2_Theme.jpg" width="200" title="Venu 2"/>
|
||||
|
||||
A Garmin application to provide a "dashboard" to control your devices via [Home Assistant](https://www.home-assistant.io/). The application will never be as fully fledged as a Home Assistant dashboard, so it is designed to be good enough for the simple and essential things. Those things that can be activated via an on/off toggle or a tap. That should cover lights, switches, and anything requiring a single press such as an automation. For anything more complicated, e.g. thermostat, it would always be quicker and simpler to reach for your phone or tablet... or the device's own remote control!
|
||||
|
||||
The application is designed around a simple scrollable menu where menu items have been extended to interface with the [Home Assistant API](https://developers.home-assistant.io/docs/api/rest/), e.g. to get the status of switches or lights for display on the toggle menu item. It is possible to nest menus, so there is a menu item to open a sub-menu. This can be arbitrarily deep and nested in the format of a tree of items, although you need to consider if reaching for your phone becomes quicker to select the device what you want to control.
|
||||
The application is designed around a simple scrollable menu where menu items have been extended to interface with the [Home Assistant API](https://developers.home-assistant.io/docs/api/rest/), e.g. to get the status of switches or lights for display on the toggle menu item, or a text status for an entity (template item). It is possible to nest menus, so there is a menu item to open a sub-menu. This can be arbitrarily deep and nested in the format of a tree of items, although you need to consider if reaching for your phone becomes quicker to select the device what you want to control.
|
||||
|
||||
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.
|
||||
**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/).
|
||||
> [!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.**
|
||||
**If you are struggling with getting the application to work, please consult the [trouble shooting](TroubleShooting.md#menu-configuration-url) guide first.**
|
||||
|
||||
|
||||
## Widget or Application?
|
||||
|
||||
As of version 2.0, there are now two installable versions. For older devices before applications supported 'glances', there is a now widget version. These two version must be downloaded separately due to the way the Connect IQ App Store requires them to have separate application IDs. Therefore you need to choose which you want up front. Here how they compare.
|
||||
As of version 2.0, there are now two installable versions. For older devices before applications supported 'glances', there is a now widget version. These two version must be downloaded separately due to the way the Connect IQ App Store requires them to have separate application IDs. Therefore you need to choose which you want up front. Here's how they compare.
|
||||
|
||||
| Version | Explanation |
|
||||
|------------------------|-------------|
|
||||
| Application (original) | For newer devices that allow glance views in their applications (e.g. Venu2), the GarminHomeAssistant application can be started either from a glance (with only the application name presently, no status) 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.<hr><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. Venu1) 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.<hr><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. |
|
||||
| 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 | **"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 too.
|
||||
### 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
|
||||
|
||||
Setup for this menu is more complicated than the Connect IQ settings menu really allows you to specify. In order to make the dashboard easily configurable and easy to change, we have provided an external mechanism for specifying the menu layout, a JSON file you write, retrieved from a URL you specify. JSON was chosen over YAML because Garmin can parse JSON HTTP GET responses into its own internal dictionary, it cannot parse YAML, hence a choice of one really. Note that JSON and YAML are essentially a 1:1 format mapping except JSON does not have comments. We recommend you take advantage of [Home Assistant's own web server](https://www.home-assistant.io/integrations/http/#hosting-files) to provide the JSON definition. The advantage here are:
|
||||
Setup for this menu is more complicated than the Connect IQ settings menu really allows you to specify. In order to make the dashboard easily configurable and easy to change, we have provided an external mechanism for specifying the menu layout, a JSON file you write, retrieved from a URL you specify. JSON was chosen over YAML because Garmin can parse JSON HTTP GET responses into its own internal dictionary, it cannot parse YAML, hence a choice of one really. Note that JSON and YAML are essentially a 1:1 format mapping except JSON does not have comments. We recommend you take advantage of [Home Assistant's own web server](https://www.home-assistant.io/integrations/http/#hosting-files) to provide the JSON definition. The advantages of this are:
|
||||
|
||||
1. the file is as public as you make your Home Assistant,
|
||||
2. the file is editable within Home Assistant via "Studio Code Server", and
|
||||
2. the file is editable within Home Assistant via "[Studio Code Server](https://my.home-assistant.io/redirect/supervisor_addon/?addon=a0d7b954_vscode)", and
|
||||
3. the schema is verifiable using [JSON Schema](https://json-schema.org/overview/what-is-jsonschema).
|
||||
|
||||
We have used `/config/www/garmin/<something>.json` on our Home Assistant's file system. That equates to a URL of `https://homeassistant.local/local/garmin/<something>.json`.
|
||||
|
||||
Schema verification is a big part of this design choice. If the application cannot read your menu definition, there's a limited amount of debug it can reasonable provide on a small screen. That responsibility now falls to you and the schema checker for help.
|
||||
Schema verification is a big part of this design choice. If the application cannot read your menu definition, there's a limited amount of debug it can reasonably provide on a small screen. That responsibility now falls to you and the schema checker for help.
|
||||
|
||||
Example schema as shown in the images:
|
||||
Example schema:
|
||||
|
||||
```json
|
||||
{
|
||||
@ -63,7 +74,6 @@ Example schema as shown in the images:
|
||||
"type": "toggle"
|
||||
},
|
||||
{
|
||||
"entity": "menu.each_lounge_light",
|
||||
"name": "Each Lounge Light",
|
||||
"title": "Lounge",
|
||||
"type": "group",
|
||||
@ -115,35 +125,40 @@ Example schema as shown in the images:
|
||||
}
|
||||
```
|
||||
|
||||
NB. Entity names are not real in case anyone's a hacker.
|
||||
NB. Entity names are not real in case anyone's a hacker ;-).
|
||||
|
||||
The example above illustrates how to configure:
|
||||
|
||||
* Light or switch toggles
|
||||
* Automation enable toggles
|
||||
* Lights or switches (toggle), <img src="images/toggle_icon.png" height="20">
|
||||
* Enables for automations (toggle), <img src="images/toggle_icon.png" height="20">
|
||||
* Script invocation (tap)
|
||||
* Service invocation, e.g. Scene setting, (tap)
|
||||
* A sub-menu to open (tap)
|
||||
* A sub-menu to open (group)
|
||||
* You can also display the status of devices (template) and add an optional 'tap' action. However that's a bit more involved and has its own [examples page](examples/Templates.md). Add those later!
|
||||
|
||||
The example JSON shows an example usage of each of these Home Assistance entity types. Presently, an automation is the only one that can be either a 'tap' or a 'toggle'.
|
||||
The following table indicates how Home Assistant entity types can map to the Garmin applications menu types. Presently, an automation is the only one that can be either a 'tap' or a 'toggle'.
|
||||
|
||||
| HA Type | Tap | Toggle |
|
||||
|------------|:---:|:------:|
|
||||
| Switch | ❌ | ✅ |
|
||||
| Light | ❌ | ✅ |
|
||||
| Automation | ✅ | ✅ |
|
||||
| Script | ✅ | ❌ |
|
||||
| Scene | ✅ | ❌ |
|
||||
| HA Entity Type | Tap | Toggle | Template (custom status text with optional tap action) |
|
||||
|------------------|:---:|:------:|:------------------------------------------------------:|
|
||||
| Switch | ❌ | ✅ | ✅<br>Separate on and off, or anything in between |
|
||||
| Light | ❌ | ✅ | ✅<br>Separate on and off, or anything in between |
|
||||
| Automation | ✅ | ✅ | ✅ |
|
||||
| Script | ✅ | ❌ | ✅ |
|
||||
| Scene | ✅ | ❌ | ✅ |
|
||||
| Sensor | ❌ | ❌ | ✅ |
|
||||
| Binary Sensor | ❌ | ❌ | ✅ |
|
||||
| Any other entity | ❌ | ❌ | ✅ |
|
||||
| Any service | ✅ | ❌ | ✅ |
|
||||
|
||||
NB. All 'tap' items must specify a 'service' tag.
|
||||
Templates need separate HTTP requests to update their status and send an action. Only the toggle items have the on/off <img src="images/toggle_icon.png" height="20"> icon. A Tap does not require a status update and hence does not require the associated HTTP GET request. NB. All 'tap' items must specify a 'service' tag.
|
||||
|
||||
Possible future extensions might include specifying the alternative texts to use instead of "On" and "Off", e.g. "Locked" and "Unlocked" (but wouldn't having locks operated from your watch be a security concern ;-))
|
||||
You can now specify alternative texts to use instead of "On" and "Off", e.g. "Locked" and "Unlocked" or "Open" and "Closed" through the use of a [template menu item](examples/Templates.md). But wouldn't having locks operated from your watch be a security concern ;-) ?
|
||||
|
||||
The [schema](https://raw.githubusercontent.com/house-of-abbey/GarminHomeAssistant/main/config.schema.json) is checked by using a URL directly back to this GitHub source repository, so you do not need to install that file. You can just copy & paste your entity names from the YAML configuration files used to configure Home Assistant. With a submenu, there's a difference between "title" and "name". The "name" goes on the menu item, and the "title" at the head of the submenu. If your dashboard definition fails to meet the schema, the application will simply drop items with the wrong field names without warning.
|
||||
The [schema](https://raw.githubusercontent.com/house-of-abbey/GarminHomeAssistant/main/config.schema.json) is checked by using a URL directly back to this GitHub source repository, so you do not need to install that file. You can just copy & paste your entity names from the YAML configuration files used to configure Home Assistant. With a submenu, there's a difference between "title" and "name". The "name" goes on the menu item, and the "title" at the head of the submenu. If your dashboard definition fails to meet the schema, the application will simply drop items with the wrong field names without warning to protect itself.
|
||||
|
||||
### Old deprecated format
|
||||
|
||||
Version 1.5 brought in a change to the JSON schema so the follow old format remains useable but is no longer favoured. The schema now marks it as 'deprecated' to nudge people over.
|
||||
Version 1.5 brought in a change to the JSON schema so the following old format remains useable but is no longer favoured. The schema now marks it as 'deprecated' to nudge people over.
|
||||
|
||||
```json
|
||||
{
|
||||
@ -169,32 +184,39 @@ The above should be replaced by the following:
|
||||
|
||||
This allows the `confirm` field to be accommodated in the `tap_action` along side the `service` tag, and follows the Home Assistant YAML format more closely.
|
||||
|
||||
### More Examples
|
||||
|
||||
- [Switches](examples/Switches.md)
|
||||
- [Actions](examples/Actions.md)
|
||||
- [Templates](examples/Templates.md)
|
||||
|
||||
## Editing the JSON file
|
||||
|
||||
You have options. The first is what we use.
|
||||
1. **Best!** 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.
|
||||
2. Locally installed VSCode, or if not installed,
|
||||
3. try the on-line version at https://vscode.dev/.
|
||||
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.
|
||||
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 present with on your device.
|
||||
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
|
||||
|
||||
Having created your JSON definition for your dashboard, you need to create an API key for your personal account on Home Assistant. You will need a [Long-Lived Access Token](https://developers.home-assistant.io/docs/auth_api/#long-lived-access-token). This is not obvious and is bound to your own Home Assistant account.
|
||||
|
||||
Follow the menu sequence: `HA -> user profile -> Long-lived access tokens`. Make sure you save the generated token before dismissing it. You may like to perform this task on your phone so that you can copy and paste it (and message yourself a copy too ;-).
|
||||
Having created your JSON definition for your dashboard, you need to create an API key for your personal account on Home Assistant. You will need a [Long-Lived Access Token](https://developers.home-assistant.io/docs/auth_api/#long-lived-access-token). This is not obvious to find and is bound to your own Home Assistant account. Follow the menu sequence: `HA -> user profile -> Long-lived access tokens`. Make sure you save the generated token before dismissing it.
|
||||
|
||||

|
||||
|
||||
Having created that token, before you dismiss the dialogue box with the value you will never see again, copy it somewhere safe. You need to paste this into the Garmin Application's settings.
|
||||
Having created that token, before you dismiss the dialogue box with the value you will never see again, copy it somewhere safe. You need to paste this into the Garmin Application's settings. You may like to perform this task on your phone so that you can copy and paste it (and message yourself a copy too ;-)).
|
||||
|
||||
## API URL
|
||||
|
||||
If you are using Nabu Casa then your Cloud API URL can be found by looking up your URL via `HA -> Settings -> Home Assistant Cloud -> Remote Control -> Nabu Casa URL` and don't forget to add `/api` to the end of the copied string.
|
||||
If you are using [Nabu Casa](https://www.nabucasa.com/) then your Cloud API URL can be found by looking up your URL via `HA -> Settings -> Home Assistant Cloud -> Remote Control -> Nabu Casa URL` and don't forget to add `/api` to the end of the copied string.
|
||||
|
||||

|
||||
|
||||
@ -202,11 +224,9 @@ If you have built your own infrastructure, you really don't need any assistance
|
||||
|
||||
## Settings
|
||||
|
||||
Unfortunately the Settings dialogue box in the Garmin IQ application times out in Android when you go to a different screen (browser for example). When you go back to the Connect IQ application (select the view again) the settings dialogue box is broken and you have to open the Settings again, so you will need to save the settings every time before you switch applications to avoid losing the information you just put in.
|
||||
Unfortunately the Settings dialogue box in the Garmin IQ application "times out" in Android when you go to a different screen (a browser for example). When you go back to the Connect IQ application (select the view again) the settings dialogue box is broken and you have to open the Settings again, so you will need to save the settings every time before you switch applications to avoid losing the information you just put in. We recommend you can use an application like [Microsoft's "Phone Link"](https://apps.microsoft.com/detail/9NMPJ99VJBWV?hl=en-gb&gl=US) that allows you to *copy and paste* between your PC and your phone.
|
||||
|
||||
You can instead use an application like [Microsoft's "Phone Link"](https://apps.microsoft.com/detail/9NMPJ99VJBWV?hl=en-gb&gl=US) that allows you to copy and paste between your PC and your phone.
|
||||
|
||||
**Please, please, please!** Copy and paste your API key and all URLs, do not retype as it will be wrong.
|
||||
**Please, please, please!** *Copy and paste* your API key and all URLs, do not retype them as they will be wrong.
|
||||
|
||||
<img src="images/GarminHomeAssistantSettings.png" width="400" title="Application Settings"/>
|
||||
|
||||
@ -216,15 +236,24 @@ You can instead use an application like [Microsoft's "Phone Link"](https://apps.
|
||||
|
||||
You should now have a working application on your watch and be able to operate your Home Assistant devices for as long as your watch is within Bluetooth range of your phone.
|
||||
|
||||
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 below 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 flip it.
|
||||
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 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!**
|
||||
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.
|
||||
|
||||
There is a toggle setting for "text alignment" and provides finer adjustment for right-to-left languages. Perhaps this could be made automatic based on device language?
|
||||
The application timeout prevents the HomeAssistant 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. For those users who prefer to keep the application open all the time for continuous use, they can reduce the battery wear by increasing the "poll delay". This inserts a user configurable number of seconds between each round of item update checks, hence reducing the API access activity. This also reduces the responsive of the statuses displayed when HA devices are switched externally, i.e. by another Home Assistant client, then the watch menu display will not update as quickly. Therefore if you only use the HomeAssistant App briefly now and then, keep this setting at the default 0 seconds. NB. To be clear, all items are updated then a configurable delay is inserted before the next round of all item updates. If your poll delay is greater than zero, then your application timeout should be set to zero, otherwise you will exit the application and negate the value of the poll delay function.
|
||||
|
||||
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.
|
||||
| Application Timeout | Poll Delay | Comment |
|
||||
|:-------------------:|:----------:|:--------|
|
||||
| 0 | 0 | Permanently open, poll as fast as possible. This is the simple default, but could drain your battery |
|
||||
| > 0 | 0 | Temporarily open, poll as fast as possible, responsive and limits battery drain by closing. |
|
||||
| 0 | > 0 | Permanently open, but poll more gently to save battery. |
|
||||
| > 0 | > 0 | Temporarily open, poll more gently to save battery, but the application closes before the benefit is realised. Not recommended. |
|
||||
|
||||
Finally you may enable a background service to report the battery level to your Home Assistant. This is not available over Bluetooth like with other Bluetooth devices as Garmin did not implement it. See the [set up instructions](#battery-level-reporting). the last field here is readonly and allows the user to copy & paste the Webhook ID setup by the application when required for debug.
|
||||
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?
|
||||
|
||||
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
|
||||
|
||||
@ -238,19 +267,19 @@ The application will display a 'toast' showing Home Assistant's friendly name of
|
||||
|
||||
Home Assistant will inevitably change the state of devices you are also controlling via your Garmin. The Garmin application does not maintain a web socket to listen for changes. Instead it must poll the Home Assistant API with your key. Therefore the application is not that responsive to changes. Instead there will be a delay of multiples of 100 ms per item whose status needs to be checked and amended.
|
||||
|
||||
The per toggle item delay is caused by a queue of responses to web requests filling up a queue and giving a [`Communications.BLE_QUEUE_FULL`](https://developer.garmin.com/connect-iq/api-docs/Toybox/Communications.html). response code. For a Venu 2 Garmin watch an API call delay of 600 ms was found to be sustainable (500 ms was still too fast). The code now chains a sequence of updates, so as one finishes it invokes the next item's update. The more items requiring a status update that you pack into your dashboard, the slower each individual item will be updated!
|
||||
The per toggle item delay is caused by a queue of responses to web requests. The responses fill up a buffer and in early testing we observed [`Communications.BLE_QUEUE_FULL`](https://developer.garmin.com/connect-iq/api-docs/Toybox/Communications.html) response codes. For a Venu 2 Garmin watch an API call delay of 600 ms was found to be sustainable (500 ms was still too fast). The code now chains a sequence of updates, so as one finishes it invokes the next item's update. **The more items requiring a status update that you pack into your dashboard, the slower each individual item will be updated!**
|
||||
|
||||
The thinking here is that the watch application will only ever be open briefly not persistently, so the delay in picking up state changes won't be observed often for any race condition between two controllers.
|
||||
The thinking here is that the watch application will only ever be open briefly not persistently, so the delay in picking up state changes won't be observed often for any race condition between two controllers. As a consequence of this update mechanism, if you request changes too quickly you will be notified that your device cannot keep up with the rate of API responses and you will have to dismiss the error in order to continue. This is a _feature not a bug_! If the application reduces the rate of "round robin" status update requests it becomes less responsive to external changes.
|
||||
|
||||
As a consequence of this update mechanism, if you request changes too quickly you will be notified that your device cannot keep up with the rate of API responses and you will have to dismiss the error in order to continue. The is a _feature not a bug_!
|
||||
To prevent excessive battery usage, set the application timeout in the settings. This will prevent you from leaving the application open and forgotten when not being used, and the polling mechanism will then cease, saving battery life. Again, the thinking here is that the watch application will only ever be open briefly not persistently, and hence not be a constant source of battery usage unless the [background service](BackgroundService.md) for sending any watch status is used aggressively fast.
|
||||
|
||||
## Changes to the (JSON) Dashboard Definition
|
||||
|
||||
When you change the JSON file defining your dashboard, you must exit the application and the reopen it. It only takes a matter of a few seconds to pick up the new definition, but it is not automatic.
|
||||
When you change the JSON file defining your dashboard, you must exit the application and the reopen it. It only takes a matter of a few seconds to pick up the new definition, but it is not automatic. *Don't forget* you may need to choose to clear your cached menu.
|
||||
|
||||
## Submitting Corrections for Translations
|
||||
|
||||
Initially all text has been created in English, and a [Python script](https://github.com/house-of-abbey/GarminHomeAssistant/blob/main/translate.py) (Google Translate under the hood) has been used to create the first version of all translations. We have been pleased to accept better translations from native language speakers, **thank you**. If you would like to submit improved translations, our preference is you do so via a Git pull request. If you are not comfortable doing this, then just raise an issue and someone will eventually pick the request up.
|
||||
Initially all text has been created in English, and a [Python script](https://github.com/house-of-abbey/GarminHomeAssistant/blob/main/translate.py) (Google Translate under the hood) has been used to create the first version of all translations. We have been pleased to accept better translations from native language speakers, *thank you*. If you would like to submit improved translations, our preference is you do so via a [Git pull request](https://github.com/house-of-abbey/GarminHomeAssistant/pulls). If you are not comfortable doing this, then just raise an issue and someone will eventually pick the request up.
|
||||
|
||||
In order to submit a language correction please create an XML file called `corrections.xml` in the same directory as your language containing the corrected text. The format of the XML file follows that of `strings.xml`. As an example here are some corrected French translations found in directory [`resources-fre/strings/corrections.xml`](https://github.com/house-of-abbey/GarminHomeAssistant/tree/main/resources-fre/strings/corrections.xml):
|
||||
|
||||
@ -262,35 +291,23 @@ In order to submit a language correction please create an XML file called `corre
|
||||
</strings>
|
||||
```
|
||||
|
||||
The `id` attribute values are taken from the same names used in [`strings.xml`](https://github.com/house-of-abbey/GarminHomeAssistant/blob/main/resources-fre/strings/strings.xml). Not all `id` values need to be specified as missing `id`s will then use automatic translations. If the existing convention is followed then:
|
||||
The `id` attribute values are taken from the same names used in [`strings.xml`](https://github.com/house-of-abbey/GarminHomeAssistant/blob/main/resources-fre/strings/strings.xml). **Not all `id` values need to be specified as missing `id`s will then use automatic translations.** If the existing convention is followed then:
|
||||
|
||||
* The Python script will use the corrections in preference to translating, and
|
||||
* Your pull request will be honoured without comment as we will take your corrections on trust.
|
||||
|
||||
## Battery Level Reporting
|
||||
|
||||
The application and widget both now include a background service to report your watch's battery level and charging status. This requires some [setup](BatteryReporting.md) via YAML in Home Assistant to display the transmitted value. We offer this [trouble shooting](Troubleshooting.md#watch-battery-level-reporting) guide.
|
||||
|
||||
## Version History
|
||||
|
||||
| Version | Comment |
|
||||
|:-------:|---------|
|
||||
| 1.0 | Initial release for 26 devices. |
|
||||
| 1.1 | Updated for 54 more devices, 80 in total. Scene support. Added vibrate acknowledgement for tap-based menu items. Falls back to a custom visual confirmation in the absence of 'toast' and vibrate support. Bug fix for large menus needing status updates. |
|
||||
| 1.2 | Do not crash on zero items to update. Report unreachable URLs. Verify API URL does not have a trailing slash '/'. Increased HTTP response diagnosis. Reduced minimum API Level required from 3.3.0 to 3.1.0 to allow more device "part numbers" to be satisfied. |
|
||||
| 1.3 | Tap for scripts was working in emulation but not on some phones. Decision is to make the 'service' field in the JSON compulsory for 'tap' menu items. This is a breaking change, but for many might be a fix for something not working correctly. Improve language support, we can now accept language corrections and prevent the automated translation of strings from clobbering manually refined entries. Thank you to two new contributors. |
|
||||
| 1.4 | New lean user Interface with thanks to [Someone0nEarth](https://github.com/Someone0nEarth) for their contribution which is now the default. If you prefer the old style you can still select it in the settings. The provision of a 'service' tag is now not just heavily suggested by the JSON schema, it is enforced in code. With apologies to anyone suffering a breakage as a result. |
|
||||
| 1.5 | <img src="images/confirmation_view.png" width="200" title="Confirmation View"/><br/>Added an optional confirmation dialogue view to prevent accidental execution of actions on mistaken tap. This also brings a change in the JSON schema to allow an optional field to specify that the confirmation should be used for a menu item. As we are now maturing and adding features we have decided to mitigate breaking changes to the JSON schema by being more careful to adopt the Home Assistant schema (noting there is a 1:1 mapping between YAML and JSON). This change does deprecate the top level `service` tag in favour of `tag_action` containing multiple fields including `service` & `confirm`. Users should migrate to the new format for the new functionality, but the timescale for actual deprecation are long and undecided. |
|
||||
| 1.6 | Added a user configurable 'timeout' in seconds so that when no action is taken the application automatically closes, stopping the continuous polling for changes of status and hence saving the drain on the battery. This can be disabled with timeout=0. |
|
||||
| 1.7 | Added timeout to confirmation views so that when used for security devices it does not linger when left unconfirmed. Thanks to [Jan Schneider](https://github.com/j-a-n) for the contribution. Known bug for devices not supporting [`WatchUi.getCurrentView()`](https://developer.garmin.com/connect-iq/api-docs/Toybox/WatchUi.html#getCurrentView-instance_function) API call which is only available on API Level 3.4.0, e.g. Vivoactive 4S. |
|
||||
| 2.0 | A significant code base change to enable both a 'widget' version for older devices, e.g. Venu (1), and an application with a glance, e.g. Venu2. These two versions must now be distributed under separate application IDs, but they have the same code base. A further 20 more devices are now supported, the settings have been internationalised, and there's a bug fix for older devices when trying to display a helpful error message but instead the application crashed. This version has come from a significant collaboration with [Someone0nEarth](https://github.com/Someone0nEarth). |
|
||||
| 2.1 | Deployment of an idea to provide Home Assistant with access to the watch battery level. Using this requires [significant setup](BatteryReporting.md) on the Home Assistant configuration and hence is detailed separately. Due to this, the default state for this battery option is _off_. Changed the application settings user interface to be more intuitive, and hence amended the way settings are managed in the background. |
|
||||
| 2.2 | Adds a feature to cache the menu configuration and save the time taken for an HTTP request to fetch it. You as the user are responsible for managing the cache by clearing it when you update your configuration. Improvement to widget root display updates. Bug fix for battery level reporting when in the glance carousel. Fixed an uninternationalised string, "Execute". Unfixed issue with battery level updates when the user is not an administrator. |
|
||||
| 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! |
|
||||
|
||||
## 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 (compare with 124 kB for applications) and 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.
|
||||
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. 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. 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. 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. Based on a lead from user @Petucky, both devices are being re-enabled as testing on a real Edge 840 device has proven successful, however we remain unable to support either devices until the simulator is fixed.
|
||||
|
||||
7. We are unable to support HTTP without HTTPS. This is a limitation placed upon us by the Connect IQ API which for security reasons refuses to work with HTTP requests. There is nothing developers can do about this limitation. You will have to put an HTTPS proxy in front of your local Home Assistant to work with this application. See the [Trouble Shooting](TroubleShooting.md#do-it-yourself-setup) guide for an example setup. We would appreciate it if users did not leave poor reviews for the lack of this feature which is beyond our control to fix.
|
||||
|
@ -1,5 +1,22 @@
|
||||
[Home](README.md) | [Switches](examples/Switches.md) | [Actions](examples/Actions.md) | [Templates](examples/Templates.md) | [Background Service](BackgroundService.md) | Trouble Shooting | [Version History](HISTORY.md)
|
||||
|
||||
# Troubleshooting Guides
|
||||
|
||||
## Check your JSON Schema
|
||||
|
||||
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 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
|
||||
|
||||
With either of the following setups, there are inevitably some problems along the way. GarminHomeAssistant is careful to rely only on having working URLs. Getting them working is the user's responsibility. However, we have developed some fault finding tools.
|
||||
@ -26,7 +43,7 @@ Now you have to manage:
|
||||
- Dynamic DNS
|
||||
- Public access via router port forwarding
|
||||
- Security via HTTPS and URL forwarding
|
||||
- Certificates for HTTPS via say [Let's Encrypt](https://letsencrypt.org/) (Nginx web server helps here)
|
||||
- Certificates for HTTPS via say [Let's Encrypt](https://letsencrypt.org/) (an Nginx proxy web server helps here)
|
||||
- Proxy allow list in `configuration.yaml` as follows:
|
||||
|
||||
```yaml
|
||||
@ -34,10 +51,10 @@ http:
|
||||
use_x_forwarded_for: true
|
||||
trusted_proxies:
|
||||
- 127.0.0.1
|
||||
- 192.168.xx.xx # Server IP - AMEND THIS
|
||||
- 192.168.xx.xx # Server IP - AMEND THIS
|
||||
- 172.30.32.0/23 # Docker IPs for NGINX
|
||||
- 172.30.33.0/24 # SSL proxy server
|
||||
- 172.16.0.0/12 #
|
||||
- 172.16.0.0/12 #
|
||||
```
|
||||
|
||||
### Menu Configuration URL
|
3
_config.yml
Normal file
@ -0,0 +1,3 @@
|
||||
exclude:
|
||||
- examples
|
||||
- source
|
@ -27,9 +27,10 @@ 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
|
||||
|
||||
rem Device for simulation
|
||||
rem set DEVICE=venu2
|
||||
set DEVICE=vivoactive3
|
||||
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>]
|
||||
@ -98,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.jungle ^
|
||||
--jungles %SRC%\%JUNGLE% ^
|
||||
--private-key %SRC%\..\developer_key ^
|
||||
--device %DEVICE%_sim ^
|
||||
--warn ^
|
||||
|
@ -8,9 +8,12 @@
|
||||
"items": {
|
||||
"$ref": "#/$defs/items"
|
||||
},
|
||||
"required": ["title", "items"],
|
||||
"additionalProperties": false
|
||||
"$schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["title", "items"],
|
||||
"additionalProperties": false,
|
||||
"$defs": {
|
||||
"toggle": {
|
||||
"type": "object",
|
||||
@ -41,30 +44,60 @@
|
||||
"additionalProperties": false
|
||||
},
|
||||
"template": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"entity": {
|
||||
"$ref": "#/$defs/entity"
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"entity": {
|
||||
"$ref": "#/$defs/entity",
|
||||
"deprecated": true,
|
||||
"title": "Schema change:",
|
||||
"description": "Use 'tap_action' instead to mirror Home Assistant."
|
||||
},
|
||||
"name": {
|
||||
"title": "Your familiar name",
|
||||
"type": "string"
|
||||
},
|
||||
"content": {
|
||||
"title": "What to display (template)",
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"title": "Menu item type",
|
||||
"description": "One of 'tap', 'template', 'toggle' or 'group'.",
|
||||
"const": "template"
|
||||
}
|
||||
},
|
||||
"required": ["name", "content", "type"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"name": {
|
||||
"title": "Your familiar name",
|
||||
"type": "string"
|
||||
},
|
||||
"content": {
|
||||
"title": "What to display (template)",
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"title": "Menu item type",
|
||||
"description": "One of 'tap', 'template', 'toggle' or 'group'.",
|
||||
"const": "template"
|
||||
},
|
||||
"tap_action": {
|
||||
"$ref": "#/$defs/tap_action"
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"entity": {
|
||||
"$ref": "#/$defs/entity"
|
||||
},
|
||||
"name": {
|
||||
"title": "Your familiar name",
|
||||
"type": "string"
|
||||
},
|
||||
"content": {
|
||||
"title": "What to display (template)",
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"title": "Menu item type",
|
||||
"description": "One of 'tap', 'template', 'toggle' or 'group'.",
|
||||
"const": "template"
|
||||
},
|
||||
"tap_action": {
|
||||
"$ref": "#/$defs/tap_action"
|
||||
}
|
||||
},
|
||||
"required": ["name", "content", "type", "tap_action"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["name", "content", "type"],
|
||||
"additionalProperties": false
|
||||
]
|
||||
},
|
||||
"tap": {
|
||||
"type": "object",
|
||||
@ -106,15 +139,17 @@
|
||||
"properties": {
|
||||
"entity": {
|
||||
"$ref": "#/$defs/entity",
|
||||
"type": "string",
|
||||
"deprecated": true,
|
||||
"title": "Schema change:",
|
||||
"description": "'entity' is no longer necessary and should be removed."
|
||||
"description": "'entity' is no longer necessary and should now be removed."
|
||||
},
|
||||
"name": {
|
||||
"title": "Your familiar name",
|
||||
"title": "Menu item's familiar name.",
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"title": "Sub menu's title once displayed.",
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
@ -131,6 +166,7 @@
|
||||
},
|
||||
"items": {
|
||||
"type": "array",
|
||||
"maxItems": 16,
|
||||
"items": {
|
||||
"oneOf": [
|
||||
{
|
||||
@ -149,23 +185,29 @@
|
||||
}
|
||||
},
|
||||
"entity": {
|
||||
"title": "Home Assistant entity name",
|
||||
"type": "string",
|
||||
"title": "Home Assistant entity name",
|
||||
"pattern": "^[^.]+\\.[^.]+$"
|
||||
},
|
||||
"service": {
|
||||
"type": "string",
|
||||
"title": "Home Assistant service name",
|
||||
"pattern": "^[^.]+\\.[^.]+$"
|
||||
},
|
||||
"tap_action": {
|
||||
"type": "object",
|
||||
"title": "Action",
|
||||
"description": "'confirm' field is optional.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"service": {
|
||||
"$ref": "#/$defs/entity"
|
||||
"$ref": "#/$defs/service"
|
||||
},
|
||||
"confirm": {
|
||||
"$ref": "#/$defs/confirm"
|
||||
},
|
||||
"data": {
|
||||
"type": "object",
|
||||
"title": "Your services's parameters",
|
||||
"description": "The object containing the parameters and their values to be passed to the entity. No schema checking can be done here, you are on your own! On application crash, remove the parameters."
|
||||
}
|
||||
},
|
||||
@ -174,7 +216,8 @@
|
||||
"confirm": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Confirm the action before execution as a precaution."
|
||||
"title": "Confirmation",
|
||||
"description": "Optional confirmation of the action before execution as a precaution."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
56
examples/Actions.md
Normal file
@ -0,0 +1,56 @@
|
||||
[Home](../README.md) | [Switches](Switches.md) | Actions | [Templates](Templates.md) | [Background Service](../BackgroundService.md) | [Trouble Shooting](../TroubleShooting.md) | [Version History](../HISTORY.md)
|
||||
|
||||
# Actions
|
||||
|
||||
A simple example using a scene as a `tap`` menu item.
|
||||
|
||||
```json
|
||||
{
|
||||
"entity": "scene.telly_watching",
|
||||
"name": "Telly Scene",
|
||||
"type": "tap",
|
||||
"tap_action": {
|
||||
"service": "scene.turn_on"
|
||||
}
|
||||
},
|
||||
```
|
||||
|
||||
Any menu item with an action (`tap`, `template`, or `toggle`), may have a confirmation view added. For consistency this is always done via the `tap_action` JSON object, even though for a `toggle` menu item there will only ever be a single field inside. For the `toggle` menu item, the confirmation is presented on both `on` and `off` directions. There is no option for asymmetry, i.e. only in one direction.
|
||||
|
||||
```json
|
||||
"tap_action": {
|
||||
"confirm": true
|
||||
}
|
||||
```
|
||||
|
||||
<img src="../images/confirmation_view.png" width="200" title="Confirmation View"/>
|
||||
|
||||
For example:
|
||||
|
||||
```json
|
||||
{
|
||||
"entity": "switch.garage_door",
|
||||
"name": "Garage Door",
|
||||
"type": "toggle",
|
||||
"tap_action": {
|
||||
"confirm": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Note that for notify events, you _must_ not supply an `entity_id` or the API call will fail. There are other examples too.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "Message",
|
||||
"type": "tap",
|
||||
"tap_action": {
|
||||
"service": "notify.mobile_app_on_phone",
|
||||
"data": {
|
||||
"title": "This is a title",
|
||||
"message": "This is the message"
|
||||
},
|
||||
"confirm": true
|
||||
}
|
||||
}
|
||||
```
|
73
examples/Switches.md
Normal file
@ -0,0 +1,73 @@
|
||||
[Home](../README.md) | Switches | [Actions](Actions.md) | [Templates](Templates.md) | [Background Service](../BackgroundService.md) | [Trouble Shooting](../TroubleShooting.md) | [Version History](../HISTORY.md)
|
||||
|
||||
# Switches
|
||||
|
||||
This is the simplest form:
|
||||
|
||||
```json
|
||||
{
|
||||
"entity": "light.bedside_light_switch",
|
||||
"name": "Bedroom Light",
|
||||
"type": "toggle"
|
||||
},
|
||||
```
|
||||
|
||||
To support a non-standard light, switch, or automation as a toggle menu item you may like to define a custom switch. In order to facilitate custom switches at this time, you must create a template switch in HomeAssistant.
|
||||
|
||||
```yaml
|
||||
switch:
|
||||
- platform: template
|
||||
switches:
|
||||
<switch-name>:
|
||||
friendly_name: <name>
|
||||
value_template: <value>
|
||||
turn_on:
|
||||
service: <service>
|
||||
data:
|
||||
entity_id: <entity>
|
||||
<attribute>: <value>
|
||||
turn_off:
|
||||
service: <service>
|
||||
data:
|
||||
entity_id: <entity>
|
||||
<attribute>: <value>
|
||||
```
|
||||
|
||||
Then you can use the following in your config:
|
||||
|
||||
```json
|
||||
{
|
||||
"entity": "switch.<switch-name>",
|
||||
"name": "<name>",
|
||||
"type": "toggle"
|
||||
}
|
||||
```
|
||||
|
||||
## Example - Covers
|
||||
|
||||
```yaml
|
||||
switch:
|
||||
- platform: template
|
||||
switches:
|
||||
cover:
|
||||
friendly_name: Cover
|
||||
value_template: "{{ is_state('cover.cover', 'open') }}"
|
||||
turn_on:
|
||||
service: cover.open_cover
|
||||
data:
|
||||
entity_id: cover.cover
|
||||
turn_off:
|
||||
service: cover.close_cover
|
||||
data:
|
||||
entity_id: cover.cover
|
||||
```
|
||||
|
||||
Then you can use the following in your config:
|
||||
|
||||
```json
|
||||
{
|
||||
"entity": "switch.cover",
|
||||
"name": "Cover",
|
||||
"type": "toggle"
|
||||
}
|
||||
```
|
190
examples/Templates.md
Normal file
@ -0,0 +1,190 @@
|
||||
[Home](../README.md) | [Switches](Switches.md) | [Actions](Actions.md) | Templates | [Background Service](../BackgroundService.md) | [Trouble Shooting](../TroubleShooting.md) | [Version History](../HISTORY.md)
|
||||
|
||||
# Templates
|
||||
|
||||
In order to provide the most functionality possible the content of the menu item comes from a user-defined template (i.e. you generate your own text). This allows you to do some pretty cool things. It also makes the configuration a bit more complicated. This page will help you understand how to use templates.
|
||||
|
||||
- In this file anything between `<` and `>` is a placeholder. Replace it with the appropriate value.
|
||||
- [Jinja2](https://palletsprojects.com/p/jinja/) syntax is used by Home Assistant [Templates](https://www.home-assistant.io/docs/configuration/templating/). Templates are used to dynamically insert values into the content. The syntax includes:
|
||||
- `{%` ... `%}` for Statements
|
||||
- `{{` ... `}}` for Expressions to print to the template output
|
||||
- `{#` ... `#}` for Comments not included in the template output
|
||||
|
||||
## States
|
||||
|
||||
In this example we get the battery level of the device and add the percent sign. *Very simple*
|
||||
|
||||
```json
|
||||
{
|
||||
"entity": "sensor.<device>_battery_level",
|
||||
"name": "Phone",
|
||||
"type": "template",
|
||||
"content": "{{ states('sensor.<device>_battery_level') }}%"
|
||||
}
|
||||
```
|
||||
|
||||
### Examples
|
||||
|
||||
The first two keep to the simple proposal above. The last combines them into a single menu item. Now you can start to see the utility of this menu item, composing your own formatted text.
|
||||
|
||||
```json
|
||||
{
|
||||
"entity": "sensor.hallway_temperature",
|
||||
"name": "Hall Temp",
|
||||
"type": "template",
|
||||
"content": "{{ states('sensor.hallway_temperature') }}°C"
|
||||
},
|
||||
{
|
||||
"entity": "sensor.hallway_humidity",
|
||||
"name": "Hall Humidity",
|
||||
"type": "template",
|
||||
"content": "{{ states('sensor.hallway_humidity') }}%"
|
||||
},
|
||||
{
|
||||
"entity": "sensor.hallway_temperature",
|
||||
"name": "Hallway",
|
||||
"type": "template",
|
||||
"content": "{{ states('sensor.hallway_temperature') }}°C {{ states('sensor.hallway_humidity') }}%"
|
||||
}
|
||||
```
|
||||
|
||||
In order to keep the formatting of floating point numbers under control, you might also like to include a format string as follows. `states()` seems to return a `string` that needs converting to a `float` before the `format()` call can manage the conversion to the required number fo decimal places.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "Hallway",
|
||||
"type": "template",
|
||||
"content": "T:{{ '%.1f' | format(states('sensor.hallway_temperature') | float) }}°C, H:{{ '%.1f' | format(states('sensor.hallway_humidity') | float) }}%"
|
||||
},
|
||||
```
|
||||
|
||||
Where your device supports unicode characters these example may work.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "Charge",
|
||||
"type": "template",
|
||||
"content": "☎ {{ states('sensor.my_phone_battery_level') }}%{% if is_state('binary_sensor.my_phone_is_charging', 'on') %}⚡{% endif %}, ⏳ {{ '%.0f'|format(states('sensor.my_watch_battery_level') | float) }}%{% if is_state('binary_binary_sensor.my_watch_battery_is_charging', 'on') %}⚡{% endif %}"
|
||||
},
|
||||
{
|
||||
"name": "Hallway",
|
||||
"type": "template",
|
||||
"content": "🌡{% if is_state('sensor.hallway_temperature', 'unavailable') %}-{% else %}{{ '%.1f'|format(states('sensor.hallway_temperature')|float) }}°C{% if is_state_attr('climate.hallway', 'hvac_action', 'heating') or is_state_attr('climate.hallway', 'hvac_action', 'preheating') -%}🔥{%- endif %}{% endif %}, 💧{% if is_state('sensor.hallway_humidity', 'unavailable') %}-{% else %}{{ '%.1f'|format(states('sensor.hallway_humidity')|float) }}%{% endif %}"
|
||||
}
|
||||
```
|
||||
|
||||

|
||||
|
||||
## Conditionals
|
||||
|
||||
Anything between `{%` and `%}` is a directive (`if`, `else`, `elif`, `endif`, etc.). Conditionals are used to dynamically change the content based on the state of the entity.
|
||||
|
||||
In this example we get the battery level of the device and add the percent sign. If the device is charging we add a plus sign.
|
||||
|
||||
```json
|
||||
{
|
||||
"entity": "sensor.<device>_battery_level",
|
||||
"name": "Phone",
|
||||
"type": "template",
|
||||
"content": "{{ states('sensor.<device>_battery_level') }}%{% if is_state('binary_sensor.<device>_is_charging', 'on') %}+{% endif %}"
|
||||
}
|
||||
```
|
||||
|
||||
Here we also use the else clause as well to give proper text instead of just `on` or `off`.
|
||||
|
||||
```json
|
||||
{
|
||||
"entity": "binary_sensor.garage_doors",
|
||||
"name": "Garage Doors",
|
||||
"type": "template",
|
||||
"content": "{% if is_state('binary_sensor.<door-0>', 'on') %}Open{% else %}Closed{% endif %} {% if is_state('binary_sensor.<door-1>', 'on') %}Open{% else %}Closed{% endif %}"
|
||||
}
|
||||
```
|
||||
|
||||
## Advanced
|
||||
|
||||
Here we generate a bar graph of the battery level. We use the following steps to do this:
|
||||
|
||||
- Convert the state to a number.
|
||||
- Divide by 100 to get a fraction.
|
||||
- Multiply by the width to get the number of `#`s.
|
||||
- Multiply by the `#` char to make a string.
|
||||
- Subtract the width from the number of `#`s to get the number of `_`s.
|
||||
- Multiply by the `_` char to make a string.
|
||||
|
||||
```json
|
||||
{
|
||||
"entity": "sensor.<device>_battery_level",
|
||||
"name": "Phone",
|
||||
"type": "template",
|
||||
"content": "{{ states('sensor.<device>_battery_level') }}%{% if is_state('binary_sensor.<device>_is_charging', 'on') %}+{% endif %} {{ '#' * (((states('sensor.<device>_battery_level') | int) / 100 * <width>) | int) }}{{ '_' * (<width> - (((states('sensor.<device>_battery_level') | int) / 100 * <width>) | int)) }}"
|
||||
}
|
||||
```
|
||||
|
||||
An example of a dimmer light with 4 brightness settings 0..3. Here our light worked on a percentage, so that had to be converted to the range 0..3.
|
||||
|
||||
```json
|
||||
{
|
||||
"$schema": "./schema.json",
|
||||
"title": "Home",
|
||||
"items": [
|
||||
{
|
||||
"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) | 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) | round(0)) | int }}%{% else %}Off{% endif %}",
|
||||
"tap_action": {
|
||||
"service": "light.turn_on",
|
||||
"data": {
|
||||
"brightness_pct": 12
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"entity": "light.green_house",
|
||||
"name": "LEDs 1",
|
||||
"type": "tap",
|
||||
"tap_action": {
|
||||
"service": "light.turn_on",
|
||||
"data": {
|
||||
"brightness_pct": 37
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"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) | round(0)) | int }}%{% else %}Off{% endif %}",
|
||||
"tap_action": {
|
||||
"service": "light.turn_on",
|
||||
"data": {
|
||||
"brightness_pct": 62
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"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) | round(0))| int }}%{% else %}Off{% endif %}",
|
||||
"tap_action": {
|
||||
"service": "light.turn_on",
|
||||
"data": {
|
||||
"brightness_pct": 87
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Warnings
|
||||
|
||||
Just remember, **you have the ability to crash the application by creating an excessive menu definition**. Templates can require significant definition for highly customised text. Don't be silly.
|
35
export.cmd
@ -21,12 +21,13 @@ rem
|
||||
rem -----------------------------------------------------------------------------------
|
||||
|
||||
rem Check this path is correct for your Java installation
|
||||
set JAVA_PATH=C:\Program Files (x86)\Common Files\Oracle\Java\javapath
|
||||
set JAVA_PATH=C:\Program Files\Java\jdk-22\bin
|
||||
rem SDK_PATH should work for all users
|
||||
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
|
||||
|
Before Width: | Height: | Size: 806 KiB After Width: | Height: | Size: 697 KiB |
BIN
images/Unicode_Template.png
Normal file
After Width: | Height: | Size: 9.7 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 2.7 KiB |
BIN
images/app_crash.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
images/toggle_icon.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -1,195 +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: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>
|
218
manifest.xml
@ -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:
|
||||
@ -40,115 +37,122 @@
|
||||
"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: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="descentmk343mm"/>
|
||||
<iq:product id="descentmk351mm"/>
|
||||
<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="edge540" />
|
||||
<iq:product id="edge820" />
|
||||
<iq:product id="edge830" />
|
||||
<iq:product id="edge840" />
|
||||
<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="fr165"/>
|
||||
<iq:product id="fr165m"/>
|
||||
<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="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
|
||||
@ -196,6 +200,6 @@
|
||||
Use "Monkey C: Configure Monkey Barrel" from the Visual Studio Code
|
||||
command palette to edit the included barrels.
|
||||
-->
|
||||
<iq:barrels/>
|
||||
<iq:barrels />
|
||||
</iq:application>
|
||||
</iq:manifest>
|
@ -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
|
@ -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/
|
||||
@ -59,6 +54,10 @@ descentg1.resourcePath = $(descentg1.resourcePath);resources-launcher-62-62;reso
|
||||
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 390 x 390 launcher icon size 60x60
|
||||
descentmk343mm.resourcePath = $(descentmk2s.resourcePath);resources-launcher-60-60;resources-icons-46
|
||||
# Screen Size 454 x 454 launcher icon size 60x60
|
||||
descentmk351mm.resourcePath = $(descentmk2s.resourcePath);resources-launcher-60-60;resources-icons-53
|
||||
# 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
|
||||
@ -69,10 +68,12 @@ edge1040.resourcePath = $(edge1040.resourcePath);resources-launcher-40-40;resour
|
||||
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
|
||||
edge540.resourcePath = $(edge540.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
|
||||
edge840.resourcePath = $(edge840.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
|
||||
@ -118,6 +119,10 @@ fenix7x.resourcePath = $(fenix7x.resourcePath);resources-launcher-40-40;resource
|
||||
# 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 390 x 390 launcher icon size 54x54
|
||||
fr165.resourcePath = $(descentmk2s.resourcePath);resources-launcher-54-54;resources-icons-46
|
||||
# Screen Size 390 x 390 launcher icon size 54x54
|
||||
fr165m.resourcePath = $(descentmk2s.resourcePath);resources-launcher-54-54;resources-icons-46
|
||||
# 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
|
||||
|
@ -50,21 +50,16 @@
|
||||
<string id="SettingsApiUrl">عنوان URL لواجهة برمجة تطبيقات HomeAssistant.</string>
|
||||
<string id="SettingsConfigUrl">عنوان URL لتكوين القائمة (JSON).</string>
|
||||
<string id="SettingsCacheConfig">هل يجب على التطبيق تخزين تكوين القائمة مؤقتًا؟</string>
|
||||
<string id="SettingsClearCache">يجب أن يقوم التطبيق بمسح ذاكرة التخزين المؤقت الموجودة في المرة القادمة
|
||||
بدأت؟</string>
|
||||
<string id="SettingsAppTimeout">المهلة بالثواني. الخروج من التطبيق بعد هذه الفترة
|
||||
عدم النشاط لحفظ بطارية الجهاز.</string>
|
||||
<string id="SettingsConfirmTimeout">بعد هذا الوقت (بالثواني)، يظهر مربع حوار تأكيد لـ
|
||||
يتم إغلاق الإجراء تلقائيًا ويتم إلغاء الإجراء. اضبط على 0 لتعطيل المهلة.</string>
|
||||
<string id="SettingsClearCache">هل يجب على التطبيق مسح ذاكرة التخزين المؤقت الموجودة في المرة القادمة التي يتم فيها تشغيله؟</string>
|
||||
<string id="SettingsVibration">هل يجب أن يقدم التطبيق تعليقات عبر الاهتزازات؟</string>
|
||||
<string id="SettingsAppTimeout">المهلة بالثواني. قم بالخروج من التطبيق بعد هذه الفترة من عدم النشاط لحفظ بطارية الجهاز.</string>
|
||||
<string id="SettingsPollDelay">تأخير الاستقصاء الإضافي (بالثواني). يضيف تأخيرًا بين تحديثات الحالة لجميع عناصر القائمة.</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">تمكين خدمة الخلفية لإرسال بطارية الساعة
|
||||
المستوى إلى مساعد المنزل.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">معدل التحديث (بالدقائق) الذي الخلفية
|
||||
يجب أن تكرر الخدمة إرسال مستوى البطارية.</string>
|
||||
<string id="WebhookId">(للقراءة فقط) معرف Webhook الذي أنشأته الساعة لتحديثات مستوى البطارية.
|
||||
قد تحتاج إلى هذا لتصحيح الأخطاء.</string>
|
||||
<string id="SettingsWidgetStart">(القطعة فقط) قم بتشغيل التطبيق تلقائيًا من الأداة دون انتظار نقرة واحدة.</string>
|
||||
<string id="SettingsEnableBatteryLevel">قم بتمكين خدمة الخلفية لإرسال مستوى بطارية الجهاز والموقع وبيانات النشاط (إذا كانت مدعومة) إلى Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">معدل التحديث (بالدقائق) الذي يجب أن تكرر فيه خدمة الخلفية إرسال البيانات.</string>
|
||||
<string id="WebhookId">(للقراءة فقط) معرف Webhook الذي أنشأه الجهاز لتحديثات الخدمة في الخلفية. قد تحتاج إلى هذا لتصحيح الأخطاء.</string>
|
||||
</strings>
|
||||
|
@ -50,21 +50,16 @@
|
||||
<string id="SettingsApiUrl">URL адрес за API на HomeAssistant.</string>
|
||||
<string id="SettingsConfigUrl">URL за конфигурация на менюто (JSON).</string>
|
||||
<string id="SettingsCacheConfig">Трябва ли приложението да кешира конфигурацията на менюто?</string>
|
||||
<string id="SettingsClearCache">Трябва ли приложението да изчисти съществуващия кеш следващия път, когато е
|
||||
започна?</string>
|
||||
<string id="SettingsAppTimeout">Изчакване в секунди. Излезте от приложението след този период от
|
||||
бездействие, за да запазите батерията на устройството.</string>
|
||||
<string id="SettingsConfirmTimeout">След това време (в секунди) се появява диалогов прозорец за потвърждение за an
|
||||
действието се затваря автоматично и действието се отменя. Задайте 0, за да деактивирате изчакването.</string>
|
||||
<string id="SettingsClearCache">Трябва ли приложението да изчисти съществуващия кеш при следващото стартиране?</string>
|
||||
<string id="SettingsVibration">Трябва ли приложението да дава обратна връзка чрез вибрации?</string>
|
||||
<string id="SettingsAppTimeout">Изчакване в секунди. Излезте от приложението след този период на неактивност, за да запазите батерията на устройството.</string>
|
||||
<string id="SettingsPollDelay">Допълнително забавяне на анкетата (в секунди). Добавя забавяне между актуализацията на състоянието на всички елементи от менюто.</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">Активирайте фоновата услуга, за да изпратите батерията на часовника
|
||||
ниво до домашен асистент.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Честотата на опресняване (в минути), с която фонът
|
||||
услугата трябва да повтори изпращането на нивото на батерията.</string>
|
||||
<string id="WebhookId">(Само за четене) ID на Webhook, създаден от часовника за актуализации на нивото на батерията.
|
||||
Може да ви е необходимо това за отстраняване на грешки.</string>
|
||||
<string id="SettingsWidgetStart">(Само за джаджа) Автоматично стартирайте приложението от джаджата, без да чакате докосване.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Активирайте услугата на заден план, за да изпраща данни за нивото на батерията на устройството, местоположението и (ако се поддържа) за дейността до Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Честотата на опресняване (в минути), с която фоновата услуга трябва да повтори изпращането на данни.</string>
|
||||
<string id="WebhookId">(Само за четене) Идентификационният номер на Webhook, създаден от устройството за актуализации на фонови услуги. Може да ви е необходимо това за отстраняване на грешки.</string>
|
||||
</strings>
|
||||
|
24
resources-ces/strings/corrections.xml
Normal file
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
|
||||
Distributed under MIT Licence
|
||||
See https://github.com/house-of-abbey/GarminHomeAssistantWidget/blob/main/LICENSE.
|
||||
|
||||
|
||||
GarminHomeAssistantWidget is a Garmin IQ widget written in Monkey C. The source code is provided at:
|
||||
https://github.com/house-of-abbey/GarminHomeAssistantWidget.
|
||||
|
||||
P A Abbey & J D Abbey & Someone0nEarth, 15 April 2024
|
||||
|
||||
-->
|
||||
|
||||
<!--
|
||||
Corrections for the Czech language
|
||||
Opravy pro český jazyk
|
||||
-->
|
||||
|
||||
<strings>
|
||||
<string id="Confirm">Určitě?</string>
|
||||
<string id="Available">Dostupné</string>
|
||||
<string id="GlanceMenu">Menu</string>
|
||||
</strings>
|
@ -20,28 +20,28 @@
|
||||
|
||||
<strings>
|
||||
<string id="AppName" scope="glance">HomeAssistant</string>
|
||||
<string id="Confirm">Tak určitě?</string>
|
||||
<string id="Confirm">Určitě?</string>
|
||||
<string id="Executed" scope="glance">Potvrzeno</string>
|
||||
<string id="NoPhone" scope="glance">Žádné telefonní spojení</string>
|
||||
<string id="NoInternet">Žádné internetové připojení</string>
|
||||
<string id="NoResponse">Žádná odpověď, zkontrolujte připojení k internetu</string>
|
||||
<string id="NoAPIKey" scope="glance">V nastavení aplikace není žádný klíč API</string>
|
||||
<string id="NoAPIKey" scope="glance">V nastavení aplikace není klíč API</string>
|
||||
<string id="NoApiUrl" scope="glance">V nastavení aplikace není žádná adresa URL API</string>
|
||||
<string id="NoConfigUrl" scope="glance">V nastavení aplikace není žádná konfigurační URL</string>
|
||||
<string id="ApiFlood">Příliš rychlá volání API. Zpomalte prosím své požadavky.</string>
|
||||
<string id="ApiUrlNotFound">Adresa URL nenalezena. Potenciální chyba adresy URL rozhraní API v nastavení.</string>
|
||||
<string id="ConfigUrlNotFound">Adresa URL nenalezena. Potenciální chyba konfigurační adresy URL v nastavení.</string>
|
||||
<string id="ApiUrlNotFound">Adresa URL nebyla nalezena. Potenciální chyba adresy URL rozhraní API v nastavení.</string>
|
||||
<string id="ConfigUrlNotFound">Adresa URL nebyla nalezena. Potenciální chyba konfigurační adresy URL v nastavení.</string>
|
||||
<string id="NoJson">Z požadavku HTTP se nevrátil žádný JSON.</string>
|
||||
<string id="UnhandledHttpErr">Požadavek HTTP vrátil kód chyby =</string>
|
||||
<string id="TrailingSlashErr">Adresa URL rozhraní API nesmí mít koncové lomítko „/“</string>
|
||||
<string id="WebhookFailed">Registrace Webhooku se nezdařila</string>
|
||||
<string id="TemplateError">Vykreslení šablony se nezdařilo</string>
|
||||
<string id="Available" scope="glance">Dostupný</string>
|
||||
<string id="Available" scope="glance">Dostupné</string>
|
||||
<string id="Checking" scope="glance">Kontrola...</string>
|
||||
<string id="Unavailable" scope="glance">Není k dispozici</string>
|
||||
<string id="Unconfigured" scope="glance">Nenakonfigurováno</string>
|
||||
<string id="Cached" scope="glance">Uloženo do mezipaměti</string>
|
||||
<string id="GlanceMenu" scope="glance">Jídelní lístek</string>
|
||||
<string id="GlanceMenu" scope="glance">Menu</string>
|
||||
<string id="Memory" scope="glance">Paměť</string>
|
||||
<!-- Pro nastavení GUI -->
|
||||
<string id="SettingsSelect">Vybrat...</string>
|
||||
@ -50,21 +50,16 @@
|
||||
<string id="SettingsApiUrl">URL pro HomeAssistant API.</string>
|
||||
<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říště vymazat stávající mezipaměť
|
||||
začal?</string>
|
||||
<string id="SettingsAppTimeout">Časový limit v sekundách. Po uplynutí této doby aplikaci ukončete
|
||||
nečinnosti, aby se šetřila baterie zařízení.</string>
|
||||
<string id="SettingsConfirmTimeout">Po uplynutí této doby (v sekundách) se zobrazí potvrzovací dialog pro
|
||||
akce se automaticky zavře a akce se zruší. Nastavením na 0 deaktivujete časový limit.</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="SettingsPollDelay">Dodatečné zpoždění dotazování (v sekundách). Přidá prodlevu mezi aktualizací stavu všech položek nabídky.</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 spustit aplikaci z widgetu
|
||||
bez čekání na klepnutí.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Povolte službu na pozadí pro odeslání baterie hodin
|
||||
úroveň na Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Obnovovací frekvence (v minutách), při které je pozadí
|
||||
servis by měl zopakovat odeslání stavu baterie.</string>
|
||||
<string id="WebhookId">(Pouze pro čtení) ID webhooku vytvořené hodinkami pro aktualizace úrovně baterie.
|
||||
Možná to budete potřebovat pro ladění.</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="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>
|
||||
|
@ -50,21 +50,16 @@
|
||||
<string id="SettingsApiUrl">URL til HomeAssistant API.</string>
|
||||
<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
|
||||
startede?</string>
|
||||
<string id="SettingsAppTimeout">Timeout i sekunder. Afslut ansøgningen efter denne periode på
|
||||
inaktivitet for at spare enhedens batteri.</string>
|
||||
<string id="SettingsConfirmTimeout">Efter dette tidspunkt (i sekunder) vises en bekræftelsesdialog for en
|
||||
handlingen lukkes automatisk, og handlingen annulleres. Indstil til 0 for at deaktivere timeout.</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="SettingsPollDelay">Yderligere afstemningsforsinkelse (i sekunder). Tilføjer en forsinkelse mellem statusopdatering af alle menupunkter.</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>
|
||||
<string id="LeftToRight">Venstre til højre</string>
|
||||
<string id="RightToLeft">Højre til venstre</string>
|
||||
<string id="SettingsWidgetStart">(Kun widget) Start automatisk programmet fra widgetten
|
||||
uden at vente på et tryk.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Aktiver baggrundstjenesten for at sende urets batteri
|
||||
niveau til Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Opdateringshastigheden (i minutter), som baggrunden
|
||||
tjenesten skal gentage afsendelsen af batteriniveauet.</string>
|
||||
<string id="WebhookId">(Skrivebeskyttet) Webhook-id'et oprettet af uret til opdateringer af batteriniveau.
|
||||
Du kan kræve dette til fejlretning.</string>
|
||||
<string id="SettingsWidgetStart">(Kun widget) Start automatisk applikationen fra widgetten uden at vente på et tryk.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Aktiver baggrundstjenesten for at sende enhedens batteriniveau, placering og (hvis understøttet) aktivitetsdata til Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Opdateringshastigheden (i minutter), hvormed baggrundstjenesten skal gentage afsendelse af data.</string>
|
||||
<string id="WebhookId">(Skrivebeskyttet) Webhook-id'et oprettet af enheden til baggrundstjenesteopdateringer. Du kan kræve dette til fejlretning.</string>
|
||||
</strings>
|
||||
|
@ -20,4 +20,29 @@
|
||||
|
||||
<strings>
|
||||
<string id="UnhandledHttpErr">Die HTTP-Anfrage gab folgenden Fehlercode zurück = </string>
|
||||
|
||||
<string id="ConfigUrlNotFound">URL nicht gefunden. Möglicherweise falsche Konfigurations-URL in den Einstellungen.</string>
|
||||
<string id="TemplateError">Template konnte nicht gerendert werden</string>
|
||||
<string id="Available" scope="glance">OK</string>
|
||||
<string id="Checking" scope="glance">Prüfe...</string>
|
||||
<string id="Unconfigured" scope="glance">Nicht konfiguriert</string>
|
||||
<string id="Cached" scope="glance">gecacht</string>
|
||||
<string id="GlanceMenu" scope="glance">Menü</string>
|
||||
<string id="Memory" scope="glance">Speicher</string>
|
||||
|
||||
<!-- Für die Einstellungs-GUI -->
|
||||
<string id="SettingsApiUrl">URL der HomeAssistant-API.</string>
|
||||
<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="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
|
||||
Aktion abgebrochen. Auf 0 setzen, um den Timeout zu deaktivieren.</string>
|
||||
<string id="SettingsWidgetStart">(Nur Widget) Anwendung automatisch über das Widget starten ohne drauftippen zu müssen.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Hintergrunddienst aktivieren, um den Ladezustand der Batterie an HomeAssistant zu senden.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Die Aktualisierungsrate (in Minuten) mit der der Ladezustand der Batterie
|
||||
an HomeAssistant gesendet wird.</string>
|
||||
<string id="WebhookId">(Schreibgeschützt) Die von der Uhr erstellte Webhook-ID für Aktualisierungen des Ladezustands der Batterie.
|
||||
Möglicherweise wird dies zum Debuggen benötigt.</string>
|
||||
</strings>
|
||||
|
@ -30,41 +30,40 @@
|
||||
<string id="NoConfigUrl" scope="glance">Keine Konfigurations-URL in den Anwendungseinstellungen</string>
|
||||
<string id="ApiFlood">API-Aufrufe zu schnell. Bitte verlangsamen Sie Ihre Anfragen.</string>
|
||||
<string id="ApiUrlNotFound">URL nicht gefunden. Möglicher API-URL-Fehler in den Einstellungen.</string>
|
||||
<string id="ConfigUrlNotFound">URL nicht gefunden. Möglicher Konfigurations-URL-Fehler in den Einstellungen.</string>
|
||||
<string id="ConfigUrlNotFound">URL nicht gefunden. Möglicherweise falsche Konfigurations-URL in den Einstellungen.</string>
|
||||
<string id="NoJson">Von der HTTP-Anfrage wurde kein JSON zurückgegeben.</string>
|
||||
<string id="UnhandledHttpErr">Die HTTP-Anfrage gab folgenden Fehlercode zurück = </string>
|
||||
<string id="TrailingSlashErr">Die API-URL darf keinen abschließenden Schrägstrich „/“ enthalten.</string>
|
||||
<string id="WebhookFailed">Webhook konnte nicht registriert werden</string>
|
||||
<string id="TemplateError">Vorlage konnte nicht gerendert werden</string>
|
||||
<string id="Available" scope="glance">Verfügbar</string>
|
||||
<string id="Checking" scope="glance">Überprüfung...</string>
|
||||
<string id="TemplateError">Template konnte nicht gerendert werden</string>
|
||||
<string id="Available" scope="glance">OK</string>
|
||||
<string id="Checking" scope="glance">Prüfe...</string>
|
||||
<string id="Unavailable" scope="glance">Nicht verfügbar</string>
|
||||
<string id="Unconfigured" scope="glance">Unkonfiguriert</string>
|
||||
<string id="Cached" scope="glance">Zwischengespeichert</string>
|
||||
<string id="GlanceMenu" scope="glance">Speisekarte</string>
|
||||
<string id="Memory" scope="glance">Erinnerung</string>
|
||||
<string id="Unconfigured" scope="glance">Nicht konfiguriert</string>
|
||||
<string id="Cached" scope="glance">gecacht</string>
|
||||
<string id="GlanceMenu" scope="glance">Menü</string>
|
||||
<string id="Memory" scope="glance">Speicher</string>
|
||||
<!-- Für die Einstellungs-GUI -->
|
||||
<string id="SettingsSelect">Wählen...</string>
|
||||
<string id="SettingsApiKey">API-Schlüssel für HomeAssistant.</string>
|
||||
<string id="SettingsApiKeyPrompt">Langlebiges Zugriffstoken.</string>
|
||||
<string id="SettingsApiUrl">URL für die HomeAssistant-API.</string>
|
||||
<string id="SettingsConfigUrl">URL zur Menükonfiguration (JSON).</string>
|
||||
<string id="SettingsCacheConfig">Soll die Anwendung die Menükonfiguration zwischenspeichern?</string>
|
||||
<string id="SettingsClearCache">Sollte die Anwendung beim nächsten Mal den vorhandenen Cache löschen?
|
||||
gestartet?</string>
|
||||
<string id="SettingsAppTimeout">Timeout in Sekunden. Beenden Sie die Anwendung nach Ablauf dieser Frist
|
||||
Inaktivität, um den Akku des Geräts zu schonen.</string>
|
||||
<string id="SettingsConfirmTimeout">Nach dieser Zeit (in Sekunden) erscheint ein Bestätigungsdialog für eine
|
||||
Die Aktion wird automatisch geschlossen und die Aktion abgebrochen. Auf 0 setzen, um das Timeout zu deaktivieren.</string>
|
||||
<string id="SettingsApiUrl">URL der HomeAssistant-API.</string>
|
||||
<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="SettingsPollDelay">Zusätzliche Abfrageverzögerung (in Sekunden). Fügt eine Verzögerung zwischen der Statusaktualisierung aller Menüelemente hinzu.</string>
|
||||
<string id="SettingsConfirmTimeout">Nach dieser Zeit (in Sekunden) wird der Bestätigungsdialog einer Aktion geschlossen und die
|
||||
Aktion abgebrochen. Auf 0 setzen, um den Timeout zu deaktivieren.</string>
|
||||
<string id="SettingsTextAlign">Menüausrichtung links (aus) oder rechts (ein).</string>
|
||||
<string id="LeftToRight">Links nach rechts</string>
|
||||
<string id="RightToLeft">Rechts nach links</string>
|
||||
<string id="SettingsWidgetStart">(Nur Widget) Starten Sie die Anwendung automatisch über das Widget
|
||||
ohne auf einen Fingertipp warten zu müssen.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Aktivieren Sie den Hintergrunddienst, um die Uhrbatterie zu senden
|
||||
Ebene zum Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Die Aktualisierungsrate (in Minuten), mit der der Hintergrund angezeigt wird
|
||||
Der Service sollte das Senden des Batteriestands wiederholen.</string>
|
||||
<string id="WebhookId">(Schreibgeschützt) Die von der Uhr erstellte Webhook-ID für Aktualisierungen des Batteriestands.
|
||||
Möglicherweise benötigen Sie dies zum Debuggen.</string>
|
||||
<string id="SettingsWidgetStart">(Nur Widget) Anwendung automatisch über das Widget starten ohne drauftippen zu müssen.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Hintergrunddienst aktivieren, um den Ladezustand der Batterie an HomeAssistant zu senden.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Die Aktualisierungsrate (in Minuten) mit der der Ladezustand der Batterie
|
||||
an HomeAssistant gesendet wird.</string>
|
||||
<string id="WebhookId">(Schreibgeschützt) Die von der Uhr erstellte Webhook-ID für Aktualisierungen des Ladezustands der Batterie.
|
||||
Möglicherweise wird dies zum Debuggen benötigt.</string>
|
||||
</strings>
|
||||
|
@ -43,28 +43,23 @@
|
||||
<string id="Cached" scope="glance">In cache opgeslagen</string>
|
||||
<string id="GlanceMenu" scope="glance">Menu</string>
|
||||
<string id="Memory" scope="glance">Geheugen</string>
|
||||
<!-- Voor de instellingen GUI -->
|
||||
<!-- Voor de instellingen-GUI -->
|
||||
<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="SettingsConfigUrl">URL voor menuconfiguratie (JSON).</string>
|
||||
<string id="SettingsCacheConfig">Moet de applicatie de menuconfiguratie in de cache opslaan?</string>
|
||||
<string id="SettingsClearCache">Moet de toepassing de volgende keer de bestaande cache wissen?
|
||||
begonnen?</string>
|
||||
<string id="SettingsAppTimeout">Time-out in seconden. Sluit de applicatie na deze periode af
|
||||
inactiviteit om de batterij van het apparaat te sparen.</string>
|
||||
<string id="SettingsConfirmTimeout">Na deze tijd (in seconden) verschijnt er een bevestigingsvenster voor een
|
||||
actie wordt automatisch gesloten en de actie wordt geannuleerd. Stel in op 0 om de time-out uit te schakelen.</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="SettingsPollDelay">Extra poll-vertraging (in seconden). Voegt een vertraging toe tussen de statusupdate van alle menu-items.</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>
|
||||
<string id="LeftToRight">Van links naar rechts</string>
|
||||
<string id="RightToLeft">Rechts naar links</string>
|
||||
<string id="SettingsWidgetStart">(Alleen Widget) Start de applicatie automatisch vanuit de widget
|
||||
zonder te wachten op een tikje.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Schakel de achtergrondservice in om de klokbatterij te verzenden
|
||||
niveau naar Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">De vernieuwingsfrequentie (in minuten) waarmee de achtergrond wordt weergegeven
|
||||
service moet het batterijniveau opnieuw verzenden.</string>
|
||||
<string id="WebhookId">(Alleen-lezen) De Webhook-ID die door het horloge is aangemaakt voor updates van het batterijniveau.
|
||||
Mogelijk hebt u dit nodig voor foutopsporing.</string>
|
||||
<string id="SettingsWidgetStart">(Alleen Widget) Start de applicatie automatisch vanuit de widget zonder te wachten op een tik.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Schakel de achtergrondservice in om het batterijniveau, de locatie en (indien ondersteund) activiteitsgegevens van het apparaat naar Home Assistant te sturen.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">De vernieuwingsfrequentie (in minuten) waarmee de achtergrondservice het verzenden van gegevens moet herhalen.</string>
|
||||
<string id="WebhookId">(Alleen-lezen) De webhook-ID die door het apparaat is gemaakt voor service-updates op de achtergrond. Mogelijk hebt u dit nodig voor foutopsporing.</string>
|
||||
</strings>
|
||||
|
@ -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>
|
||||
@ -50,21 +50,16 @@
|
||||
<string id="SettingsApiUrl">HomeAssistant API URL.</string>
|
||||
<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 korral olemasoleva vahemälu tühjendama
|
||||
algas?</string>
|
||||
<string id="SettingsAppTimeout">Aegumine sekundites. Väljuge rakendusest pärast seda perioodi
|
||||
tegevusetus, et säästa seadme akut.</string>
|
||||
<string id="SettingsConfirmTimeout">Pärast seda aega (sekundites) kuvatakse kinnitusdialoog an
|
||||
toiming suletakse automaatselt ja toiming tühistatakse. Ajalõpu keelamiseks määrake väärtusele 0.</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="SettingsPollDelay">Küsitluse täiendav viivitus (sekundites). Lisab viivituse kõigi menüüelementide olekuvärskenduse vahele.</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>
|
||||
<string id="LeftToRight">Vasakult paremale</string>
|
||||
<string id="RightToLeft">Paremalt vasakule</string>
|
||||
<string id="SettingsWidgetStart">(Ainult vidin) Käivitage rakendus automaatselt vidinast
|
||||
puudutust ootamata.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Kella aku saatmiseks lubage taustteenus
|
||||
tasemel koduabilisele.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Värskendussagedus (minutites), mille juures taust
|
||||
teenindus peaks aku taseme saatmist kordama.</string>
|
||||
<string id="WebhookId">(Ainult lugemiseks) Kella loodud veebihaagi ID aku taseme värskendamiseks.
|
||||
Võib-olla vajate seda silumiseks.</string>
|
||||
<string id="SettingsWidgetStart">(Ainult vidin) Käivitage rakendus automaatselt vidinast ilma puudutust ootamata.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Lubage taustteenus, et saata Home Assistantile seadme aku tase, asukoht ja (kui see on toetatud) tegevusandmed.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Värskendussagedus (minutites), millega taustateenus peaks andmete saatmist kordama.</string>
|
||||
<string id="WebhookId">(Ainult lugemiseks) Seadme loodud veebihaagi ID taustateenuste värskenduste jaoks. Võib-olla vajate seda silumiseks.</string>
|
||||
</strings>
|
||||
|
@ -25,7 +25,7 @@
|
||||
<string id="NoPhone" scope="glance">Ei puhelinyhteyttä</string>
|
||||
<string id="NoInternet">Ei Internet-yhteyttä</string>
|
||||
<string id="NoResponse">Ei vastausta, tarkista Internet-yhteys</string>
|
||||
<string id="NoAPIKey" scope="glance">Sovelluksen asetuksissa ei ole API-avainta</string>
|
||||
<string id="NoAPIKey" scope="glance">Sovellusasetuksissa ei ole API-avainta</string>
|
||||
<string id="NoApiUrl" scope="glance">Sovellusasetuksissa ei ole API URL-osoitetta</string>
|
||||
<string id="NoConfigUrl" scope="glance">Sovelluksen asetuksissa ei ole konfigurointi-URL-osoitetta</string>
|
||||
<string id="ApiFlood">API-kutsut liian nopeita. Hidasta pyyntöjäsi.</string>
|
||||
@ -50,21 +50,16 @@
|
||||
<string id="SettingsApiUrl">HomeAssistant API:n URL-osoite.</string>
|
||||
<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 seuraavan kerran
|
||||
alkanut?</string>
|
||||
<string id="SettingsAppTimeout">Aikakatkaisu sekunneissa. Poistu sovelluksesta tämän ajanjakson jälkeen
|
||||
käyttämättömyys säästääksesi laitteen akkua.</string>
|
||||
<string id="SettingsConfirmTimeout">Tämän ajan kuluttua (sekunneissa) vahvistusikkuna an
|
||||
toiminto suljetaan automaattisesti ja toiminto peruutetaan. Aseta arvoksi 0, jos haluat poistaa aikakatkaisun käytöstä.</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="SettingsPollDelay">Ylimääräinen kyselyn viive (sekunneissa). Lisää viiveen kaikkien valikkokohtien tilapäivitysten välille.</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>
|
||||
<string id="SettingsWidgetStart">(Vain widget) Käynnistä sovellus automaattisesti widgetistä
|
||||
odottamatta napausta.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Ota taustapalvelu käyttöön kellon akun lähettämiseksi
|
||||
tasolle Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Päivitystaajuus (minuutteina), jolla tausta
|
||||
palvelun pitäisi toistaa akun varaustason lähettäminen.</string>
|
||||
<string id="WebhookId">(Vain luku) Kellon luoma Webhook-tunnus akun varaustason päivityksiä varten.
|
||||
Saatat tarvita tätä virheenkorjaukseen.</string>
|
||||
<string id="SettingsWidgetStart">(Vain widget) Käynnistä sovellus automaattisesti widgetistä odottamatta napautusta.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Ota taustapalvelu käyttöön, jotta voit lähettää laitteen akun varaustason, sijainnin ja (jos tuettu) toimintatiedot Home Assistantille.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Virkistystaajuus (minuutteina), jolla taustapalvelun pitäisi toistaa tietojen lähettäminen.</string>
|
||||
<string id="WebhookId">(Vain luku) Laitteen luoma Webhook-tunnus taustapalvelupäivityksiä varten. Saatat tarvita tätä virheenkorjaukseen.</string>
|
||||
</strings>
|
||||
|
@ -50,21 +50,16 @@
|
||||
<string id="SettingsApiUrl">URL de l’API HomeAssistant.</string>
|
||||
<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 devrait-elle vider le cache existant la prochaine fois
|
||||
commencé?</string>
|
||||
<string id="SettingsAppTimeout">Délai d'attente en secondes. Quittez l'application après cette période de
|
||||
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 pour un
|
||||
l'action est automatiquement clôturée et l'action est annulée. Réglez sur 0 pour désactiver le délai d'attente.</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="SettingsPollDelay">Délai d'interrogation supplémentaire (en secondes). Ajoute un délai entre la mise à jour du statut de tous les éléments de menu.</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>
|
||||
<string id="LeftToRight">De gauche à droite</string>
|
||||
<string id="RightToLeft">De droite à gauche</string>
|
||||
<string id="SettingsWidgetStart">(Widget uniquement) Démarrez automatiquement l'application à partir du widget
|
||||
sans attendre un robinet.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Activer le service d'arrière-plan pour envoyer la batterie de l'horloge
|
||||
niveau à Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Le taux de rafraîchissement (en minutes) auquel l'arrière-plan
|
||||
Le service doit répéter l'envoi du niveau de la batterie.</string>
|
||||
<string id="WebhookId">(Lecture seule) L'ID Webhook créé par la montre pour les mises à jour du niveau de batterie.
|
||||
Vous pourriez en avoir besoin pour le débogage.</string>
|
||||
<string id="SettingsWidgetStart">(Widget uniquement) Démarrez automatiquement l'application à partir du widget sans attendre un clic.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Activez le service en arrière-plan pour envoyer les données de niveau de batterie, d'emplacement et (si pris en charge) d'activité de l'appareil à Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Fréquence de rafraîchissement (en minutes) à laquelle le service en arrière-plan doit répéter l'envoi des données.</string>
|
||||
<string id="WebhookId">(Lecture seule) ID Webhook créé par l'appareil pour les mises à jour du service en arrière-plan. Vous pourriez en avoir besoin pour le débogage.</string>
|
||||
</strings>
|
||||
|
@ -50,21 +50,16 @@
|
||||
<string id="SettingsApiUrl">URL για το HomeAssistant API.</string>
|
||||
<string id="SettingsConfigUrl">URL για τη διαμόρφωση μενού (JSON).</string>
|
||||
<string id="SettingsCacheConfig">Πρέπει η εφαρμογή να αποθηκεύσει προσωρινά τη διαμόρφωση του μενού;</string>
|
||||
<string id="SettingsClearCache">Εάν η εφαρμογή εκκαθαρίσει την υπάρχουσα κρυφή μνήμη την επόμενη φορά
|
||||
ξεκίνησε;</string>
|
||||
<string id="SettingsAppTimeout">Timeout σε δευτερόλεπτα. Έξοδος από την εφαρμογή μετά από αυτήν την περίοδο του
|
||||
αδράνεια για εξοικονόμηση μπαταρίας της συσκευής.</string>
|
||||
<string id="SettingsConfirmTimeout">Μετά από αυτό το διάστημα (σε δευτερόλεπτα), ένα παράθυρο διαλόγου επιβεβαίωσης για ένα
|
||||
η ενέργεια κλείνει αυτόματα και η ενέργεια ακυρώνεται. Ορίστε στο 0 για να απενεργοποιήσετε το χρονικό όριο.</string>
|
||||
<string id="SettingsClearCache">Πρέπει η εφαρμογή να διαγράψει την υπάρχουσα προσωρινή μνήμη την επόμενη φορά που θα ξεκινήσει;</string>
|
||||
<string id="SettingsVibration">Πρέπει η εφαρμογή να παρέχει ανατροφοδότηση μέσω δονήσεων;</string>
|
||||
<string id="SettingsAppTimeout">Timeout σε δευτερόλεπτα. Κλείστε την εφαρμογή μετά από αυτήν την περίοδο αδράνειας για να εξοικονομήσετε την μπαταρία της συσκευής.</string>
|
||||
<string id="SettingsPollDelay">Πρόσθετη καθυστέρηση δημοσκόπησης (σε δευτερόλεπτα). Προσθέτει μια καθυστέρηση μεταξύ της ενημέρωσης κατάστασης όλων των στοιχείων μενού.</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="SettingsBatteryLevelRefreshRate">Ο ρυθμός ανανέωσης (σε λεπτά) με τον οποίο το φόντο
|
||||
Το σέρβις θα πρέπει να επαναλάβει την αποστολή της στάθμης της μπαταρίας.</string>
|
||||
<string id="WebhookId">(Μόνο για ανάγνωση) Το αναγνωριστικό Webhook που δημιουργήθηκε από το ρολόι για ενημερώσεις επιπέδου μπαταρίας.
|
||||
Μπορεί να το χρειάζεστε για τον εντοπισμό σφαλμάτων.</string>
|
||||
<string id="SettingsWidgetStart">(Μόνο widget) Αυτόματη εκκίνηση της εφαρμογής από το widget χωρίς να περιμένετε ένα πάτημα.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Ενεργοποιήστε την υπηρεσία παρασκηνίου για αποστολή του επιπέδου μπαταρίας της συσκευής, της τοποθεσίας και (εάν υποστηρίζονται) δεδομένα δραστηριότητας στον Βοηθό σπιτιού.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Ο ρυθμός ανανέωσης (σε λεπτά) με τον οποίο η υπηρεσία παρασκηνίου θα πρέπει να επαναλαμβάνει την αποστολή δεδομένων.</string>
|
||||
<string id="WebhookId">(Μόνο για ανάγνωση) Το αναγνωριστικό Webhook που δημιουργήθηκε από τη συσκευή για ενημερώσεις υπηρεσίας παρασκηνίου. Μπορεί να το χρειάζεστε για τον εντοπισμό σφαλμάτων.</string>
|
||||
</strings>
|
||||
|
@ -27,7 +27,7 @@
|
||||
<string id="NoResponse">אין תגובה, בדוק חיבור לאינטרנט</string>
|
||||
<string id="NoAPIKey" scope="glance">אין מפתח API בהגדרות האפליקציה</string>
|
||||
<string id="NoApiUrl" scope="glance">אין כתובת API בהגדרות האפליקציה</string>
|
||||
<string id="NoConfigUrl" scope="glance">אין כתובת URL לתצורה בהגדרות האפליקציה</string>
|
||||
<string id="NoConfigUrl" scope="glance">אין כתובת אתר תצורה בהגדרות האפליקציה</string>
|
||||
<string id="ApiFlood">קריאות API מהירות מדי. נא להאט את הבקשות שלך.</string>
|
||||
<string id="ApiUrlNotFound">כתובת האתר לא נמצאה. שגיאה פוטנציאלית של כתובת ה-API בהגדרות.</string>
|
||||
<string id="ConfigUrlNotFound">כתובת האתר לא נמצאה. שגיאת כתובת אתר פוטנציאלית של תצורה בהגדרות.</string>
|
||||
@ -48,23 +48,18 @@
|
||||
<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="SettingsAppTimeout">פסק זמן בשניות. צא מהאפליקציה לאחר תקופה זו של
|
||||
חוסר פעילות כדי לחסוך בסוללת המכשיר.</string>
|
||||
<string id="SettingsConfirmTimeout">לאחר זמן זה (בשניות), תיבת דו-שיח אישור עבור
|
||||
הפעולה נסגרת אוטומטית והפעולה מבוטלת. הגדר ל-0 כדי לבטל את הזמן הקצוב.</string>
|
||||
<string id="SettingsClearCache">האם היישום צריך לנקות את המטמון הקיים בפעם הבאה שהוא יופעל?</string>
|
||||
<string id="SettingsVibration">האם האפליקציה צריכה לספק משוב באמצעות רעידות?</string>
|
||||
<string id="SettingsAppTimeout">פסק זמן בשניות. צא מהאפליקציה לאחר תקופה זו של חוסר פעילות כדי לחסוך בסוללת המכשיר.</string>
|
||||
<string id="SettingsPollDelay">עיכוב נוסף בסקר (בשניות). מוסיף עיכוב בין עדכון המצב של כל פריטי התפריט.</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="SettingsBatteryLevelRefreshRate">קצב הרענון (בדקות) שבו הרקע
|
||||
השירות צריך לחזור על שליחת רמת הסוללה.</string>
|
||||
<string id="WebhookId">(לקריאה בלבד) מזהה ה-Webhook שנוצר על ידי השעון עבור עדכוני רמת הסוללה.
|
||||
ייתכן שתדרוש את זה בשביל איתור באגים.</string>
|
||||
<string id="SettingsWidgetStart">(יישומון בלבד) הפעל אוטומטית את האפליקציה מהווידג'ט מבלי לחכות להקשה.</string>
|
||||
<string id="SettingsEnableBatteryLevel">אפשר את שירות הרקע כדי לשלוח את נתוני רמת הסוללה של המכשיר, המיקום (אם נתמכים) ל-Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">קצב הרענון (בדקות) שבו שירות הרקע צריך לחזור על שליחת נתונים.</string>
|
||||
<string id="WebhookId">(לקריאה בלבד) מזהה ה-Webhook שנוצר על ידי המכשיר עבור עדכוני שירות ברקע. ייתכן שתדרוש זאת לצורך איתור באגים.</string>
|
||||
</strings>
|
||||
|
@ -50,21 +50,16 @@
|
||||
<string id="SettingsApiUrl">URL za HomeAssistant API.</string>
|
||||
<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 sljedeći put izbrisati postojeću predmemoriju
|
||||
počeo?</string>
|
||||
<string id="SettingsAppTimeout">Istek u sekundama. Izađite iz aplikacije nakon tog razdoblja od
|
||||
neaktivnosti radi uštede baterije uređaja.</string>
|
||||
<string id="SettingsConfirmTimeout">Nakon tog vremena (u sekundama), dijaloški okvir potvrde za an
|
||||
radnja se automatski zatvara i akcija se poništava. Postavite na 0 da onemogućite vremensko ograničenje.</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="SettingsPollDelay">Dodatna odgoda ankete (u sekundama). Dodaje odgodu između ažuriranja statusa svih stavki izbornika.</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>
|
||||
<string id="LeftToRight">S lijeva nadesno</string>
|
||||
<string id="RightToLeft">S desna na lijevo</string>
|
||||
<string id="SettingsWidgetStart">(Samo widget) Automatski pokrenite aplikaciju iz widgeta
|
||||
bez čekanja na slavinu.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Omogućite pozadinsku uslugu za slanje baterije sata
|
||||
razinu do kućnog pomoćnika.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Brzina osvježavanja (u minutama) pri kojoj pozadina
|
||||
servis bi trebao ponoviti slanje razine baterije.</string>
|
||||
<string id="WebhookId">(Samo za čitanje) Webhook ID koji je kreirao sat za ažuriranje razine baterije.
|
||||
Ovo vam može trebati za otklanjanje pogrešaka.</string>
|
||||
<string id="SettingsWidgetStart">(Samo widget) Automatski pokrenite aplikaciju iz widgeta bez čekanja na dodir.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Omogućite pozadinsku uslugu za slanje podataka o razini baterije uređaja, lokaciji i (ako je podržano) aktivnostima kućnom pomoćniku.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Brzina osvježavanja (u minutama) kojom bi pozadinska usluga trebala ponoviti slanje podataka.</string>
|
||||
<string id="WebhookId">(Samo za čitanje) Webhook ID koji je izradio uređaj za pozadinska ažuriranja usluge. Ovo vam može trebati za otklanjanje pogrešaka.</string>
|
||||
</strings>
|
||||
|
@ -50,21 +50,16 @@
|
||||
<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óját?</string>
|
||||
<string id="SettingsClearCache">Ha az alkalmazás legközelebb törli a meglévő gyorsítótárat
|
||||
elkezdődött?</string>
|
||||
<string id="SettingsAppTimeout">Időtúllépés másodpercben. Lépjen ki az alkalmazásból ezen időszak után
|
||||
tétlenség, hogy kímélje a készülék akkumulátorát.</string>
|
||||
<string id="SettingsConfirmTimeout">Ezen idő letelte után (másodpercben) megjelenik egy megerősítő párbeszédpanel az an
|
||||
A művelet automatikusan lezárul, és a művelet megszakad. Állítsa 0-ra az időtúllépés letiltásához.</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="SettingsPollDelay">További lekérdezési késleltetés (másodpercben). Késleltetést ad az összes menüelem állapotfrissítése között.</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="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
|
||||
csapásra várva.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Engedélyezze a háttérszolgáltatást az óra akkumulátorának küldéséhez
|
||||
szinten az Otthoni asszisztensre.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Az a frissítési gyakoriság (percben), amelynél a háttér
|
||||
a szerviznek meg kell ismételnie az akkumulátor töltöttségi szintjének küldését.</string>
|
||||
<string id="WebhookId">(Csak olvasható) Az óra által az akkumulátor töltöttségi szintjének frissítéséhez létrehozott Webhook azonosító.
|
||||
Erre szükség lehet a hibakereséshez.</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="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>
|
||||
|
@ -50,21 +50,16 @@
|
||||
<string id="SettingsApiUrl">URL untuk API HomeAssistant.</string>
|
||||
<string id="SettingsConfigUrl">URL untuk konfigurasi menu (JSON).</string>
|
||||
<string id="SettingsCacheConfig">Haruskah aplikasi menyimpan konfigurasi menu dalam cache?</string>
|
||||
<string id="SettingsClearCache">Sebaiknya aplikasi menghapus cache yang ada di lain waktu
|
||||
dimulai?</string>
|
||||
<string id="SettingsAppTimeout">Batas waktu dalam hitungan detik. Keluar dari aplikasi setelah periode ini
|
||||
ketidakaktifan untuk menghemat baterai perangkat.</string>
|
||||
<string id="SettingsConfirmTimeout">Setelah waktu ini (dalam detik), dialog konfirmasi untuk
|
||||
tindakan secara otomatis ditutup dan tindakan dibatalkan. Setel ke 0 untuk menonaktifkan batas waktu.</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="SettingsPollDelay">Penundaan jajak pendapat tambahan (dalam hitungan detik). Menambahkan penundaan antara pembaruan status semua item menu.</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>
|
||||
<string id="LeftToRight">Kiri ke kanan</string>
|
||||
<string id="RightToLeft">Kanan ke kiri</string>
|
||||
<string id="SettingsWidgetStart">(Khusus widget) Secara otomatis memulai aplikasi dari widget
|
||||
tanpa menunggu ketukan.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Aktifkan layanan latar belakang untuk mengirim baterai jam
|
||||
tingkat ke Asisten Rumah.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Kecepatan refresh (dalam menit) pada latar belakang
|
||||
layanan harus mengulangi pengiriman level baterai.</string>
|
||||
<string id="WebhookId">(Hanya baca) ID Webhook yang dibuat oleh jam tangan untuk pembaruan level baterai.
|
||||
Anda mungkin memerlukan ini untuk debugging.</string>
|
||||
<string id="SettingsWidgetStart">(Khusus widget) Secara otomatis memulai aplikasi dari widget tanpa menunggu ketukan.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Aktifkan layanan latar belakang untuk mengirim data level baterai perangkat, lokasi, dan aktivitas (jika didukung) ke Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Kecepatan refresh (dalam menit) saat layanan latar belakang harus mengulangi pengiriman data.</string>
|
||||
<string id="WebhookId">(Hanya baca) ID Webhook yang dibuat oleh perangkat untuk pembaruan layanan latar belakang. Anda mungkin memerlukan ini untuk debugging.</string>
|
||||
</strings>
|
||||
|
@ -50,21 +50,16 @@
|
||||
<string id="SettingsApiUrl">URL per l'API HomeAssistant.</string>
|
||||
<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 cancellare la cache esistente la prossima volta
|
||||
iniziato?</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), verrà visualizzata una finestra di dialogo di conferma per un
|
||||
l'azione viene chiusa automaticamente e annullata. Impostare su 0 per disabilitare il timeout.</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="SettingsPollDelay">Ritardo polling aggiuntivo (in secondi). Aggiunge un ritardo tra l'aggiornamento dello stato di tutte le voci di menu.</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 aspettare un tocco.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Abilita il servizio in background per inviare la batteria dell'orologio
|
||||
livello su Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">La frequenza di aggiornamento (in minuti) alla quale viene visualizzato lo sfondo
|
||||
il servizio dovrebbe ripetere l'invio del livello della batteria.</string>
|
||||
<string id="WebhookId">(Sola lettura) L'ID webhook creato dall'orologio per gli aggiornamenti del livello della batteria.
|
||||
Potrebbe essere necessario per il debug.</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="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>
|
||||
|
@ -46,25 +46,20 @@
|
||||
<!-- 設定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="SettingsAppTimeout">秒単位のタイムアウト。この期間が経過したらアプリケーションを終了してください
|
||||
デバイスのバッテリーを節約するために非アクティブにします。</string>
|
||||
<string id="SettingsConfirmTimeout">この時間 (秒単位) が経過すると、確認ダイアログが表示されます。
|
||||
アクションは自動的に閉じられ、アクションはキャンセルされます。タイムアウトを無効にするには、0 に設定します。</string>
|
||||
<string id="SettingsClearCache">アプリケーションは次回起動時に既存のキャッシュをクリアする必要がありますか?</string>
|
||||
<string id="SettingsVibration">アプリケーションは振動を介してフィードバックを提供する必要がありますか?</string>
|
||||
<string id="SettingsAppTimeout">秒単位のタイムアウト。デバイスのバッテリーを節約するために、この期間非アクティブになった後はアプリケーションを終了してください。</string>
|
||||
<string id="SettingsPollDelay">追加のポーリング遅延 (秒単位)。すべてのメニュー項目のステータス更新の間に遅延を追加します。</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">時計のバッテリーを送信するバックグラウンド サービスを有効にする
|
||||
ホームアシスタントレベル。</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">バックグラウンドのリフレッシュ レート (分単位)。
|
||||
サービスはバッテリー残量の送信を繰り返す必要があります。</string>
|
||||
<string id="WebhookId">(読み取り専用) バッテリー レベルの更新のためにウォッチによって作成された Webhook ID。
|
||||
デバッグのためにこれが必要になる場合があります。</string>
|
||||
<string id="SettingsWidgetStart">(ウィジェットのみ)タップを待たずにウィジェットからアプリを自動起動します。</string>
|
||||
<string id="SettingsEnableBatteryLevel">バックグラウンド サービスを有効にして、デバイスのバッテリー レベル、位置情報、および (サポートされている場合) アクティビティ データをホーム アシスタントに送信します。</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">バックグラウンド サービスがデータの送信を繰り返すリフレッシュ レート (分単位)。</string>
|
||||
<string id="WebhookId">(読み取り専用) バックグラウンド サービスの更新のためにデバイスによって作成された Webhook ID。デバッグのためにこれが必要になる場合があります。</string>
|
||||
</strings>
|
||||
|
@ -50,21 +50,16 @@
|
||||
<string id="SettingsApiUrl">HomeAssistant API의 URL입니다.</string>
|
||||
<string id="SettingsConfigUrl">메뉴 구성을 위한 URL(JSON)입니다.</string>
|
||||
<string id="SettingsCacheConfig">애플리케이션이 메뉴 구성을 캐시해야 합니까?</string>
|
||||
<string id="SettingsClearCache">다음 번에 애플리케이션이 기존 캐시를 지워야 할까요?
|
||||
시작됐나요?</string>
|
||||
<string id="SettingsAppTimeout">시간 초과(초)입니다. 이 기간이 지나면 응용 프로그램을 종료하십시오.
|
||||
장치 배터리를 절약하기 위해 활동하지 않습니다.</string>
|
||||
<string id="SettingsConfirmTimeout">이 시간(초)이 지나면 확인 대화 상자가 나타납니다.
|
||||
작업이 자동으로 닫히고 작업이 취소됩니다. 시간 초과를 비활성화하려면 0으로 설정합니다.</string>
|
||||
<string id="SettingsClearCache">애플리케이션이 다음에 시작될 때 기존 캐시를 지워야 합니까?</string>
|
||||
<string id="SettingsVibration">애플리케이션이 진동을 통해 피드백을 제공해야 합니까?</string>
|
||||
<string id="SettingsAppTimeout">시간 초과(초)입니다. 장치 배터리를 절약하려면 이 비활성 기간 후에 애플리케이션을 종료하십시오.</string>
|
||||
<string id="SettingsPollDelay">추가 폴링 지연(초)입니다. 모든 메뉴 항목의 상태 업데이트 사이에 지연을 추가합니다.</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">시계 배터리를 보내려면 백그라운드 서비스를 활성화하세요.
|
||||
홈어시스턴트 수준.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">배경이 재생되는 새로 고침 빈도(분)입니다.
|
||||
서비스는 배터리 잔량 전송을 반복해야 합니다.</string>
|
||||
<string id="WebhookId">(읽기 전용) 배터리 잔량 업데이트를 위해 시계에서 생성된 웹훅 ID입니다.
|
||||
디버깅을 위해 이 정보가 필요할 수 있습니다.</string>
|
||||
<string id="SettingsWidgetStart">(위젯만 해당) 탭을 기다리지 않고 위젯에서 자동으로 애플리케이션을 시작합니다.</string>
|
||||
<string id="SettingsEnableBatteryLevel">장치 배터리 수준, 위치 및 (지원되는 경우) 활동 데이터를 홈어시스턴트로 보내려면 백그라운드 서비스를 활성화하세요.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">백그라운드 서비스가 데이터 전송을 반복해야 하는 새로 고침 빈도(분)입니다.</string>
|
||||
<string id="WebhookId">(읽기 전용) 백그라운드 서비스 업데이트를 위해 장치에서 생성한 Webhook ID입니다. 디버깅을 위해 이 정보가 필요할 수 있습니다.</string>
|
||||
</strings>
|
||||
|
@ -50,21 +50,16 @@
|
||||
<string id="SettingsApiUrl">HomeAssistant API URL.</string>
|
||||
<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">Ja lietojumprogramma nākamreiz notīra esošo kešatmiņu
|
||||
sākās?</string>
|
||||
<string id="SettingsAppTimeout">Taimauts sekundēs. Izejiet no lietojumprogrammas pēc šī perioda
|
||||
neaktivitāte, lai taupītu ierīces akumulatoru.</string>
|
||||
<string id="SettingsConfirmTimeout">Pēc šī laika (sekundēs) tiek parādīts apstiprinājuma dialoglodziņš
|
||||
darbība tiek automātiski aizvērta 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="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="SettingsPollDelay">Papildu aptaujas aizkave (sekundēs). Pievieno aizkavi starp visu izvēlnes vienumu statusa atjaunināšanu.</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 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 nosūtītu pulksteņa akumulatoru
|
||||
Mājas palīga līmenī.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Atsvaidzes intensitāte (minūtēs), ar kādu fons
|
||||
pakalpojumam ir jāatkārto akumulatora līmeņa nosūtīšana.</string>
|
||||
<string id="WebhookId">(Tikai lasāms) Web aizķeres ID, ko pulkstenis izveidojis akumulatora uzlādes līmeņa atjauninājumiem.
|
||||
Tas var būt nepieciešams atkļūdošanai.</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="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>
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
<strings>
|
||||
<string id="AppName" scope="glance">HomeAssistant</string>
|
||||
<string id="Confirm">Žinoma?</string>
|
||||
<string id="Confirm">Aišku?</string>
|
||||
<string id="Executed" scope="glance">Patvirtinta</string>
|
||||
<string id="NoPhone" scope="glance">Nėra telefono ryšio</string>
|
||||
<string id="NoInternet">Nėra interneto ryšio</string>
|
||||
@ -34,9 +34,9 @@
|
||||
<string id="NoJson">Joks JSON negrąžintas iš HTTP užklausos.</string>
|
||||
<string id="UnhandledHttpErr">HTTP užklausa grąžino klaidos kodą =</string>
|
||||
<string id="TrailingSlashErr">API URL pabaigoje negali būti pasvirojo brūkšnio „/“</string>
|
||||
<string id="WebhookFailed">Nepavyko užregistruoti Webhook</string>
|
||||
<string id="WebhookFailed">Nepavyko užregistruoti „Webhook“.</string>
|
||||
<string id="TemplateError">Nepavyko pateikti šablono</string>
|
||||
<string id="Available" scope="glance">Yra</string>
|
||||
<string id="Available" scope="glance">Galima</string>
|
||||
<string id="Checking" scope="glance">Tikrinama...</string>
|
||||
<string id="Unavailable" scope="glance">Nepasiekiamas</string>
|
||||
<string id="Unconfigured" scope="glance">Nesukonfigūruotas</string>
|
||||
@ -45,26 +45,21 @@
|
||||
<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="SettingsClearCache">Ar programa kitą kartą išvalys esamą talpyklą
|
||||
prasidėjo?</string>
|
||||
<string id="SettingsAppTimeout">Skirtasis laikas sekundėmis. Išeikite iš programos pasibaigus šiam laikotarpiui
|
||||
neaktyvumas, kad taupytų įrenginio akumuliatorių.</string>
|
||||
<string id="SettingsConfirmTimeout">Po šio laiko (sekundėmis) atsiras patvirtinimo dialogo langas
|
||||
veiksmas automatiškai uždaromas ir veiksmas atšaukiamas. Nustatykite 0, kad išjungtumėte skirtąjį laiką.</string>
|
||||
<string id="SettingsCacheConfig">Ar programa turėtų išsaugoti meniu konfigūraciją talpykloje?</string>
|
||||
<string id="SettingsClearCache">Ar kitą kartą paleisdama programa turėtų išvalyti esamą talpyklą?</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="SettingsPollDelay">Papildoma apklausos delsa (sekundėmis). Prideda delsą tarp visų meniu elementų būsenos atnaujinimo.</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 valdiklis) Automatiškai paleiskite programą iš valdiklio
|
||||
nelaukdamas bakstelėjimo.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Įgalinkite foninę paslaugą, kad išsiųstumėte laikrodžio bateriją
|
||||
lygiu iki namų asistento.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Fono atnaujinimo dažnis (minutėmis).
|
||||
paslauga turėtų pakartoti baterijos lygio siuntimą.</string>
|
||||
<string id="WebhookId">(Tik skaitoma) Laikrodžio sukurtas „Webhook“ ID, kad būtų galima atnaujinti akumuliatoriaus lygį.
|
||||
Jums gali prireikti derinimo.</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>
|
||||
</strings>
|
||||
|
@ -50,21 +50,16 @@
|
||||
<string id="SettingsApiUrl">URL for HomeAssistant API.</string>
|
||||
<string id="SettingsConfigUrl">URL for menykonfigurasjon (JSON).</string>
|
||||
<string id="SettingsCacheConfig">Skal applikasjonen bufre menykonfigurasjonen?</string>
|
||||
<string id="SettingsClearCache">Skal applikasjonen tømme den eksisterende cachen neste gang den er det
|
||||
startet?</string>
|
||||
<string id="SettingsAppTimeout">Tidsavbrudd i sekunder. Avslutt søknaden etter denne perioden på
|
||||
inaktivitet for å spare enhetens batteri.</string>
|
||||
<string id="SettingsConfirmTimeout">Etter denne tiden (i sekunder), vises en bekreftelsesdialog for en
|
||||
handlingen lukkes automatisk og handlingen avbrytes. Sett til 0 for å deaktivere tidsavbruddet.</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="SettingsPollDelay">Ytterligere avstemningsforsinkelse (i sekunder). Legger til en forsinkelse mellom statusoppdatering av alle menyelementer.</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>
|
||||
<string id="LeftToRight">Venstre til høyre</string>
|
||||
<string id="RightToLeft">Høyre til venstre</string>
|
||||
<string id="SettingsWidgetStart">(Kun widget) Start applikasjonen automatisk fra widgeten
|
||||
uten å vente på et trykk.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Aktiver bakgrunnstjenesten for å sende klokkebatteriet
|
||||
nivå til Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Oppdateringshastigheten (i minutter) som bakgrunnen
|
||||
tjenesten skal gjenta sendingen av batterinivået.</string>
|
||||
<string id="WebhookId">(Skrivebeskyttet) Webhook-IDen opprettet av klokken for oppdateringer av batterinivå.
|
||||
Du kan kreve dette for feilsøking.</string>
|
||||
<string id="SettingsWidgetStart">(Kun widget) Start applikasjonen automatisk fra widgeten uten å vente på et trykk.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Aktiver bakgrunnstjenesten for å sende enhetens batterinivå, plassering og (hvis støttet) aktivitetsdata til Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Oppdateringshastigheten (i minutter) som bakgrunnstjenesten skal gjenta sending av data med.</string>
|
||||
<string id="WebhookId">(Skrivebeskyttet) Webhook-IDen opprettet av enheten for bakgrunnstjenesteoppdateringer. Du kan kreve dette for feilsøking.</string>
|
||||
</strings>
|
||||
|
@ -50,21 +50,16 @@
|
||||
<string id="SettingsApiUrl">Adres URL interfejsu API HomeAssistant.</string>
|
||||
<string id="SettingsConfigUrl">Adres URL konfiguracji menu (JSON).</string>
|
||||
<string id="SettingsCacheConfig">Czy aplikacja powinna buforować konfigurację menu?</string>
|
||||
<string id="SettingsClearCache">Czy następnym razem aplikacja powinna wyczyścić istniejącą pamięć podręczną
|
||||
Rozpoczęty?</string>
|
||||
<string id="SettingsAppTimeout">Limit czasu w sekundach. Wyjdź z aplikacji po upływie tego okresu
|
||||
bezczynności, aby oszczędzać baterię urządzenia.</string>
|
||||
<string id="SettingsConfirmTimeout">Po tym czasie (w sekundach) pojawi się okno dialogowe z potwierdzeniem
|
||||
akcja zostaje automatycznie zamknięta, a akcja anulowana. Ustaw na 0, aby wyłączyć limit czasu.</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="SettingsPollDelay">Dodatkowe opóźnienie odpytywania (w sekundach). Dodaje opóźnienie pomiędzy aktualizacją statusu wszystkich pozycji menu.</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>
|
||||
<string id="LeftToRight">Od lewej do prawej</string>
|
||||
<string id="RightToLeft">Od prawej do lewej</string>
|
||||
<string id="SettingsWidgetStart">(Tylko widget) Automatycznie uruchamiaj aplikację z poziomu widgetu
|
||||
bez czekania na dotknięcie.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Włącz usługę w tle, aby wysłać baterię zegara
|
||||
poziom do Asystenta Domowego.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Częstotliwość odświeżania (w minutach), z jaką tło
|
||||
serwis powinien powtórzyć wysyłanie poziomu naładowania baterii.</string>
|
||||
<string id="WebhookId">(Tylko do odczytu) Identyfikator webhooka utworzony przez zegarek w celu aktualizacji poziomu baterii.
|
||||
Możesz tego potrzebować do debugowania.</string>
|
||||
<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>
|
||||
</strings>
|
||||
|
@ -50,21 +50,16 @@
|
||||
<string id="SettingsApiUrl">URL para API HomeAssistant.</string>
|
||||
<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 deve limpar o cache existente na próxima vez que for
|
||||
iniciado?</string>
|
||||
<string id="SettingsAppTimeout">Tempo limite em segundos. Saia do aplicativo após esse período de
|
||||
inatividade para economizar bateria do dispositivo.</string>
|
||||
<string id="SettingsConfirmTimeout">Após este tempo (em segundos), uma caixa de diálogo de confirmação para um
|
||||
a ação é automaticamente fechada e a ação é cancelada. Defina como 0 para desativar o tempo limite.</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="SettingsPollDelay">Atraso de pesquisa adicional (em segundos). Adiciona um atraso entre a atualização de status de todos os itens de menu.</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>
|
||||
<string id="LeftToRight">Da esquerda para direita</string>
|
||||
<string id="RightToLeft">Direita para esquerda</string>
|
||||
<string id="SettingsWidgetStart">(Somente widget) Iniciar automaticamente o aplicativo a partir do widget
|
||||
sem esperar por um toque.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Habilite o serviço em segundo plano para enviar a bateria do relógio
|
||||
nível para Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">A taxa de atualização (em minutos) na qual o plano de fundo
|
||||
o serviço deve repetir o envio do nível da bateria.</string>
|
||||
<string id="WebhookId">(Somente leitura) O ID do Webhook criado pelo relógio para atualizações do nível da bateria.
|
||||
Você pode precisar disso para depuração.</string>
|
||||
<string id="SettingsWidgetStart">(Somente widget) Inicie automaticamente o aplicativo a partir do widget sem esperar por um toque.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Ative o serviço em segundo plano para enviar o nível da bateria do dispositivo, localização e (se compatível) dados de atividade para o Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">A taxa de atualização (em minutos) na qual o serviço em segundo plano deve repetir o envio de dados.</string>
|
||||
<string id="WebhookId">(Somente leitura) O ID do Webhook criado pelo dispositivo para atualizações de serviço em segundo plano. Você pode precisar disso para depuração.</string>
|
||||
</strings>
|
||||
|
@ -28,9 +28,9 @@
|
||||
<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="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="ApiFlood">Apeluri API prea rapide. Vă rugăm să vă încetiniți solicitările.</string>
|
||||
<string id="ApiUrlNotFound">URL nu a fost găsit. Potențială eroare URL API în setări.</string>
|
||||
<string id="ConfigUrlNotFound">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>
|
||||
<string id="UnhandledHttpErr">Solicitarea HTTP a returnat codul de eroare =</string>
|
||||
<string id="TrailingSlashErr">Adresa URL API nu trebuie să aibă o bară oblică „/”</string>
|
||||
@ -50,21 +50,16 @@
|
||||
<string id="SettingsApiUrl">Adresa URL pentru API-ul HomeAssistant.</string>
|
||||
<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">Dacă aplicația șterge memoria cache existentă data viitoare
|
||||
început?</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 un
|
||||
acțiunea este închisă automat și acțiunea este anulată. Setați la 0 pentru a dezactiva timeout-ul.</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="SettingsPollDelay">Întârziere suplimentară a sondajului (în secunde). Adaugă o întârziere între actualizarea stării tuturor elementelor de meniu.</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ă să aștepte o atingere.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Activați serviciul de fundal pentru a trimite bateria ceasului
|
||||
nivel la Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Rata de reîmprospătare (în minute) la care fundalul
|
||||
serviciul ar trebui să repete trimiterea nivelului bateriei.</string>
|
||||
<string id="WebhookId">(Numai citire) ID-ul Webhook creat de ceas pentru actualizările nivelului bateriei.
|
||||
Este posibil să aveți nevoie de acest lucru pentru depanare.</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="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>
|
||||
|
@ -20,5 +20,11 @@
|
||||
|
||||
<strings>
|
||||
<string id="Confirm">Potvrďte</string>
|
||||
<string id="Executed" scope="glance">Spustený</string>
|
||||
<string id="Executed">Spustený</string>
|
||||
<string id="NoAPIKey">V nastaveniach aplikácie chýba kľúč API</string>
|
||||
<string id="NoApiUrl">V nastaveniach aplikácie chýba adresa URL rozhrania API</string>
|
||||
<string id="NoConfigUrl">V nastaveniach aplikácie chýba konfiguračná adresa URL</string>
|
||||
<string id="Unavailable">Nedostupné</string>
|
||||
<string id="RightToLeft">Sprava doľava</string>
|
||||
<string id="SettingsEnableBatteryLevel">Povoľte službu na pozadí, ktorá bude do Home Assistenta odosielať údaje o stave batérie zariadenia, polohe a (ak je podporované) o aktivite.</string>
|
||||
</strings>
|
||||
|
@ -25,9 +25,9 @@
|
||||
<string id="NoPhone" scope="glance">Žiadne telefónne spojenie</string>
|
||||
<string id="NoInternet">Žiadne internetové pripojenie</string>
|
||||
<string id="NoResponse">Žiadna odpoveď, skontrolujte internetové pripojenie</string>
|
||||
<string id="NoAPIKey" scope="glance">V nastaveniach aplikácie nie je žiadny kľúč API</string>
|
||||
<string id="NoApiUrl" scope="glance">V nastaveniach aplikácie nie je žiadna adresa URL rozhrania API</string>
|
||||
<string id="NoConfigUrl" scope="glance">V nastaveniach aplikácie nie je žiadna konfiguračná URL</string>
|
||||
<string id="NoAPIKey" scope="glance">V nastaveniach aplikácie chýba kľúč API</string>
|
||||
<string id="NoApiUrl" scope="glance">V nastaveniach aplikácie chýba adresa URL rozhrania API</string>
|
||||
<string id="NoConfigUrl" scope="glance">V nastaveniach aplikácie chýba konfiguračná adresa URL</string>
|
||||
<string id="ApiFlood">Volania API sú príliš rýchle. Spomaľte svoje požiadavky.</string>
|
||||
<string id="ApiUrlNotFound">Adresa URL sa nenašla. Potenciálna chyba webovej adresy rozhrania API v nastaveniach.</string>
|
||||
<string id="ConfigUrlNotFound">Adresa URL sa nenašla. Potenciálna chyba konfiguračnej adresy URL v nastaveniach.</string>
|
||||
@ -36,9 +36,9 @@
|
||||
<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="Unavailable" scope="glance">Nedostupné</string>
|
||||
<string id="Unconfigured" scope="glance">Nekonfigurované</string>
|
||||
<string id="Cached" scope="glance">Vo vyrovnávacej pamäti</string>
|
||||
<string id="GlanceMenu" scope="glance">Ponuka</string>
|
||||
@ -46,25 +46,20 @@
|
||||
<!-- 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 nabudúce vymazať existujúcu vyrovnávaciu pamäť
|
||||
začal?</string>
|
||||
<string id="SettingsAppTimeout">Časový limit v sekundách. Po uplynutí tejto doby aplikáciu ukončite
|
||||
nečinnosti, aby sa šetrila batéria zariadenia.</string>
|
||||
<string id="SettingsConfirmTimeout">Po uplynutí tejto doby (v sekundách) sa zobrazí dialógové okno s potvrdením
|
||||
akcia sa automaticky uzavrie a akcia sa zruší. Ak chcete časový limit deaktivovať, nastavte na 0.</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="SettingsPollDelay">Dodatočné oneskorenie hlasovania (v sekundách). Pridáva oneskorenie medzi aktualizáciou stavu všetkých položiek ponuky.</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 vypnúť časový limit, 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 spustiť aplikáciu z miniaplikácie
|
||||
bez čakania na klepnutie.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Povoľte službu na pozadí na odoslanie batérie hodín
|
||||
úroveň na Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Obnovovacia frekvencia (v minútach), pri ktorej je pozadie
|
||||
servis by mal zopakovať odoslanie úrovne batérie.</string>
|
||||
<string id="WebhookId">(Iba na čítanie) Webhook ID vytvorený hodinkami na aktualizáciu úrovne batérie.
|
||||
Možno to budete potrebovať na ladenie.</string>
|
||||
<string id="RightToLeft">Sprava 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í, ktorá bude do Home Assistenta odosielať údaje o stave batérie zariadenia, polohe a (ak je podporované) o aktivite.</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>
|
||||
|
@ -47,24 +47,19 @@
|
||||
<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 naslednjič počisti obstoječi predpomnilnik
|
||||
začelo?</string>
|
||||
<string id="SettingsAppTimeout">Časovna omejitev v sekundah. Po tem obdobju zaprite aplikacijo
|
||||
nedejavnosti, da prihranite baterijo naprave.</string>
|
||||
<string id="SettingsConfirmTimeout">Po tem času (v sekundah) se prikaže potrditveno pogovorno okno za an
|
||||
dejanje se samodejno zapre in dejanje preklicano. Nastavite na 0, da onemogočite časovno omejitev.</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="SettingsPollDelay">Dodatna zakasnitev ankete (v sekundah). Doda zakasnitev med posodobitvijo stanja vseh elementov menija.</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>
|
||||
<string id="LeftToRight">Od leve proti desni</string>
|
||||
<string id="RightToLeft">Od desne proti levi</string>
|
||||
<string id="SettingsWidgetStart">(Samo pripomoček) Samodejni zagon aplikacije iz pripomočka
|
||||
brez čakanja na pipo.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Omogočite storitev v ozadju za pošiljanje baterije ure
|
||||
stopnje do domačega pomočnika.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Hitrost osveževanja (v minutah), pri kateri je ozadje
|
||||
servis bi moral ponoviti pošiljanje stanja baterije.</string>
|
||||
<string id="WebhookId">(Samo za branje) ID Webhook, ki ga ustvari ura za posodobitve ravni baterije.
|
||||
To boste morda potrebovali za odpravljanje napak.</string>
|
||||
<string id="SettingsWidgetStart">(Samo pripomoček) Samodejno zaženite aplikacijo iz pripomočka, ne da bi čakali na dotik.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Omogočite storitev v ozadju za pošiljanje podatkov o ravni baterije naprave, lokaciji in (če je podprto) dejavnosti domačemu pomočniku.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Hitrost osveževanja (v minutah), pri kateri naj storitev v ozadju ponavlja pošiljanje podatkov.</string>
|
||||
<string id="WebhookId">(Samo za branje) ID Webhook, ki ga ustvari naprava za posodobitve storitev v ozadju. To boste morda potrebovali za odpravljanje napak.</string>
|
||||
</strings>
|
||||
|
@ -50,21 +50,16 @@
|
||||
<string id="SettingsApiUrl">URL para la API de HomeAssistant.</string>
|
||||
<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">¿Debería la aplicación borrar el caché existente la próxima vez?
|
||||
¿comenzó?</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), aparecerá un cuadro de diálogo de confirmación para una
|
||||
La acción se cierra automáticamente y la acción se cancela. Establezca en 0 para desactivar el tiempo de espera.</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="SettingsPollDelay">Retraso adicional en la encuesta (en segundos). Agrega un retraso entre la actualización del estado de todos los elementos del menú.</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>
|
||||
<string id="LeftToRight">De izquierda a derecha</string>
|
||||
<string id="RightToLeft">De derecha a izquierda</string>
|
||||
<string id="SettingsWidgetStart">(Solo widget) Inicia automáticamente la aplicación desde el widget
|
||||
sin esperar un toque.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Habilite el servicio en segundo plano para enviar la batería del reloj.
|
||||
nivel a Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">La frecuencia de actualización (en minutos) a la que se reproduce el fondo.
|
||||
El servicio debe repetir enviando el nivel de batería.</string>
|
||||
<string id="WebhookId">(Solo lectura) El ID de Webhook creado por el reloj para actualizaciones del nivel de batería.
|
||||
Es posible que necesite esto para la depuración.</string>
|
||||
<string id="SettingsWidgetStart">(Solo widget) Inicia automáticamente la aplicación desde el widget sin esperar un toque.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Habilite el servicio en segundo plano para enviar el nivel de batería del dispositivo, la ubicación y (si es compatible) datos de actividad a Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">La frecuencia de actualización (en minutos) a la que el servicio en segundo plano debe repetir el envío de datos.</string>
|
||||
<string id="WebhookId">(Solo lectura) El ID de Webhook creado por el dispositivo para actualizaciones del servicio en segundo plano. Es posible que necesite esto para la depuración.</string>
|
||||
</strings>
|
||||
|
@ -26,7 +26,7 @@
|
||||
<string id="NoInternet">Ingen internetanslutning</string>
|
||||
<string id="NoResponse">Inget svar, kontrollera internetanslutningen</string>
|
||||
<string id="NoAPIKey" scope="glance">Ingen API-nyckel i applikationsinställningarna</string>
|
||||
<string id="NoApiUrl" scope="glance">Ingen API-URL i programinställningarna</string>
|
||||
<string id="NoApiUrl" scope="glance">Ingen API-URL i applikationsinställningarna</string>
|
||||
<string id="NoConfigUrl" scope="glance">Ingen konfigurations-URL i programinställningarna</string>
|
||||
<string id="ApiFlood">API-anrop för snabba. Vänligen sakta ner dina förfrågningar.</string>
|
||||
<string id="ApiUrlNotFound">Webbadressen hittades inte. Potentiellt API-URL-fel i inställningarna.</string>
|
||||
@ -50,21 +50,16 @@
|
||||
<string id="SettingsApiUrl">URL för HomeAssistant API.</string>
|
||||
<string id="SettingsConfigUrl">URL för menykonfiguration (JSON).</string>
|
||||
<string id="SettingsCacheConfig">Ska programmet cachelagra menykonfigurationen?</string>
|
||||
<string id="SettingsClearCache">Ska applikationen rensa den befintliga cachen nästa gång
|
||||
satte igång?</string>
|
||||
<string id="SettingsAppTimeout">Timeout på sekunder. Avsluta ansökan efter denna period av
|
||||
inaktivitet för att spara enhetens batteri.</string>
|
||||
<string id="SettingsConfirmTimeout">Efter denna tid (i sekunder) visas en bekräftelsedialog för en
|
||||
åtgärden stängs automatiskt och åtgärden avbryts. Ställ in på 0 för att inaktivera timeout.</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 i sekunder. Avsluta programmet efter denna period av inaktivitet för att spara enhetens batteri.</string>
|
||||
<string id="SettingsPollDelay">Ytterligare fördröjning (i sekunder). Lägger till en fördröjning mellan statusuppdateringen av alla menyalternativ.</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>
|
||||
<string id="LeftToRight">Vänster till höger</string>
|
||||
<string id="RightToLeft">Höger till vänster</string>
|
||||
<string id="SettingsWidgetStart">(Endast widget) Starta programmet automatiskt från widgeten
|
||||
utan att vänta på ett tryck.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Aktivera bakgrundstjänsten för att skicka klockbatteriet
|
||||
nivå till Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Uppdateringshastigheten (i minuter) med vilken bakgrunden
|
||||
tjänsten bör upprepa sändningen av batterinivån.</string>
|
||||
<string id="WebhookId">(Endast läs) Webhook-ID som skapats av klockan för uppdateringar av batterinivån.
|
||||
Du kan behöva detta för felsökning.</string>
|
||||
<string id="SettingsWidgetStart">(Endast widget) Starta programmet automatiskt från widgeten utan att vänta på ett tryck.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Aktivera bakgrundstjänsten för att skicka enhetens batterinivå, plats och (om stöds) aktivitetsdata till Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Uppdateringshastigheten (i minuter) med vilken bakgrundstjänsten ska upprepa sändning av data.</string>
|
||||
<string id="WebhookId">(Endast läs) Webhook-ID som skapats av enheten för uppdateringar av bakgrundstjänster. Du kan behöva detta för felsökning.</string>
|
||||
</strings>
|
||||
|
@ -50,21 +50,16 @@
|
||||
<string id="SettingsApiUrl">URL สำหรับ HomeAssistant API</string>
|
||||
<string id="SettingsConfigUrl">URL สำหรับการกำหนดค่าเมนู (JSON)</string>
|
||||
<string id="SettingsCacheConfig">แอปพลิเคชันควรแคชการกำหนดค่าเมนูหรือไม่</string>
|
||||
<string id="SettingsClearCache">หากแอปพลิเคชันล้างแคชที่มีอยู่ในครั้งต่อไป
|
||||
เริ่ม?</string>
|
||||
<string id="SettingsAppTimeout">หมดเวลาเป็นวินาที ออกจากแอปพลิเคชันหลังจากช่วงเวลานี้
|
||||
ไม่มีการใช้งานเพื่อประหยัดแบตเตอรี่ของอุปกรณ์</string>
|
||||
<string id="SettingsConfirmTimeout">หลังจากเวลานี้ (เป็นวินาที) กล่องโต้ตอบการยืนยันสำหรับ
|
||||
การดำเนินการจะปิดโดยอัตโนมัติและการดำเนินการจะถูกยกเลิก ตั้งค่าเป็น 0 เพื่อปิดใช้งานการหมดเวลา</string>
|
||||
<string id="SettingsClearCache">แอปพลิเคชันควรล้างแคชที่มีอยู่ในครั้งถัดไปที่เริ่มทำงานหรือไม่</string>
|
||||
<string id="SettingsVibration">แอปพลิเคชันควรให้ข้อเสนอแนะผ่านการสั่นสะเทือนหรือไม่</string>
|
||||
<string id="SettingsAppTimeout">หมดเวลาเป็นวินาที ออกจากแอปพลิเคชันหลังจากไม่มีการใช้งานเป็นระยะเวลาหนึ่งเพื่อประหยัดแบตเตอรี่ของอุปกรณ์</string>
|
||||
<string id="SettingsPollDelay">ความล่าช้าในการโพลเพิ่มเติม (เป็นวินาที) เพิ่มการหน่วงเวลาระหว่างการอัพเดตสถานะของรายการเมนูทั้งหมด</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">เปิดใช้งานบริการพื้นหลังเพื่อส่งแบตเตอรี่นาฬิกา
|
||||
ระดับผู้ช่วยที่บ้าน</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">อัตรารีเฟรช (เป็นนาที) ที่พื้นหลัง
|
||||
บริการควรส่งระดับแบตเตอรี่ซ้ำ</string>
|
||||
<string id="WebhookId">(อ่านอย่างเดียว) Webhook ID ที่สร้างโดยนาฬิกาสำหรับการอัปเดตระดับแบตเตอรี่
|
||||
คุณอาจต้องการสิ่งนี้สำหรับการดีบัก</string>
|
||||
<string id="SettingsWidgetStart">(วิดเจ็ตเท่านั้น) เริ่มแอปพลิเคชันโดยอัตโนมัติจากวิดเจ็ตโดยไม่ต้องรอการแตะ</string>
|
||||
<string id="SettingsEnableBatteryLevel">เปิดใช้บริการพื้นหลังเพื่อส่งข้อมูลระดับแบตเตอรี่ ตำแหน่ง และข้อมูลกิจกรรม (หากรองรับ) ของอุปกรณ์ไปยัง Home Assistant</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">อัตรารีเฟรช (เป็นนาที) ที่บริการเบื้องหลังควรส่งข้อมูลซ้ำ</string>
|
||||
<string id="WebhookId">(อ่านอย่างเดียว) Webhook ID ที่สร้างโดยอุปกรณ์สำหรับการอัปเดตบริการในเบื้องหลัง คุณอาจต้องการสิ่งนี้สำหรับการดีบัก</string>
|
||||
</strings>
|
||||
|
@ -33,7 +33,7 @@
|
||||
<string id="ConfigUrlNotFound">URL bulunamadı. Ayarlarda Olası Yapılandırma URL'si hatası.</string>
|
||||
<string id="NoJson">HTTP isteğinden JSON döndürülmedi.</string>
|
||||
<string id="UnhandledHttpErr">HTTP isteği hata kodunu döndürdü =</string>
|
||||
<string id="TrailingSlashErr">API URL'sinin sonunda eğik çizgi '/' olmamalıdır</string>
|
||||
<string id="TrailingSlashErr">API URL'sinin sonunda '/' eğik çizgi olmamalıdır</string>
|
||||
<string id="WebhookFailed">Webhook kaydedilemedi</string>
|
||||
<string id="TemplateError">Şablon oluşturulamadı</string>
|
||||
<string id="Available" scope="glance">Mevcut</string>
|
||||
@ -50,21 +50,16 @@
|
||||
<string id="SettingsApiUrl">HomeAssistant API'sinin URL'si.</string>
|
||||
<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">Uygulamanın bir dahaki sefere mevcut önbelleği temizlemesi gerekir mi?
|
||||
başladı mı?</string>
|
||||
<string id="SettingsAppTimeout">Saniye cinsinden zaman aşımı. Bu süre sonunda uygulamadan çıkın
|
||||
cihazın pilinden tasarruf etmek için hareketsizlik.</string>
|
||||
<string id="SettingsConfirmTimeout">Bu sürenin sonunda (saniye cinsinden), bir onay iletişim kutusu
|
||||
işlem otomatik olarak kapatılır ve işlem iptal edilir. Zaman aşımını devre dışı bırakmak için 0'a ayarlayın.</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="SettingsPollDelay">Ek anket gecikmesi (saniye cinsinden). Tüm menü öğelerinin durum güncellemesi arasına bir gecikme ekler.</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>
|
||||
<string id="LeftToRight">Soldan sağa</string>
|
||||
<string id="RightToLeft">Sağdan sola</string>
|
||||
<string id="SettingsWidgetStart">(Yalnızca Widget) Uygulamayı widget'tan otomatik olarak başlat
|
||||
bir dokunuş beklemeden.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Saat pilini göndermek için arka plan hizmetini etkinleştirin
|
||||
seviyesini Ev Asistanı'na getirin.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Arka planın yenileme hızı (dakika cinsinden)
|
||||
Servis pil seviyesini göndermeyi tekrarlamalıdır.</string>
|
||||
<string id="WebhookId">(Salt okunur) Saatin pil seviyesi güncellemeleri için oluşturduğu Webhook Kimliği.
|
||||
Hata ayıklama için buna ihtiyacınız olabilir.</string>
|
||||
<string id="SettingsWidgetStart">(Yalnızca Widget) Dokunmayı beklemeden uygulamayı widget'tan otomatik olarak başlatın.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Cihazın pil seviyesini, konumunu ve (destekleniyorsa) etkinlik verilerini Home Assistant'a göndermek için arka plan hizmetini etkinleştirin.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Arka plan hizmetinin veri göndermeyi tekrarlaması gereken yenileme hızı (dakika cinsinden).</string>
|
||||
<string id="WebhookId">(Salt okunur) Arka plan hizmet güncellemeleri için cihaz tarafından oluşturulan Web Kancası Kimliği. Hata ayıklama için buna ihtiyacınız olabilir.</string>
|
||||
</strings>
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
<!--
|
||||
Generated by Google Translate: English to Ukrainian
|
||||
Створено Google Translate з англійської
|
||||
Згенеровано Google Translate з англійської
|
||||
-->
|
||||
|
||||
<strings>
|
||||
@ -48,23 +48,18 @@
|
||||
<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="SettingsAppTimeout">Час очікування в секундах. Вийдіть із програми після закінчення цього періоду
|
||||
бездіяльність, щоб зберегти акумулятор пристрою.</string>
|
||||
<string id="SettingsConfirmTimeout">Через цей час (у секундах) з’явиться діалогове вікно підтвердження для
|
||||
дія автоматично закривається, а дія скасовується. Встановіть 0, щоб вимкнути тайм-аут.</string>
|
||||
<string id="SettingsClearCache">Чи слід програмі очистити наявний кеш під час наступного запуску?</string>
|
||||
<string id="SettingsVibration">Чи має додаток надавати зворотній зв’язок за допомогою вібрації?</string>
|
||||
<string id="SettingsAppTimeout">Час очікування в секундах. Вийдіть із програми після цього періоду бездіяльності, щоб заощадити батарею пристрою.</string>
|
||||
<string id="SettingsPollDelay">Додаткова затримка опитування (у секундах). Додає затримку між оновленням статусу всіх пунктів меню.</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">Увімкніть фонову службу, щоб надіслати батарею годинника
|
||||
рівень до домашнього помічника.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Частота оновлення (у хвилинах), з якою працює фон
|
||||
служба має повторити надсилання рівня заряду батареї.</string>
|
||||
<string id="WebhookId">(Лише читання) Ідентифікатор Webhook, створений годинником для оновлення рівня заряду акумулятора.
|
||||
Це може знадобитися для налагодження.</string>
|
||||
<string id="SettingsWidgetStart">(Лише віджет) Автоматично запускайте програму з віджета, не чекаючи дотику.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Увімкніть фонову службу, щоб надсилати дані про рівень заряду акумулятора пристрою, місцезнаходження та (якщо підтримується) дані про діяльність до Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Частота оновлення (у хвилинах), з якою фонова служба має повторювати надсилання даних.</string>
|
||||
<string id="WebhookId">(Лише для читання) Ідентифікатор Webhook, створений пристроєм для фонового оновлення служби. Це може знадобитися для налагодження.</string>
|
||||
</strings>
|
||||
|
@ -50,21 +50,16 @@
|
||||
<string id="SettingsApiUrl">URL cho API HomeAssistant.</string>
|
||||
<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 tiếp theo không
|
||||
đã bắt đầu?</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 này
|
||||
không hoạt động để tiết kiệm pin 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
|
||||
hành động được tự động đóng lại và hành động bị hủy bỏ. Đặt thành 0 để tắt thời gian chờ.</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="SettingsPollDelay">Độ trễ thăm dò bổ sung (tính bằng giây). Thêm độ trễ giữa việc cập nhật trạng thái của tất cả các mục menu.</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>
|
||||
<string id="LeftToRight">Trái sang phải</string>
|
||||
<string id="RightToLeft">Phải sang trái</string>
|
||||
<string id="SettingsWidgetStart">(Chỉ widget) Tự động khởi động ứng dụng từ widget
|
||||
mà không cần chờ một cú chạm.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Kích hoạt dịch vụ nền để gửi pin đồng hồ
|
||||
lên cấp Trợ lý tại nhà.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Tốc độ làm mới (tính bằng phút) mà nền
|
||||
dịch vụ sẽ lặp lại việc gửi mức pin.</string>
|
||||
<string id="WebhookId">(Chỉ đọc) ID Webhook do đồng hồ tạo để cập nhật mức pin.
|
||||
Bạn có thể yêu cầu điều này để gỡ lỗi.</string>
|
||||
<string id="SettingsWidgetStart">(Chỉ tiện ích) Tự động khởi động ứng dụng từ tiện ích mà không cần chờ nhấn.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Bật dịch vụ nền để gửi dữ liệu về mức pin, vị trí và hoạt động (nếu được hỗ trợ) của thiết bị tới Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Tốc độ làm mới (tính bằng phút) mà dịch vụ nền sẽ lặp lại việc gửi dữ liệu.</string>
|
||||
<string id="WebhookId">(Chỉ đọc) ID Webhook do thiết bị tạo để cập nhật dịch vụ nền. Bạn có thể yêu cầu điều này để gỡ lỗi.</string>
|
||||
</strings>
|
||||
|
@ -50,21 +50,16 @@
|
||||
<string id="SettingsApiUrl">HomeAssistant API 的 URL。</string>
|
||||
<string id="SettingsConfigUrl">菜单配置的 URL (JSON)。</string>
|
||||
<string id="SettingsCacheConfig">应用程序是否应该缓存菜单配置?</string>
|
||||
<string id="SettingsClearCache">应用程序下次是否应该清除现有缓存
|
||||
开始了?</string>
|
||||
<string id="SettingsAppTimeout">超时(以秒为单位)。在此期限后退出应用程序
|
||||
不活动以节省设备电池。</string>
|
||||
<string id="SettingsConfirmTimeout">在此时间(以秒为单位)之后,将出现一个确认对话框
|
||||
动作自动关闭并取消动作。设置为 0 以禁用超时。</string>
|
||||
<string id="SettingsClearCache">应用程序是否应该在下次启动时清除现有缓存?</string>
|
||||
<string id="SettingsVibration">应用程序是否应该通过振动提供反馈?</string>
|
||||
<string id="SettingsAppTimeout">超时(以秒为单位)。闲置一段时间后退出应用程序以节省设备电池。</string>
|
||||
<string id="SettingsPollDelay">额外的轮询延迟(以秒为单位)。在所有菜单项的状态更新之间添加延迟。</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">启用后台服务发送时钟电池
|
||||
级别为家庭助理。</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">背景的刷新率(以分钟为单位)
|
||||
服务应重复发送电池电量。</string>
|
||||
<string id="WebhookId">(只读)手表创建的用于电池电量更新的 Webhook ID。
|
||||
您可能需要它来进行调试。</string>
|
||||
<string id="SettingsWidgetStart">(仅限小部件)从小部件自动启动应用程序,无需等待点击。</string>
|
||||
<string id="SettingsEnableBatteryLevel">启用后台服务将设备电池电量、位置和(如果支持)活动数据发送到 Home Assistant。</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">后台服务应重复发送数据的刷新率(以分钟为单位)。</string>
|
||||
<string id="WebhookId">(只读)设备为后台服务更新创建的 Webhook ID。您可能需要它来进行调试。</string>
|
||||
</strings>
|
||||
|
@ -50,21 +50,16 @@
|
||||
<string id="SettingsApiUrl">HomeAssistant API 的 URL。</string>
|
||||
<string id="SettingsConfigUrl">選單配置的 URL (JSON)。</string>
|
||||
<string id="SettingsCacheConfig">應用程式是否應該快取選單配置?</string>
|
||||
<string id="SettingsClearCache">應用程式下次是否應該清除現有緩存
|
||||
開始了?</string>
|
||||
<string id="SettingsAppTimeout">超時(以秒為單位)。在此期限後退出應用程式
|
||||
不活動以節省設備電池。</string>
|
||||
<string id="SettingsConfirmTimeout">在此時間(以秒為單位)之後,將出現一個確認對話框
|
||||
動作自動關閉並取消動作。設定為 0 以停用逾時。</string>
|
||||
<string id="SettingsClearCache">應用程式是否應該在下次啟動時清除現有快取?</string>
|
||||
<string id="SettingsVibration">應用程式是否應該透過振動提供回饋?</string>
|
||||
<string id="SettingsAppTimeout">超時(以秒為單位)。閒置一段時間後退出應用程式以節省設備電池。</string>
|
||||
<string id="SettingsPollDelay">額外的輪詢延遲(以秒為單位)。在所有選單項目的狀態更新之間新增延遲。</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">啟用後台服務發送時鐘電池
|
||||
級別為家庭助理。</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">背景的刷新率(以分鐘為單位)
|
||||
服務應重複發送電池電量。</string>
|
||||
<string id="WebhookId">(唯讀)手錶創建的用於電池電量更新的 Webhook ID。
|
||||
您可能需要它來進行調試。</string>
|
||||
<string id="SettingsWidgetStart">(僅限小部件)從小部件自動啟動應用程序,無需等待點擊。</string>
|
||||
<string id="SettingsEnableBatteryLevel">啟用後台服務將裝置電池電量、位置和(如果支援)活動資料傳送至 Home Assistant。</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">後台服務應重複傳送資料的更新率(以分鐘為單位)。</string>
|
||||
<string id="WebhookId">(唯讀)裝置為後台服務更新所建立的 Webhook ID。您可能需要它來進行調試。</string>
|
||||
</strings>
|
||||
|
@ -50,21 +50,16 @@
|
||||
<string id="SettingsApiUrl">URL untuk API HomeAssistant.</string>
|
||||
<string id="SettingsConfigUrl">URL untuk konfigurasi menu (JSON).</string>
|
||||
<string id="SettingsCacheConfig">Sekiranya aplikasi cache konfigurasi menu?</string>
|
||||
<string id="SettingsClearCache">Sekiranya aplikasi mengosongkan cache sedia ada pada masa akan datang
|
||||
bermula?</string>
|
||||
<string id="SettingsAppTimeout">Tamat masa dalam beberapa saat. Keluar dari permohonan selepas tempoh ini
|
||||
tidak aktif untuk menjimatkan bateri peranti.</string>
|
||||
<string id="SettingsConfirmTimeout">Selepas masa ini (dalam saat), dialog pengesahan untuk a
|
||||
tindakan ditutup secara automatik dan tindakan itu dibatalkan. Tetapkan kepada 0 untuk melumpuhkan tamat masa.</string>
|
||||
<string id="SettingsClearCache">Patutkah aplikasi mengosongkan cache sedia ada pada kali seterusnya ia dimulakan?</string>
|
||||
<string id="SettingsVibration">Sekiranya 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="SettingsPollDelay">Kelewatan tinjauan pendapat tambahan (dalam beberapa saat). Menambah kelewatan antara kemas kini status semua item menu.</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>
|
||||
<string id="LeftToRight">Kiri ke kanan</string>
|
||||
<string id="RightToLeft">Kanan ke kiri</string>
|
||||
<string id="SettingsWidgetStart">(Widget sahaja) Mulakan aplikasi secara automatik daripada widget
|
||||
tanpa menunggu ketuk.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Dayakan perkhidmatan latar belakang untuk menghantar bateri jam
|
||||
tahap kepada Pembantu Rumah.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Kadar muat semula (dalam minit) di mana latar belakang
|
||||
perkhidmatan harus berulang menghantar paras bateri.</string>
|
||||
<string id="WebhookId">(Baca sahaja) ID Webhook yang dibuat oleh jam tangan untuk kemas kini tahap bateri.
|
||||
Anda mungkin memerlukan ini untuk penyahpepijatan.</string>
|
||||
<string id="SettingsWidgetStart">(Widget sahaja) Mulakan aplikasi secara automatik daripada widget tanpa menunggu satu ketikan.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Dayakan perkhidmatan latar belakang untuk menghantar data paras bateri peranti, lokasi dan (jika disokong) kepada Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Kadar penyegaran semula (dalam minit) di mana perkhidmatan latar belakang harus mengulangi penghantaran data.</string>
|
||||
<string id="WebhookId">(Baca sahaja) ID Webhook yang dibuat oleh peranti untuk kemas kini perkhidmatan latar belakang. Anda mungkin memerlukan ini untuk penyahpepijatan.</string>
|
||||
</strings>
|
||||
|
@ -22,32 +22,46 @@
|
||||
<property id="api_url" type="string"></property>
|
||||
|
||||
<!--
|
||||
Best be a public URL in order to work away from your
|
||||
home LAN and have a trusted HTTPS certificate
|
||||
Best be a public URL in order to work away from your home LAN and have a
|
||||
trusted HTTPS certificate.
|
||||
-->
|
||||
<property id="config_url" type="string"></property>
|
||||
|
||||
<!-- Decide if the menu configuration should be cached. -->
|
||||
<!--
|
||||
Decide if the menu configuration should be cached.
|
||||
-->
|
||||
<property id="cache_config" type="boolean">false</property>
|
||||
|
||||
<!--
|
||||
Clear the menu configuration on next application start,
|
||||
and refetch, then set this back to false
|
||||
Clear the menu configuration on next application start, and refetch, then
|
||||
set this back to false.
|
||||
-->
|
||||
<property id="clear_cache" type="boolean">false</property>
|
||||
|
||||
<!--
|
||||
Application timeout in seconds, except 0 for no
|
||||
timeout (default). After this amount of elapsed
|
||||
time with no activity, exit the application.
|
||||
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 time with no activity, exit the application.
|
||||
-->
|
||||
<property id="app_timeout" type="number">0</property>
|
||||
|
||||
<!--
|
||||
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.
|
||||
The default value is 3 seconds.
|
||||
Poll delay adds a user configurable delay (in seconds) to each round of
|
||||
status updates of all item in the device's menu that might be amended
|
||||
externally from the watch. A user has requested that it is possible to add
|
||||
this delayfor an "always open" mode of operation, which then drains the
|
||||
watch battery from the additional API access activity.
|
||||
-->
|
||||
<property id="poll_delay" type="number">0</property>
|
||||
|
||||
<!--
|
||||
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. The default value is 3 seconds.
|
||||
-->
|
||||
<property id="confirm_timeout" type="number">3</property>
|
||||
|
||||
@ -57,15 +71,8 @@
|
||||
<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.
|
||||
Enable the background service to send the clock battery level to Home
|
||||
Assistant.
|
||||
-->
|
||||
<property id="enable_battery_level" type="boolean">false</property>
|
||||
|
||||
@ -76,11 +83,10 @@
|
||||
<property id="battery_level_refresh_rate" type="number">15</property>
|
||||
|
||||
<!--
|
||||
The webhook ID is the last part of the webhook URL.
|
||||
It is secret and should not be shared.
|
||||
It will not be set in settings but will be
|
||||
generated by the application and stored in
|
||||
properties, but read only for trouble shooting.
|
||||
The webhook ID is the last part of the webhook URL. It is secret and
|
||||
should not be shared. It will not be set in settings but will be
|
||||
generated by the application and stored in properties, but read only
|
||||
for trouble shooting.
|
||||
-->
|
||||
<property id="webhook_id" type="string"></property>
|
||||
|
||||
|
@ -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"
|
||||
@ -58,6 +65,13 @@
|
||||
<settingConfig type="numeric" min="0" />
|
||||
</setting>
|
||||
|
||||
<setting
|
||||
propertyKey="@Properties.poll_delay"
|
||||
title="@Strings.SettingsPollDelay"
|
||||
>
|
||||
<settingConfig type="numeric" min="0" />
|
||||
</setting>
|
||||
|
||||
<setting
|
||||
propertyKey="@Properties.confirm_timeout"
|
||||
title="@Strings.SettingsConfirmTimeout"
|
||||
@ -75,13 +89,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"
|
||||
|
@ -45,21 +45,16 @@
|
||||
<string id="SettingsApiUrl">URL for HomeAssistant API.</string>
|
||||
<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="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="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="SettingsPollDelay">Additional poll delay (in seconds). Adds a delay between the status update of all menu items.</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>
|
||||
<string id="LeftToRight">Left to right</string>
|
||||
<string id="RightToLeft">Right to Left</string>
|
||||
<string id="SettingsWidgetStart">(Widget only) Automatically start the application from the widget
|
||||
without waiting for a tap.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Enable the background service to send the clock battery
|
||||
level to Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">The refresh rate (in minutes) at which the background
|
||||
service should repeat sending the battery level.</string>
|
||||
<string id="WebhookId">(Read only) The Webhook ID created by the watch for battery level updates.
|
||||
You might require this for debugging.</string>
|
||||
<string id="SettingsWidgetStart">(Widget only) Automatically start the application from the widget without waiting for a tap.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Enable the background service to send the device battery level, location and (if supported) activity data to Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">The refresh rate (in minutes) at which the background service should repeat sending data.</string>
|
||||
<string id="WebhookId">(Read only) The Webhook ID created by the device for background service updates. You might require this for debugging.</string>
|
||||
</strings>
|
||||
|
@ -32,45 +32,109 @@ class BackgroundServiceDelegate extends System.ServiceDelegate {
|
||||
}
|
||||
|
||||
function onReturnBatteryUpdate(responseCode as Lang.Number, data as Null or Lang.Dictionary or Lang.String) as Void {
|
||||
if (Globals.scDebug) {
|
||||
System.println("BackgroundServiceDelegate onReturnBatteryUpdate() Response Code: " + responseCode);
|
||||
System.println("BackgroundServiceDelegate onReturnBatteryUpdate() Response Data: " + data);
|
||||
}
|
||||
// System.println("BackgroundServiceDelegate onReturnBatteryUpdate() Response Code: " + responseCode);
|
||||
// System.println("BackgroundServiceDelegate onReturnBatteryUpdate() Response Data: " + data);
|
||||
Background.exit(null);
|
||||
}
|
||||
|
||||
function onTemporalEvent() as Void {
|
||||
if (! System.getDeviceSettings().phoneConnected) {
|
||||
if (Globals.scDebug) {
|
||||
System.println("BackgroundServiceDelegate onTemporalEvent(): No Phone connection, skipping API call.");
|
||||
}
|
||||
} else if (! System.getDeviceSettings().connectionAvailable) {
|
||||
if (Globals.scDebug) {
|
||||
System.println("BackgroundServiceDelegate onTemporalEvent(): No Internet connection, skipping API call.");
|
||||
}
|
||||
if (!System.getDeviceSettings().phoneConnected) {
|
||||
// System.println("BackgroundServiceDelegate onTemporalEvent(): No Phone connection, skipping API call.");
|
||||
} else if (!System.getDeviceSettings().connectionAvailable) {
|
||||
// System.println("BackgroundServiceDelegate onTemporalEvent(): No Internet connection, skipping API call.");
|
||||
} else {
|
||||
// System.println("BackgroundServiceDelegate onTemporalEvent(): Making API call.");
|
||||
var position = Position.getInfo();
|
||||
// System.println("BackgroundServiceDelegate onTemporalEvent(): gps: " + position.position.toDegrees());
|
||||
// System.println("BackgroundServiceDelegate onTemporalEvent(): speed: " + position.speed);
|
||||
// System.println("BackgroundServiceDelegate onTemporalEvent(): course: " + position.heading + "rad (" + (position.heading * 180 / Math.PI) + "°)");
|
||||
// System.println("BackgroundServiceDelegate onTemporalEvent(): altitude: " + position.altitude);
|
||||
// System.println("BackgroundServiceDelegate onTemporalEvent(): battery: " + System.getSystemStats().battery);
|
||||
// System.println("BackgroundServiceDelegate onTemporalEvent(): charging: " + System.getSystemStats().charging);
|
||||
// System.println("BackgroundServiceDelegate onTemporalEvent(): activity: " + Activity.getProfileInfo().name);
|
||||
|
||||
// Don't use Settings.* here as the object lasts < 30 secs and is recreated each time the background service is run
|
||||
|
||||
if (position.accuracy != Position.QUALITY_NOT_AVAILABLE && position.accuracy != Position.QUALITY_LAST_KNOWN) {
|
||||
var accuracy = 0;
|
||||
switch (position.accuracy) {
|
||||
case Position.QUALITY_POOR:
|
||||
accuracy = 500;
|
||||
break;
|
||||
case Position.QUALITY_USABLE:
|
||||
accuracy = 100;
|
||||
break;
|
||||
case Position.QUALITY_GOOD:
|
||||
accuracy = 10;
|
||||
break;
|
||||
}
|
||||
Communications.makeWebRequest(
|
||||
(Properties.getValue("api_url") as Lang.String) + "/webhook/" + (Properties.getValue("webhook_id") as Lang.String),
|
||||
{
|
||||
"type" => "update_location",
|
||||
"data" => {
|
||||
"gps" => position.position.toDegrees(),
|
||||
"gps_accuracy" => accuracy,
|
||||
"speed" => Math.round(position.speed),
|
||||
"course" => Math.round(position.heading * 180 / Math.PI),
|
||||
"altitude" => Math.round(position.altitude),
|
||||
}
|
||||
},
|
||||
{
|
||||
:method => Communications.HTTP_REQUEST_METHOD_POST,
|
||||
:headers => {
|
||||
"Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON
|
||||
},
|
||||
:responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON
|
||||
},
|
||||
method(:onReturnBatteryUpdate)
|
||||
);
|
||||
}
|
||||
var data = [
|
||||
{
|
||||
"state" => System.getSystemStats().battery,
|
||||
"type" => "sensor",
|
||||
"unique_id" => "battery_level"
|
||||
},
|
||||
{
|
||||
"state" => System.getSystemStats().charging,
|
||||
"type" => "binary_sensor",
|
||||
"unique_id" => "battery_is_charging"
|
||||
}
|
||||
];
|
||||
if ((Activity has :getActivityInfo) and (Activity has :getProfileInfo)) {
|
||||
var activity = Activity.getProfileInfo().sport;
|
||||
var sub_activity = Activity.getProfileInfo().subSport;
|
||||
// We need to check if we are actually tracking any activity as the enumerated type does not include "No Sport".
|
||||
if ((Activity.getActivityInfo() != null) and
|
||||
((Activity.getActivityInfo().elapsedTime == null) or
|
||||
(Activity.getActivityInfo().elapsedTime == 0))) {
|
||||
// Indicate no activity with -1, not part of Garmin's activity codes.
|
||||
// https://developer.garmin.com/connect-iq/api-docs/Toybox/Activity.html#Sport-module
|
||||
activity = -1;
|
||||
sub_activity = -1;
|
||||
}
|
||||
data.add({
|
||||
"state" => activity,
|
||||
"type" => "sensor",
|
||||
"unique_id" => "activity"
|
||||
});
|
||||
data.add({
|
||||
"state" => sub_activity,
|
||||
"type" => "sensor",
|
||||
"unique_id" => "sub_activity"
|
||||
});
|
||||
}
|
||||
Communications.makeWebRequest(
|
||||
(Properties.getValue("api_url") as Lang.String) + "/webhook/" + (Properties.getValue("webhook_id") as Lang.String),
|
||||
{
|
||||
"type" => "update_sensor_states",
|
||||
"data" => [
|
||||
{
|
||||
"state" => System.getSystemStats().battery,
|
||||
"type" => "sensor",
|
||||
"unique_id" => "battery_level"
|
||||
},
|
||||
{
|
||||
"state" => System.getSystemStats().charging,
|
||||
"type" => "binary_sensor",
|
||||
"unique_id" => "battery_is_charging"
|
||||
}
|
||||
]
|
||||
"data" => data
|
||||
},
|
||||
{
|
||||
:method => Communications.HTTP_REQUEST_METHOD_POST,
|
||||
:headers => {
|
||||
"Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON
|
||||
"Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON
|
||||
},
|
||||
:responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON
|
||||
},
|
||||
|
@ -22,9 +22,6 @@ using Toybox.Lang;
|
||||
|
||||
(:glance)
|
||||
class Globals {
|
||||
// Enable printing of messages to the debug console (don't make this a Property
|
||||
// as the messages can't be read from a watch!)
|
||||
static const scDebug = false;
|
||||
static const scAlertTimeout = 2000; // ms
|
||||
static const scTapTimeout = 1000; // ms
|
||||
// Time to let the existing HTTP responses get serviced after a
|
||||
@ -34,5 +31,5 @@ class Globals {
|
||||
// an ErrorView.
|
||||
static const scApiResume = 200; // ms
|
||||
// Warn the user after fetching the menu if their watch is low on memory before the device crashes.
|
||||
static const scLowMem = 0.95; // percent as a fraction.
|
||||
static const scLowMem = 0.90; // percent as a fraction.
|
||||
}
|
||||
|
@ -31,9 +31,11 @@ class HomeAssistantApp extends Application.AppBase {
|
||||
private var mMenuStatus as Lang.String or Null;
|
||||
private var mHaMenu as HomeAssistantView or Null;
|
||||
private var mQuitTimer as QuitTimer or Null;
|
||||
private var mTimer as Timer.Timer or Null;
|
||||
private var mItemsToUpdate as Lang.Array<HomeAssistantToggleMenuItem or HomeAssistantTemplateMenuItem> or Null; // Array initialised by onReturnFetchMenuConfig()
|
||||
private var mNextItemToUpdate as Lang.Number = 0; // Index into the above array
|
||||
private var mGlanceTimer as Timer.Timer or Null;
|
||||
private var mUpdateTimer as Timer.Timer or Null;
|
||||
// Array initialised by onReturnFetchMenuConfig()
|
||||
private var mItemsToUpdate as Lang.Array<HomeAssistantToggleMenuItem or HomeAssistantTemplateMenuItem> or Null;
|
||||
private var mNextItemToUpdate as Lang.Number = 0; // Index into the above array
|
||||
private var mIsGlance as Lang.Boolean = false;
|
||||
private var mIsApp as Lang.Boolean = false; // Or Widget
|
||||
|
||||
@ -86,54 +88,38 @@ class HomeAssistantApp extends Application.AppBase {
|
||||
|
||||
// Return the initial view of your application here
|
||||
function getInitialView() as Lang.Array<WatchUi.Views or WatchUi.InputDelegates>? {
|
||||
mIsApp = true;
|
||||
mQuitTimer = new QuitTimer();
|
||||
RezStrings.update();
|
||||
mApiStatus = RezStrings.getChecking();
|
||||
mMenuStatus = RezStrings.getChecking();
|
||||
mIsApp = true;
|
||||
mQuitTimer = new QuitTimer();
|
||||
mUpdateTimer = new Timer.Timer();
|
||||
mApiStatus = WatchUi.loadResource($.Rez.Strings.Checking) as Lang.String;
|
||||
mMenuStatus = WatchUi.loadResource($.Rez.Strings.Checking) as Lang.String;
|
||||
Settings.update();
|
||||
|
||||
if (Settings.getApiKey().length() == 0) {
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantApp getInitialView(): No API key in the application Settings.");
|
||||
}
|
||||
return ErrorView.create(RezStrings.getNoApiKey() + ".");
|
||||
// System.println("HomeAssistantApp getInitialView(): No API key in the application Settings.");
|
||||
return ErrorView.create(WatchUi.loadResource($.Rez.Strings.NoAPIKey) as Lang.String + ".");
|
||||
} else if (Settings.getApiUrl().length() == 0) {
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantApp getInitialView(): No API URL in the application Settings.");
|
||||
}
|
||||
return ErrorView.create(RezStrings.getNoApiUrl() + ".");
|
||||
// System.println("HomeAssistantApp getInitialView(): No API URL in the application Settings.");
|
||||
return ErrorView.create(WatchUi.loadResource($.Rez.Strings.NoApiUrl) as Lang.String + ".");
|
||||
} else if (Settings.getApiUrl().substring(-1, Settings.getApiUrl().length()).equals("/")) {
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantApp getInitialView(): API URL must not have a trailing slash '/'.");
|
||||
}
|
||||
return ErrorView.create(RezStrings.getTrailingSlashErr() + ".");
|
||||
// System.println("HomeAssistantApp getInitialView(): API URL must not have a trailing slash '/'.");
|
||||
return ErrorView.create(WatchUi.loadResource($.Rez.Strings.TrailingSlashErr) as Lang.String + ".");
|
||||
} else if (Settings.getConfigUrl().length() == 0) {
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantApp getInitialView(): No configuration URL in the application settings.");
|
||||
}
|
||||
return ErrorView.create(RezStrings.getNoConfigUrl() + ".");
|
||||
// System.println("HomeAssistantApp getInitialView(): No configuration URL in the application settings.");
|
||||
return ErrorView.create(WatchUi.loadResource($.Rez.Strings.NoConfigUrl) as Lang.String + ".");
|
||||
} else if (! System.getDeviceSettings().phoneConnected) {
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantApp fetchMenuConfig(): No Phone connection, skipping API call.");
|
||||
}
|
||||
return ErrorView.create(RezStrings.getNoPhone() + ".");
|
||||
// System.println("HomeAssistantApp fetchMenuConfig(): No Phone connection, skipping API call.");
|
||||
return ErrorView.create(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String + ".");
|
||||
} else if (! System.getDeviceSettings().connectionAvailable) {
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantApp fetchMenuConfig(): No Internet connection, skipping API call.");
|
||||
}
|
||||
return ErrorView.create(RezStrings.getNoInternet() + ".");
|
||||
// System.println("HomeAssistantApp fetchMenuConfig(): No Internet connection, skipping API call.");
|
||||
return ErrorView.create(WatchUi.loadResource($.Rez.Strings.NoInternet) as Lang.String + ".");
|
||||
} 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>;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -142,80 +128,72 @@ class HomeAssistantApp extends Application.AppBase {
|
||||
//
|
||||
(:glance)
|
||||
function onReturnFetchMenuConfig(responseCode as Lang.Number, data as Null or Lang.Dictionary or Lang.String) as Void {
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantApp onReturnFetchMenuConfig() Response Code: " + responseCode);
|
||||
System.println("HomeAssistantApp onReturnFetchMenuConfig() Response Data: " + data);
|
||||
}
|
||||
// System.println("HomeAssistantApp onReturnFetchMenuConfig() Response Code: " + responseCode);
|
||||
// System.println("HomeAssistantApp onReturnFetchMenuConfig() Response Data: " + data);
|
||||
|
||||
mMenuStatus = RezStrings.getUnavailable();
|
||||
mMenuStatus = WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String;
|
||||
switch (responseCode) {
|
||||
case Communications.BLE_HOST_TIMEOUT:
|
||||
case Communications.BLE_CONNECTION_UNAVAILABLE:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantApp onReturnFetchMenuConfig() Response Code: BLE_HOST_TIMEOUT or BLE_CONNECTION_UNAVAILABLE, Bluetooth connection severed.");
|
||||
}
|
||||
// System.println("HomeAssistantApp onReturnFetchMenuConfig() Response Code: BLE_HOST_TIMEOUT or BLE_CONNECTION_UNAVAILABLE, Bluetooth connection severed.");
|
||||
if (!mIsGlance) {
|
||||
ErrorView.show(RezStrings.getNoPhone() + ".");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String + ".");
|
||||
}
|
||||
break;
|
||||
|
||||
case Communications.BLE_QUEUE_FULL:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantApp onReturnFetchMenuConfig() Response Code: BLE_QUEUE_FULL, API calls too rapid.");
|
||||
}
|
||||
// System.println("HomeAssistantApp onReturnFetchMenuConfig() Response Code: BLE_QUEUE_FULL, API calls too rapid.");
|
||||
if (!mIsGlance) {
|
||||
ErrorView.show(RezStrings.getApiFlood());
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.ApiFlood) as Lang.String);
|
||||
}
|
||||
break;
|
||||
|
||||
case Communications.NETWORK_REQUEST_TIMED_OUT:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantApp onReturnFetchMenuConfig() Response Code: NETWORK_REQUEST_TIMED_OUT, check Internet connection.");
|
||||
}
|
||||
// System.println("HomeAssistantApp onReturnFetchMenuConfig() Response Code: NETWORK_REQUEST_TIMED_OUT, check Internet connection.");
|
||||
if (!mIsGlance) {
|
||||
ErrorView.show(RezStrings.getNoResponse());
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoResponse) as Lang.String);
|
||||
}
|
||||
break;
|
||||
|
||||
case Communications.INVALID_HTTP_BODY_IN_NETWORK_RESPONSE:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantApp onReturnFetchMenuConfig() Response Code: INVALID_HTTP_BODY_IN_NETWORK_RESPONSE, check JSON is returned.");
|
||||
}
|
||||
// System.println("HomeAssistantApp onReturnFetchMenuConfig() Response Code: INVALID_HTTP_BODY_IN_NETWORK_RESPONSE, check JSON is returned.");
|
||||
if (!mIsGlance) {
|
||||
ErrorView.show(RezStrings.getNoJson());
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoJson) as Lang.String);
|
||||
}
|
||||
break;
|
||||
|
||||
case 404:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantApp onReturnFetchMenuConfig() Response Code: 404, page not found. Check Configuration URL setting.");
|
||||
}
|
||||
// System.println("HomeAssistantApp onReturnFetchMenuConfig() Response Code: 404, page not found. Check Configuration URL setting.");
|
||||
if (!mIsGlance) {
|
||||
ErrorView.show(RezStrings.getConfigUrlNotFound());
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.ConfigUrlNotFound) as Lang.String);
|
||||
}
|
||||
break;
|
||||
|
||||
case 200:
|
||||
if (Settings.getCacheConfig()) {
|
||||
Storage.setValue("menu", data as Lang.Dictionary);
|
||||
mMenuStatus = RezStrings.getCached();
|
||||
if (data == null) {
|
||||
mMenuStatus = WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String;
|
||||
} else {
|
||||
mMenuStatus = RezStrings.getAvailable();
|
||||
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);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantApp onReturnFetchMenuConfig(): Unhandled HTTP response code = " + responseCode);
|
||||
}
|
||||
// System.println("HomeAssistantApp onReturnFetchMenuConfig(): Unhandled HTTP response code = " + responseCode);
|
||||
if (!mIsGlance) {
|
||||
ErrorView.show(RezStrings.getUnhandledHttpErr() + responseCode);
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.UnhandledHttpErr) as Lang.String + responseCode);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -227,36 +205,32 @@ class HomeAssistantApp extends Application.AppBase {
|
||||
(:glance)
|
||||
function fetchMenuConfig() as Lang.Boolean {
|
||||
if (Settings.getConfigUrl().equals("")) {
|
||||
mMenuStatus = RezStrings.getUnconfigured();
|
||||
mMenuStatus = WatchUi.loadResource($.Rez.Strings.Unconfigured) as Lang.String;
|
||||
WatchUi.requestUpdate();
|
||||
} else {
|
||||
var menu = Storage.getValue("menu") as Lang.Dictionary;
|
||||
if (menu != null and Settings.getClearCache()) {
|
||||
if (menu != null and (Settings.getClearCache() || !Settings.getCacheConfig())) {
|
||||
Storage.deleteValue("menu");
|
||||
menu = null;
|
||||
Settings.unsetClearCache();
|
||||
}
|
||||
if (menu == null) {
|
||||
if (! System.getDeviceSettings().phoneConnected) {
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantToggleMenuItem getState(): No Phone connection, skipping API call.");
|
||||
}
|
||||
// System.println("HomeAssistantApp getState(): No Phone connection, skipping API call.");
|
||||
if (mIsGlance) {
|
||||
WatchUi.requestUpdate();
|
||||
} else {
|
||||
ErrorView.show(RezStrings.getNoPhone() + ".");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String + ".");
|
||||
}
|
||||
mMenuStatus = RezStrings.getUnavailable();
|
||||
mMenuStatus = WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String;
|
||||
} else if (! System.getDeviceSettings().connectionAvailable) {
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantToggleMenuItem getState(): No Internet connection, skipping API call.");
|
||||
}
|
||||
// System.println("HomeAssistantApp getState(): No Internet connection, skipping API call.");
|
||||
if (mIsGlance) {
|
||||
WatchUi.requestUpdate();
|
||||
} else {
|
||||
ErrorView.show(RezStrings.getNoInternet() + ".");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoInternet) as Lang.String + ".");
|
||||
}
|
||||
mMenuStatus = RezStrings.getUnavailable();
|
||||
mMenuStatus = WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String;
|
||||
} else {
|
||||
Communications.makeWebRequest(
|
||||
Settings.getConfigUrl(),
|
||||
@ -269,7 +243,7 @@ class HomeAssistantApp extends Application.AppBase {
|
||||
);
|
||||
}
|
||||
} else {
|
||||
mMenuStatus = RezStrings.getCached();
|
||||
mMenuStatus = WatchUi.loadResource($.Rez.Strings.Cached) as Lang.String;
|
||||
WatchUi.requestUpdate();
|
||||
if (!mIsGlance) {
|
||||
buildMenu(menu);
|
||||
@ -283,17 +257,11 @@ 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.
|
||||
if (mItemsToUpdate.size() > 0) {
|
||||
updateNextMenuItem();
|
||||
updateNextMenuItemInternal();
|
||||
}
|
||||
}
|
||||
|
||||
@ -301,56 +269,44 @@ class HomeAssistantApp extends Application.AppBase {
|
||||
//
|
||||
(:glance)
|
||||
function onReturnFetchApiStatus(responseCode as Lang.Number, data as Null or Lang.Dictionary or Lang.String) as Void {
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantApp onReturnFetchApiStatus() Response Code: " + responseCode);
|
||||
System.println("HomeAssistantApp onReturnFetchApiStatus() Response Data: " + data);
|
||||
}
|
||||
// System.println("HomeAssistantApp onReturnFetchApiStatus() Response Code: " + responseCode);
|
||||
// System.println("HomeAssistantApp onReturnFetchApiStatus() Response Data: " + data);
|
||||
|
||||
mApiStatus = RezStrings.getUnavailable();
|
||||
mApiStatus = WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String;
|
||||
switch (responseCode) {
|
||||
case Communications.BLE_HOST_TIMEOUT:
|
||||
case Communications.BLE_CONNECTION_UNAVAILABLE:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantApp onReturnFetchApiStatus() Response Code: BLE_HOST_TIMEOUT or BLE_CONNECTION_UNAVAILABLE, Bluetooth connection severed.");
|
||||
}
|
||||
// System.println("HomeAssistantApp onReturnFetchApiStatus() Response Code: BLE_HOST_TIMEOUT or BLE_CONNECTION_UNAVAILABLE, Bluetooth connection severed.");
|
||||
if (!mIsGlance) {
|
||||
ErrorView.show(RezStrings.getNoPhone() + ".");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String + ".");
|
||||
}
|
||||
break;
|
||||
|
||||
case Communications.BLE_QUEUE_FULL:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantApp onReturnFetchApiStatus() Response Code: BLE_QUEUE_FULL, API calls too rapid.");
|
||||
}
|
||||
// System.println("HomeAssistantApp onReturnFetchApiStatus() Response Code: BLE_QUEUE_FULL, API calls too rapid.");
|
||||
if (!mIsGlance) {
|
||||
ErrorView.show(RezStrings.getApiFlood());
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.ApiFlood) as Lang.String);
|
||||
}
|
||||
break;
|
||||
|
||||
case Communications.NETWORK_REQUEST_TIMED_OUT:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantApp onReturnFetchApiStatus() Response Code: NETWORK_REQUEST_TIMED_OUT, check Internet connection.");
|
||||
}
|
||||
// System.println("HomeAssistantApp onReturnFetchApiStatus() Response Code: NETWORK_REQUEST_TIMED_OUT, check Internet connection.");
|
||||
if (!mIsGlance) {
|
||||
ErrorView.show(RezStrings.getNoResponse());
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoResponse) as Lang.String);
|
||||
}
|
||||
break;
|
||||
|
||||
case Communications.INVALID_HTTP_BODY_IN_NETWORK_RESPONSE:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantApp onReturnFetchApiStatus() Response Code: INVALID_HTTP_BODY_IN_NETWORK_RESPONSE, check JSON is returned.");
|
||||
}
|
||||
// System.println("HomeAssistantApp onReturnFetchApiStatus() Response Code: INVALID_HTTP_BODY_IN_NETWORK_RESPONSE, check JSON is returned.");
|
||||
if (!mIsGlance) {
|
||||
ErrorView.show(RezStrings.getNoJson());
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoJson) as Lang.String);
|
||||
}
|
||||
break;
|
||||
|
||||
case 404:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantApp onReturnFetchApiStatus() Response Code: 404, page not found. Check Configuration URL setting.");
|
||||
}
|
||||
// System.println("HomeAssistantApp onReturnFetchApiStatus() Response Code: 404, page not found. Check Configuration URL setting.");
|
||||
if (!mIsGlance) {
|
||||
ErrorView.show(RezStrings.getConfigUrlNotFound());
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.ConfigUrlNotFound) as Lang.String);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -360,7 +316,7 @@ class HomeAssistantApp extends Application.AppBase {
|
||||
msg = data.get("message");
|
||||
}
|
||||
if (msg.equals("API running.")) {
|
||||
mApiStatus = RezStrings.getAvailable();
|
||||
mApiStatus = WatchUi.loadResource($.Rez.Strings.Available) as Lang.String;
|
||||
} else {
|
||||
if (!mIsGlance) {
|
||||
ErrorView.show("API " + mApiStatus + ".");
|
||||
@ -369,11 +325,9 @@ class HomeAssistantApp extends Application.AppBase {
|
||||
break;
|
||||
|
||||
default:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantApp onReturnFetchApiStatus(): Unhandled HTTP response code = " + responseCode);
|
||||
}
|
||||
// System.println("HomeAssistantApp onReturnFetchApiStatus(): Unhandled HTTP response code = " + responseCode);
|
||||
if (!mIsGlance) {
|
||||
ErrorView.show(RezStrings.getUnhandledHttpErr() + responseCode);
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.UnhandledHttpErr) as Lang.String + responseCode);
|
||||
}
|
||||
}
|
||||
WatchUi.requestUpdate();
|
||||
@ -382,28 +336,24 @@ class HomeAssistantApp extends Application.AppBase {
|
||||
(:glance)
|
||||
function fetchApiStatus() as Void {
|
||||
if (Settings.getApiUrl().equals("")) {
|
||||
mApiStatus = RezStrings.getUnconfigured();
|
||||
mApiStatus = WatchUi.loadResource($.Rez.Strings.Unconfigured) as Lang.String;
|
||||
WatchUi.requestUpdate();
|
||||
} else {
|
||||
if (! System.getDeviceSettings().phoneConnected) {
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantToggleMenuItem getState(): No Phone connection, skipping API call.");
|
||||
}
|
||||
mApiStatus = RezStrings.getUnavailable();
|
||||
// System.println("HomeAssistantApp getState(): No Phone connection, skipping API call.");
|
||||
mApiStatus = WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String;
|
||||
if (mIsGlance) {
|
||||
WatchUi.requestUpdate();
|
||||
} else {
|
||||
ErrorView.show(RezStrings.getNoPhone() + ".");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String + ".");
|
||||
}
|
||||
} else if (! System.getDeviceSettings().connectionAvailable) {
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantToggleMenuItem getState(): No Internet connection, skipping API call.");
|
||||
}
|
||||
mApiStatus = RezStrings.getUnavailable();
|
||||
// System.println("HomeAssistantApp getState(): No Internet connection, skipping API call.");
|
||||
mApiStatus = WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String;
|
||||
if (mIsGlance) {
|
||||
WatchUi.requestUpdate();
|
||||
} else {
|
||||
ErrorView.show(RezStrings.getNoInternet() + ".");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoInternet) as Lang.String + ".");
|
||||
}
|
||||
} else {
|
||||
Communications.makeWebRequest(
|
||||
@ -444,20 +394,24 @@ class HomeAssistantApp extends Application.AppBase {
|
||||
WatchUi.pushView(mHaMenu, new HomeAssistantViewDelegate(true), WatchUi.SLIDE_IMMEDIATE);
|
||||
}
|
||||
|
||||
function updateNextMenuItem() as Void {
|
||||
var delay = Settings.getPollDelay();
|
||||
if ((delay > 0) and (mNextItemToUpdate == 0)) {
|
||||
mUpdateTimer.start(method(:updateNextMenuItemInternal), delay, false);
|
||||
} else {
|
||||
updateNextMenuItemInternal();
|
||||
}
|
||||
}
|
||||
|
||||
// We need to spread out the API calls so as not to overload the results queue and cause Communications.BLE_QUEUE_FULL
|
||||
// (-101) error. This function is called by a timer every Globals.menuItemUpdateInterval ms.
|
||||
function updateNextMenuItem() as Void {
|
||||
function updateNextMenuItemInternal() as Void {
|
||||
var itu = mItemsToUpdate as Lang.Array<HomeAssistantToggleMenuItem>;
|
||||
if (itu == null) {
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantApp updateNextMenuItem(): No menu items to update");
|
||||
}
|
||||
if (!mIsGlance) {
|
||||
ErrorView.show(RezStrings.getConfigUrlNotFound());
|
||||
}
|
||||
} else {
|
||||
if (itu != null) {
|
||||
itu[mNextItemToUpdate].getState();
|
||||
mNextItemToUpdate = (mNextItemToUpdate + 1) % itu.size();
|
||||
// } else {
|
||||
// System.println("HomeAssistantApp updateNextMenuItemInternal(): No menu items to update");
|
||||
}
|
||||
}
|
||||
|
||||
@ -466,29 +420,25 @@ class HomeAssistantApp extends Application.AppBase {
|
||||
}
|
||||
|
||||
function getGlanceView() as Lang.Array<WatchUi.GlanceView or WatchUi.GlanceViewDelegate> or Null {
|
||||
mIsGlance = true;
|
||||
RezStrings.update_glance();
|
||||
mApiStatus = RezStrings.getChecking();
|
||||
mMenuStatus = RezStrings.getChecking();
|
||||
mIsGlance = true;
|
||||
mApiStatus = WatchUi.loadResource($.Rez.Strings.Checking) as Lang.String;
|
||||
mMenuStatus = WatchUi.loadResource($.Rez.Strings.Checking) as Lang.String;
|
||||
updateStatus();
|
||||
Settings.update();
|
||||
mTimer = new Timer.Timer();
|
||||
mTimer.start(method(:updateStatus), Globals.scApiBackoff, true);
|
||||
mGlanceTimer = new Timer.Timer();
|
||||
mGlanceTimer.start(method(:updateStatus), Globals.scApiBackoff, true);
|
||||
return [new HomeAssistantGlanceView(self)];
|
||||
}
|
||||
|
||||
// Required for the Glance update timer.
|
||||
function updateStatus() as Void {
|
||||
mGlanceTimer = null;
|
||||
fetchMenuConfig();
|
||||
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 {
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantApp onSettingsChanged()");
|
||||
}
|
||||
// System.println("HomeAssistantApp onSettingsChanged()");
|
||||
Settings.update();
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ using Toybox.Application.Properties;
|
||||
class HomeAssistantConfirmation extends WatchUi.Confirmation {
|
||||
|
||||
function initialize() {
|
||||
WatchUi.Confirmation.initialize(RezStrings.getConfirm());
|
||||
WatchUi.Confirmation.initialize(WatchUi.loadResource($.Rez.Strings.Confirm) as Lang.String);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -44,10 +44,10 @@ class HomeAssistantGlanceView extends WatchUi.GlanceView {
|
||||
|
||||
function onLayout(dc as Graphics.Dc) as Void {
|
||||
var h = dc.getHeight();
|
||||
var tw = dc.getTextWidthInPixels(RezStrings.getGlanceMenu(), Graphics.FONT_XTINY);
|
||||
var tw = dc.getTextWidthInPixels(WatchUi.loadResource($.Rez.Strings.GlanceMenu) as Lang.String, Graphics.FONT_XTINY);
|
||||
|
||||
mTitle = new WatchUi.Text({
|
||||
:text => RezStrings.getAppName(),
|
||||
:text => WatchUi.loadResource($.Rez.Strings.AppName) as Lang.String,
|
||||
:color => Graphics.COLOR_WHITE,
|
||||
:font => Graphics.FONT_TINY,
|
||||
:justification => Graphics.TEXT_JUSTIFY_LEFT | Graphics.TEXT_JUSTIFY_VCENTER,
|
||||
@ -64,7 +64,7 @@ class HomeAssistantGlanceView extends WatchUi.GlanceView {
|
||||
:locY => 3 * h / 6
|
||||
});
|
||||
mApiStatus = new WatchUi.Text({
|
||||
:text => RezStrings.getChecking(),
|
||||
: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,
|
||||
@ -72,7 +72,7 @@ class HomeAssistantGlanceView extends WatchUi.GlanceView {
|
||||
:locY => 3 * h / 6
|
||||
});
|
||||
mMenuText = new WatchUi.Text({
|
||||
:text => RezStrings.getGlanceMenu() + ":",
|
||||
:text => WatchUi.loadResource($.Rez.Strings.GlanceMenu) as Lang.String + ":",
|
||||
:color => Graphics.COLOR_WHITE,
|
||||
:font => Graphics.FONT_XTINY,
|
||||
:justification => Graphics.TEXT_JUSTIFY_LEFT | Graphics.TEXT_JUSTIFY_VCENTER,
|
||||
@ -80,7 +80,7 @@ class HomeAssistantGlanceView extends WatchUi.GlanceView {
|
||||
:locY => 5 * h / 6
|
||||
});
|
||||
mMenuStatus = new WatchUi.Text({
|
||||
:text => RezStrings.getChecking(),
|
||||
: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,
|
||||
|
@ -44,60 +44,44 @@ class HomeAssistantService {
|
||||
context as Lang.Object
|
||||
) as Void {
|
||||
var entity_id = context as Lang.String or Null;
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantService onReturnCall() Response Code: " + responseCode);
|
||||
System.println("HomeAssistantService onReturnCall() Response Data: " + data);
|
||||
}
|
||||
// System.println("HomeAssistantService onReturnCall() Response Code: " + responseCode);
|
||||
// System.println("HomeAssistantService onReturnCall() Response Data: " + data);
|
||||
|
||||
switch (responseCode) {
|
||||
case Communications.BLE_HOST_TIMEOUT:
|
||||
case Communications.BLE_CONNECTION_UNAVAILABLE:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantService onReturnCall() Response Code: BLE_HOST_TIMEOUT or BLE_CONNECTION_UNAVAILABLE, Bluetooth connection severed.");
|
||||
}
|
||||
ErrorView.show(RezStrings.getNoPhone() + ".");
|
||||
// System.println("HomeAssistantService onReturnCall() Response Code: BLE_HOST_TIMEOUT or BLE_CONNECTION_UNAVAILABLE, Bluetooth connection severed.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String + ".");
|
||||
break;
|
||||
|
||||
case Communications.BLE_QUEUE_FULL:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantService onReturnCall() Response Code: BLE_QUEUE_FULL, API calls too rapid.");
|
||||
}
|
||||
ErrorView.show(RezStrings.getApiFlood());
|
||||
// System.println("HomeAssistantService onReturnCall() Response Code: BLE_QUEUE_FULL, API calls too rapid.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.ApiFlood) as Lang.String);
|
||||
break;
|
||||
|
||||
case Communications.NETWORK_REQUEST_TIMED_OUT:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantService onReturnCall() Response Code: NETWORK_REQUEST_TIMED_OUT, check Internet connection.");
|
||||
}
|
||||
ErrorView.show(RezStrings.getNoResponse());
|
||||
// System.println("HomeAssistantService onReturnCall() Response Code: NETWORK_REQUEST_TIMED_OUT, check Internet connection.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoResponse) as Lang.String);
|
||||
break;
|
||||
|
||||
case Communications.NETWORK_RESPONSE_OUT_OF_MEMORY:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantService onReturnCall() Response Code: NETWORK_RESPONSE_OUT_OF_MEMORY, are we going too fast?");
|
||||
}
|
||||
// System.println("HomeAssistantService onReturnCall() Response Code: NETWORK_RESPONSE_OUT_OF_MEMORY, are we going too fast?");
|
||||
// Ignore and see if we can carry on
|
||||
break;
|
||||
case Communications.INVALID_HTTP_BODY_IN_NETWORK_RESPONSE:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantService onReturnCall() Response Code: INVALID_HTTP_BODY_IN_NETWORK_RESPONSE, check JSON is returned.");
|
||||
}
|
||||
ErrorView.show(RezStrings.getNoJson());
|
||||
// System.println("HomeAssistantService onReturnCall() Response Code: INVALID_HTTP_BODY_IN_NETWORK_RESPONSE, check JSON is returned.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoJson) as Lang.String);
|
||||
break;
|
||||
|
||||
case 404:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantService onReturnCall() Response Code: 404, page not found. Check API URL setting.");
|
||||
}
|
||||
ErrorView.show(RezStrings.getApiUrlNotFound());
|
||||
// System.println("HomeAssistantService onReturnCall() Response Code: 404, page not found. Check API URL setting.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.ApiUrlNotFound) as Lang.String);
|
||||
break;
|
||||
|
||||
case 200:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantService onReturnCall(): Service executed.");
|
||||
}
|
||||
// System.println("HomeAssistantService onReturnCall(): Service executed.");
|
||||
var d = data as Lang.Array;
|
||||
var toast = RezStrings.getExecuted();
|
||||
var toast = WatchUi.loadResource($.Rez.Strings.Executed) as Lang.String;
|
||||
for(var i = 0; i < d.size(); i++) {
|
||||
if ((d[i].get("entity_id") as Lang.String).equals(entity_id)) {
|
||||
toast = (d[i].get("attributes") as Lang.Dictionary).get("friendly_name") as Lang.String;
|
||||
@ -117,10 +101,8 @@ class HomeAssistantService {
|
||||
break;
|
||||
|
||||
default:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantService onReturnCall(): Unhandled HTTP response code = " + responseCode);
|
||||
}
|
||||
ErrorView.show(RezStrings.getUnhandledHttpErr() + responseCode);
|
||||
// System.println("HomeAssistantService onReturnCall(): Unhandled HTTP response code = " + responseCode);
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.UnhandledHttpErr) as Lang.String + responseCode);
|
||||
}
|
||||
}
|
||||
|
||||
@ -129,26 +111,23 @@ class HomeAssistantService {
|
||||
data as Lang.Dictionary or Null
|
||||
) as Void {
|
||||
if (! System.getDeviceSettings().phoneConnected) {
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantService call(): No Phone connection, skipping API call.");
|
||||
}
|
||||
ErrorView.show(RezStrings.getNoPhone() + ".");
|
||||
// System.println("HomeAssistantService call(): No Phone connection, skipping API call.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String + ".");
|
||||
} else if (! System.getDeviceSettings().connectionAvailable) {
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantService call(): No Internet connection, skipping API call.");
|
||||
}
|
||||
ErrorView.show(RezStrings.getNoInternet() + ".");
|
||||
// System.println("HomeAssistantService call(): No Internet connection, skipping API call.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoInternet) as Lang.String + ".");
|
||||
} else {
|
||||
// Can't use null for substring() parameters due to API version level.
|
||||
var url = Settings.getApiUrl() + "/services/" + service.substring(0, service.find(".")) + "/" + service.substring(service.find(".")+1, service.length());
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantService call() URL=" + url);
|
||||
System.println("HomeAssistantService call() service=" + service);
|
||||
}
|
||||
// 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(
|
||||
@ -165,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
|
||||
|
@ -84,46 +84,34 @@ class HomeAssistantTemplateMenuItem extends WatchUi.IconMenuItem {
|
||||
// error. The ErrorView cancellation will resume the call chain.
|
||||
//
|
||||
function onReturnGetState(responseCode as Lang.Number, data as Lang.String) as Void {
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantTemplateMenuItem onReturnGetState() Response Code: " + responseCode);
|
||||
System.println("HomeAssistantTemplateMenuItem onReturnGetState() Response Data: " + data);
|
||||
}
|
||||
// System.println("HomeAssistantTemplateMenuItem onReturnGetState() Response Code: " + responseCode);
|
||||
// System.println("HomeAssistantTemplateMenuItem onReturnGetState() Response Data: " + data);
|
||||
|
||||
var status = RezStrings.getUnavailable();
|
||||
var status = WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String;
|
||||
switch (responseCode) {
|
||||
case Communications.BLE_HOST_TIMEOUT:
|
||||
case Communications.BLE_CONNECTION_UNAVAILABLE:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantTemplateMenuItem onReturnGetState() Response Code: BLE_HOST_TIMEOUT or BLE_CONNECTION_UNAVAILABLE, Bluetooth connection severed.");
|
||||
}
|
||||
ErrorView.show(RezStrings.getNoPhone() + ".");
|
||||
// System.println("HomeAssistantTemplateMenuItem onReturnGetState() Response Code: BLE_HOST_TIMEOUT or BLE_CONNECTION_UNAVAILABLE, Bluetooth connection severed.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String + ".");
|
||||
break;
|
||||
|
||||
case Communications.BLE_QUEUE_FULL:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantTemplateMenuItem onReturnGetState() Response Code: BLE_QUEUE_FULL, API calls too rapid.");
|
||||
}
|
||||
ErrorView.show(RezStrings.getApiFlood());
|
||||
// System.println("HomeAssistantTemplateMenuItem onReturnGetState() Response Code: BLE_QUEUE_FULL, API calls too rapid.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.ApiFlood) as Lang.String);
|
||||
break;
|
||||
|
||||
case Communications.NETWORK_REQUEST_TIMED_OUT:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantTemplateMenuItem onReturnGetState() Response Code: NETWORK_REQUEST_TIMED_OUT, check Internet connection.");
|
||||
}
|
||||
ErrorView.show(RezStrings.getNoResponse());
|
||||
// System.println("HomeAssistantTemplateMenuItem onReturnGetState() Response Code: NETWORK_REQUEST_TIMED_OUT, check Internet connection.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoResponse) as Lang.String);
|
||||
break;
|
||||
|
||||
case Communications.INVALID_HTTP_BODY_IN_NETWORK_RESPONSE:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantTemplateMenuItem onReturnGetState() Response Code: INVALID_HTTP_BODY_IN_NETWORK_RESPONSE, check JSON is returned.");
|
||||
}
|
||||
ErrorView.show(RezStrings.getNoJson());
|
||||
// System.println("HomeAssistantTemplateMenuItem onReturnGetState() Response Code: INVALID_HTTP_BODY_IN_NETWORK_RESPONSE, check JSON is returned.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoJson) as Lang.String);
|
||||
break;
|
||||
|
||||
case Communications.NETWORK_RESPONSE_OUT_OF_MEMORY:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantTemplateMenuItem onReturnGetState() Response Code: NETWORK_RESPONSE_OUT_OF_MEMORY, are we going too fast?");
|
||||
}
|
||||
// System.println("HomeAssistantTemplateMenuItem onReturnGetState() Response Code: NETWORK_RESPONSE_OUT_OF_MEMORY, are we going too fast?");
|
||||
var myTimer = new Timer.Timer();
|
||||
// Now this feels very "closely coupled" to the application, but it is the most reliable method instead of using a timer.
|
||||
myTimer.start(getApp().method(:updateNextMenuItem), Globals.scApiBackoff, false);
|
||||
@ -132,21 +120,17 @@ class HomeAssistantTemplateMenuItem extends WatchUi.IconMenuItem {
|
||||
break;
|
||||
|
||||
case 404:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantTemplateMenuItem onReturnGetState() Response Code: 404, page not found. Check API URL setting.");
|
||||
}
|
||||
ErrorView.show(RezStrings.getApiUrlNotFound());
|
||||
// System.println("HomeAssistantTemplateMenuItem onReturnGetState() Response Code: 404, page not found. Check API URL setting.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.ApiUrlNotFound) as Lang.String);
|
||||
break;
|
||||
|
||||
case 400:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantTemplateMenuItem onReturnGetState() Response Code: 400, bad request. Template error.");
|
||||
}
|
||||
ErrorView.show(RezStrings.getTemplateError());
|
||||
// System.println("HomeAssistantTemplateMenuItem onReturnGetState() Response Code: 400, bad request. Template error.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.TemplateError) as Lang.String);
|
||||
break;
|
||||
|
||||
case 200:
|
||||
status = RezStrings.getAvailable();
|
||||
status = WatchUi.loadResource($.Rez.Strings.Available) as Lang.String;
|
||||
setSubLabel(data);
|
||||
requestUpdate();
|
||||
// Now this feels very "closely coupled" to the application, but it is the most reliable method instead of using a timer.
|
||||
@ -154,32 +138,24 @@ class HomeAssistantTemplateMenuItem extends WatchUi.IconMenuItem {
|
||||
break;
|
||||
|
||||
default:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantTemplateMenuItem onReturnGetState(): Unhandled HTTP response code = " + responseCode);
|
||||
}
|
||||
ErrorView.show(RezStrings.getUnhandledHttpErr() + responseCode);
|
||||
// System.println("HomeAssistantTemplateMenuItem onReturnGetState(): Unhandled HTTP response code = " + responseCode);
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.UnhandledHttpErr) as Lang.String + responseCode);
|
||||
}
|
||||
getApp().setApiStatus(status);
|
||||
}
|
||||
|
||||
function getState() as Void {
|
||||
if (! System.getDeviceSettings().phoneConnected) {
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantTemplateMenuItem getState(): No Phone connection, skipping API call.");
|
||||
}
|
||||
ErrorView.show(RezStrings.getNoPhone() + ".");
|
||||
getApp().setApiStatus(RezStrings.getUnavailable());
|
||||
// System.println("HomeAssistantTemplateMenuItem getState(): No Phone connection, skipping API call.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String + ".");
|
||||
getApp().setApiStatus(WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String);
|
||||
} else if (! System.getDeviceSettings().connectionAvailable) {
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantTemplateMenuItem getState(): No Internet connection, skipping API call.");
|
||||
}
|
||||
ErrorView.show(RezStrings.getNoInternet() + ".");
|
||||
getApp().setApiStatus(RezStrings.getUnavailable());
|
||||
// System.println("HomeAssistantTemplateMenuItem getState(): No Internet connection, skipping API call.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoInternet) as Lang.String + ".");
|
||||
getApp().setApiStatus(WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String);
|
||||
} else {
|
||||
var url = Settings.getApiUrl() + "/template";
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantTemplateMenuItem getState() URL=" + url + ", Template='" + mTemplate + "'");
|
||||
}
|
||||
// System.println("HomeAssistantTemplateMenuItem getState() URL=" + url + ", Template='" + mTemplate + "'");
|
||||
Communications.makeWebRequest(
|
||||
url,
|
||||
{ "template" => mTemplate },
|
||||
|
@ -59,46 +59,34 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem {
|
||||
// error. The ErrorView cancellation will resume the call chain.
|
||||
//
|
||||
function onReturnGetState(responseCode as Lang.Number, data as Null or Lang.Dictionary or Lang.String) as Void {
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: " + responseCode);
|
||||
System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Data: " + data);
|
||||
}
|
||||
// System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: " + responseCode);
|
||||
// System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Data: " + data);
|
||||
|
||||
var status = RezStrings.getUnavailable();
|
||||
var status = WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String;
|
||||
switch (responseCode) {
|
||||
case Communications.BLE_HOST_TIMEOUT:
|
||||
case Communications.BLE_CONNECTION_UNAVAILABLE:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: BLE_HOST_TIMEOUT or BLE_CONNECTION_UNAVAILABLE, Bluetooth connection severed.");
|
||||
}
|
||||
ErrorView.show(RezStrings.getNoPhone() + ".");
|
||||
// System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: BLE_HOST_TIMEOUT or BLE_CONNECTION_UNAVAILABLE, Bluetooth connection severed.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String + ".");
|
||||
break;
|
||||
|
||||
case Communications.BLE_QUEUE_FULL:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: BLE_QUEUE_FULL, API calls too rapid.");
|
||||
}
|
||||
ErrorView.show(RezStrings.getApiFlood());
|
||||
// System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: BLE_QUEUE_FULL, API calls too rapid.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.ApiFlood) as Lang.String);
|
||||
break;
|
||||
|
||||
case Communications.NETWORK_REQUEST_TIMED_OUT:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: NETWORK_REQUEST_TIMED_OUT, check Internet connection.");
|
||||
}
|
||||
ErrorView.show(RezStrings.getNoResponse());
|
||||
// System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: NETWORK_REQUEST_TIMED_OUT, check Internet connection.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoResponse) as Lang.String);
|
||||
break;
|
||||
|
||||
case Communications.INVALID_HTTP_BODY_IN_NETWORK_RESPONSE:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: INVALID_HTTP_BODY_IN_NETWORK_RESPONSE, check JSON is returned.");
|
||||
}
|
||||
ErrorView.show(RezStrings.getNoJson());
|
||||
// System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: INVALID_HTTP_BODY_IN_NETWORK_RESPONSE, check JSON is returned.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoJson) as Lang.String);
|
||||
break;
|
||||
|
||||
case Communications.NETWORK_RESPONSE_OUT_OF_MEMORY:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: NETWORK_RESPONSE_OUT_OF_MEMORY, are we going too fast?");
|
||||
}
|
||||
// System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: NETWORK_RESPONSE_OUT_OF_MEMORY, are we going too fast?");
|
||||
var myTimer = new Timer.Timer();
|
||||
// Now this feels very "closely coupled" to the application, but it is the most reliable method instead of using a timer.
|
||||
myTimer.start(getApp().method(:updateNextMenuItem), Globals.scApiBackoff, false);
|
||||
@ -113,32 +101,24 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem {
|
||||
}
|
||||
if (msg != null) {
|
||||
// Should be an HTTP 404 according to curl queries
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: 404. " + mData.get("entity_id") + " " + msg);
|
||||
}
|
||||
// System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: 404. " + mData.get("entity_id") + " " + msg);
|
||||
ErrorView.show("HTTP 404, " + mData.get("entity_id") + ". " + data.get("message"));
|
||||
} else {
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: 404, page not found. Check API URL setting.");
|
||||
}
|
||||
ErrorView.show(RezStrings.getApiUrlNotFound());
|
||||
// System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: 404, page not found. Check API URL setting.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.ApiUrlNotFound) as Lang.String);
|
||||
}
|
||||
break;
|
||||
|
||||
case 405:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: 405. " + mData.get("entity_id") + " " + data.get("message"));
|
||||
}
|
||||
// System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: 405. " + mData.get("entity_id") + " " + data.get("message"));
|
||||
ErrorView.show("HTTP 405, " + mData.get("entity_id") + ". " + data.get("message"));
|
||||
|
||||
break;
|
||||
|
||||
case 200:
|
||||
status = RezStrings.getAvailable();
|
||||
status = WatchUi.loadResource($.Rez.Strings.Available) as Lang.String;
|
||||
var state = data.get("state") as Lang.String;
|
||||
if (Globals.scDebug) {
|
||||
System.println((data.get("attributes") as Lang.Dictionary).get("friendly_name") + " State=" + state);
|
||||
}
|
||||
// System.println((data.get("attributes") as Lang.Dictionary).get("friendly_name") + " State=" + state);
|
||||
if (getLabel().equals("...")) {
|
||||
setLabel((data.get("attributes") as Lang.Dictionary).get("friendly_name") as Lang.String);
|
||||
}
|
||||
@ -148,32 +128,24 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem {
|
||||
break;
|
||||
|
||||
default:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantToggleMenuItem onReturnGetState(): Unhandled HTTP response code = " + responseCode);
|
||||
}
|
||||
ErrorView.show(RezStrings.getUnhandledHttpErr() + responseCode);
|
||||
// System.println("HomeAssistantToggleMenuItem onReturnGetState(): Unhandled HTTP response code = " + responseCode);
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.UnhandledHttpErr) as Lang.String + responseCode);
|
||||
}
|
||||
getApp().setApiStatus(status);
|
||||
}
|
||||
|
||||
function getState() as Void {
|
||||
if (! System.getDeviceSettings().phoneConnected) {
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantToggleMenuItem getState(): No Phone connection, skipping API call.");
|
||||
}
|
||||
ErrorView.show(RezStrings.getNoPhone() + ".");
|
||||
getApp().setApiStatus(RezStrings.getUnavailable());
|
||||
// System.println("HomeAssistantToggleMenuItem getState(): No Phone connection, skipping API call.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String + ".");
|
||||
getApp().setApiStatus(WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String);
|
||||
} else if (! System.getDeviceSettings().connectionAvailable) {
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantToggleMenuItem getState(): No Internet connection, skipping API call.");
|
||||
}
|
||||
ErrorView.show(RezStrings.getNoInternet() + ".");
|
||||
getApp().setApiStatus(RezStrings.getUnavailable());
|
||||
// System.println("HomeAssistantToggleMenuItem getState(): No Internet connection, skipping API call.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoInternet) as Lang.String + ".");
|
||||
getApp().setApiStatus(WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String);
|
||||
} else {
|
||||
var url = Settings.getApiUrl() + "/states/" + mData.get("entity_id");
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantToggleMenuItem getState() URL=" + url);
|
||||
}
|
||||
// System.println("HomeAssistantToggleMenuItem getState() URL=" + url);
|
||||
Communications.makeWebRequest(
|
||||
url,
|
||||
null,
|
||||
@ -192,47 +164,35 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem {
|
||||
// Callback function after completing the POST request to set the status.
|
||||
//
|
||||
function onReturnSetState(responseCode as Lang.Number, data as Null or Lang.Dictionary or Lang.String) as Void {
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantToggleMenuItem onReturnSetState() Response Code: " + responseCode);
|
||||
System.println("HomeAssistantToggleMenuItem onReturnSetState() Response Data: " + data);
|
||||
}
|
||||
// System.println("HomeAssistantToggleMenuItem onReturnSetState() Response Code: " + responseCode);
|
||||
// System.println("HomeAssistantToggleMenuItem onReturnSetState() Response Data: " + data);
|
||||
|
||||
var status = RezStrings.getUnavailable();
|
||||
var status = WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String;
|
||||
switch (responseCode) {
|
||||
case Communications.BLE_HOST_TIMEOUT:
|
||||
case Communications.BLE_CONNECTION_UNAVAILABLE:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantToggleMenuItem onReturnSetState() Response Code: BLE_HOST_TIMEOUT or BLE_CONNECTION_UNAVAILABLE, Bluetooth connection severed.");
|
||||
}
|
||||
ErrorView.show(RezStrings.getNoPhone() + ".");
|
||||
// System.println("HomeAssistantToggleMenuItem onReturnSetState() Response Code: BLE_HOST_TIMEOUT or BLE_CONNECTION_UNAVAILABLE, Bluetooth connection severed.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String + ".");
|
||||
break;
|
||||
|
||||
case Communications.BLE_QUEUE_FULL:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantToggleMenuItem onReturnSetState() Response Code: BLE_QUEUE_FULL, API calls too rapid.");
|
||||
}
|
||||
ErrorView.show(RezStrings.getApiFlood());
|
||||
// System.println("HomeAssistantToggleMenuItem onReturnSetState() Response Code: BLE_QUEUE_FULL, API calls too rapid.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.ApiFlood) as Lang.String);
|
||||
break;
|
||||
|
||||
case Communications.NETWORK_REQUEST_TIMED_OUT:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantToggleMenuItem onReturnSetState() Response Code: NETWORK_REQUEST_TIMED_OUT, check Internet connection.");
|
||||
}
|
||||
ErrorView.show(RezStrings.getNoResponse());
|
||||
// System.println("HomeAssistantToggleMenuItem onReturnSetState() Response Code: NETWORK_REQUEST_TIMED_OUT, check Internet connection.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoResponse) as Lang.String);
|
||||
break;
|
||||
|
||||
case Communications.INVALID_HTTP_BODY_IN_NETWORK_RESPONSE:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantToggleMenuItem onReturnSetState() Response Code: INVALID_HTTP_BODY_IN_NETWORK_RESPONSE, check JSON is returned.");
|
||||
}
|
||||
ErrorView.show(RezStrings.getNoJson());
|
||||
// System.println("HomeAssistantToggleMenuItem onReturnSetState() Response Code: INVALID_HTTP_BODY_IN_NETWORK_RESPONSE, check JSON is returned.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoJson) as Lang.String);
|
||||
break;
|
||||
|
||||
case 404:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantToggleMenuItem onReturnSetState() Response Code: 404, page not found. Check API URL setting.");
|
||||
}
|
||||
ErrorView.show(RezStrings.getApiUrlNotFound());
|
||||
// System.println("HomeAssistantToggleMenuItem onReturnSetState() Response Code: 404, page not found. Check API URL setting.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.ApiUrlNotFound) as Lang.String);
|
||||
break;
|
||||
|
||||
case 200:
|
||||
@ -241,39 +201,31 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem {
|
||||
for(var i = 0; i < d.size(); i++) {
|
||||
if ((d[i].get("entity_id") as Lang.String).equals(mData.get("entity_id"))) {
|
||||
state = d[i].get("state") as Lang.String;
|
||||
if (Globals.scDebug) {
|
||||
System.println((d[i].get("attributes") as Lang.Dictionary).get("friendly_name") + " State=" + state);
|
||||
}
|
||||
// System.println((d[i].get("attributes") as Lang.Dictionary).get("friendly_name") + " State=" + state);
|
||||
setUiToggle(state);
|
||||
}
|
||||
}
|
||||
status = RezStrings.getAvailable();
|
||||
status = WatchUi.loadResource($.Rez.Strings.Available) as Lang.String;
|
||||
break;
|
||||
|
||||
default:
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantToggleMenuItem onReturnSetState(): Unhandled HTTP response code = " + responseCode);
|
||||
}
|
||||
ErrorView.show(RezStrings.getUnhandledHttpErr() + responseCode);
|
||||
// System.println("HomeAssistantToggleMenuItem onReturnSetState(): Unhandled HTTP response code = " + responseCode);
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.UnhandledHttpErr) as Lang.String + responseCode);
|
||||
}
|
||||
getApp().setApiStatus(status);
|
||||
}
|
||||
|
||||
function setState(s as Lang.Boolean) as Void {
|
||||
if (! System.getDeviceSettings().phoneConnected) {
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantToggleMenuItem getState(): No Phone connection, skipping API call.");
|
||||
}
|
||||
// System.println("HomeAssistantToggleMenuItem getState(): No Phone connection, skipping API call.");
|
||||
// Toggle the UI back
|
||||
setEnabled(!isEnabled());
|
||||
ErrorView.show(RezStrings.getNoPhone() + ".");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String + ".");
|
||||
} else if (! System.getDeviceSettings().connectionAvailable) {
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantToggleMenuItem getState(): No Internet connection, skipping API call.");
|
||||
}
|
||||
// System.println("HomeAssistantToggleMenuItem getState(): No Internet connection, skipping API call.");
|
||||
// Toggle the UI back
|
||||
setEnabled(!isEnabled());
|
||||
ErrorView.show(RezStrings.getNoInternet() + ".");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoInternet) as Lang.String + ".");
|
||||
} else {
|
||||
// Updated SDK and got a new error
|
||||
// ERROR: venu: Cannot find symbol ':substring' on type 'PolyType<Null or $.Toybox.Lang.Object>'.
|
||||
@ -284,10 +236,8 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem {
|
||||
} else {
|
||||
url = url + id.substring(0, id.find(".")) + "/turn_off";
|
||||
}
|
||||
if (Globals.scDebug) {
|
||||
System.println("HomeAssistantToggleMenuItem setState() URL = " + url);
|
||||
System.println("HomeAssistantToggleMenuItem setState() entity_id = " + id);
|
||||
}
|
||||
// System.println("HomeAssistantToggleMenuItem setState() URL = " + url);
|
||||
// System.println("HomeAssistantToggleMenuItem setState() entity_id = " + id);
|
||||
Communications.makeWebRequest(
|
||||
url,
|
||||
mData,
|
||||
|
@ -34,48 +34,47 @@ class HomeAssistantView extends WatchUi.Menu2 {
|
||||
:theme as WatchUi.MenuTheme or Null
|
||||
} or Null
|
||||
) {
|
||||
|
||||
if (options == null) {
|
||||
options = {
|
||||
:title => definition.get("title") as Lang.String
|
||||
};
|
||||
options = { :title => definition.get("title") as Lang.String };
|
||||
} else {
|
||||
options.put(:title, definition.get("title") as Lang.String);
|
||||
}
|
||||
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]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -146,32 +145,22 @@ class HomeAssistantViewDelegate extends WatchUi.Menu2InputDelegate {
|
||||
mTimer.reset();
|
||||
if (item instanceof HomeAssistantToggleMenuItem) {
|
||||
var haToggleItem = item as HomeAssistantToggleMenuItem;
|
||||
if (Globals.scDebug) {
|
||||
System.println(haToggleItem.getLabel() + " " + haToggleItem.getId() + " " + haToggleItem.isEnabled());
|
||||
}
|
||||
// System.println(haToggleItem.getLabel() + " " + haToggleItem.getId() + " " + haToggleItem.isEnabled());
|
||||
haToggleItem.callService(haToggleItem.isEnabled());
|
||||
} else if (item instanceof HomeAssistantTapMenuItem) {
|
||||
var haItem = item as HomeAssistantTapMenuItem;
|
||||
if (Globals.scDebug) {
|
||||
System.println(haItem.getLabel() + " " + haItem.getId());
|
||||
}
|
||||
// System.println(haItem.getLabel() + " " + haItem.getId());
|
||||
haItem.callService();
|
||||
} else if (item instanceof HomeAssistantTemplateMenuItem) {
|
||||
var haItem = item as HomeAssistantTemplateMenuItem;
|
||||
if (Globals.scDebug) {
|
||||
System.println(haItem.getLabel() + " " + haItem.getId());
|
||||
}
|
||||
// System.println(haItem.getLabel() + " " + haItem.getId());
|
||||
haItem.callService();
|
||||
} else if (item instanceof HomeAssistantGroupMenuItem) {
|
||||
var haMenuItem = item as HomeAssistantGroupMenuItem;
|
||||
if (Globals.scDebug) {
|
||||
System.println("IconMenu: " + haMenuItem.getLabel() + " " + haMenuItem.getId());
|
||||
}
|
||||
// System.println("IconMenu: " + haMenuItem.getLabel() + " " + haMenuItem.getId());
|
||||
WatchUi.pushView(haMenuItem.getMenuView(), new HomeAssistantViewDelegate(false), WatchUi.SLIDE_LEFT);
|
||||
} else {
|
||||
if (Globals.scDebug) {
|
||||
System.println(item.getLabel() + " " + item.getId());
|
||||
}
|
||||
// } else {
|
||||
// System.println(item.getLabel() + " " + item.getId());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,9 +30,7 @@ class QuitTimer extends Timer.Timer {
|
||||
}
|
||||
|
||||
function exitApp() as Void {
|
||||
if (Globals.scDebug) {
|
||||
System.println("QuitTimer exitApp(): Exiting");
|
||||
}
|
||||
// System.println("QuitTimer exitApp(): Exiting");
|
||||
// This will exit the system cleanly from any point within an app.
|
||||
System.exit();
|
||||
}
|
||||
@ -45,9 +43,7 @@ class QuitTimer extends Timer.Timer {
|
||||
}
|
||||
|
||||
function reset() {
|
||||
if (Globals.scDebug) {
|
||||
System.println("QuitTimer reset(): Restarted quit timer");
|
||||
}
|
||||
// System.println("QuitTimer reset(): Restarted quit timer");
|
||||
stop();
|
||||
begin();
|
||||
}
|
||||
|
@ -1,206 +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, 31 October 2023
|
||||
//
|
||||
//
|
||||
// Description:
|
||||
//
|
||||
// Load the strings centrally once rather than initialising locally within separate
|
||||
// classes. This is to solve a problem with out of memory errors in some devices,
|
||||
// e.g. Vivoactive 3.
|
||||
//
|
||||
//-----------------------------------------------------------------------------------
|
||||
|
||||
using Toybox.Lang;
|
||||
using Toybox.WatchUi;
|
||||
|
||||
class RezStrings {
|
||||
|
||||
(:glance)
|
||||
private static var strAppName as Lang.String or Null;
|
||||
private static var strConfirm as Lang.String or Null;
|
||||
private static var strExecuted as Lang.String or Null;
|
||||
(:glance)
|
||||
private static var strNoPhone as Lang.String or Null;
|
||||
private static var strNoInternet as Lang.String or Null;
|
||||
private static var strNoResponse as Lang.String or Null;
|
||||
(:glance)
|
||||
private static var strNoApiKey as Lang.String or Null;
|
||||
(:glance)
|
||||
private static var strNoApiUrl as Lang.String or Null;
|
||||
(:glance)
|
||||
private static var strNoConfigUrl as Lang.String or Null;
|
||||
private static var strApiFlood as Lang.String or Null;
|
||||
private static var strApiUrlNotFound as Lang.String or Null;
|
||||
private static var strConfigUrlNotFound as Lang.String or Null;
|
||||
private static var strNoJson as Lang.String or Null;
|
||||
private static var strUnhandledHttpErr as Lang.String or Null;
|
||||
private static var strTrailingSlashErr as Lang.String or Null;
|
||||
private static var strWebhookFailed as Lang.String or Null;
|
||||
private static var strTemplateError as Lang.String or Null;
|
||||
(:glance)
|
||||
private static var strAvailable as Lang.String or Null;
|
||||
(:glance)
|
||||
private static var strChecking as Lang.String or Null;
|
||||
(:glance)
|
||||
private static var strUnavailable as Lang.String or Null;
|
||||
(:glance)
|
||||
private static var strUnconfigured as Lang.String or Null;
|
||||
(:glance)
|
||||
private static var strCached as Lang.String or Null;
|
||||
(:glance)
|
||||
private static var strGlanceMenu as Lang.String or Null;
|
||||
private static var strMemory as Lang.String or Null;
|
||||
|
||||
// Can't initialise a constant directly, have to be initialised via a function
|
||||
// for 'WatchUi.loadResource' to be available.
|
||||
(:glance)
|
||||
static function update_glance() {
|
||||
strAppName = WatchUi.loadResource($.Rez.Strings.AppName);
|
||||
strNoPhone = WatchUi.loadResource($.Rez.Strings.NoPhone);
|
||||
strNoApiKey = WatchUi.loadResource($.Rez.Strings.NoAPIKey);
|
||||
strNoApiUrl = WatchUi.loadResource($.Rez.Strings.NoApiUrl);
|
||||
strNoConfigUrl = WatchUi.loadResource($.Rez.Strings.NoConfigUrl);
|
||||
strAvailable = WatchUi.loadResource($.Rez.Strings.Available);
|
||||
strChecking = WatchUi.loadResource($.Rez.Strings.Checking);
|
||||
strUnavailable = WatchUi.loadResource($.Rez.Strings.Unavailable);
|
||||
strUnconfigured = WatchUi.loadResource($.Rez.Strings.Unconfigured);
|
||||
strCached = WatchUi.loadResource($.Rez.Strings.Cached);
|
||||
strGlanceMenu = WatchUi.loadResource($.Rez.Strings.GlanceMenu);
|
||||
}
|
||||
|
||||
// Can't initialise a constant directly, have to be initialised via a function
|
||||
// for 'WatchUi.loadResource' to be available.
|
||||
static function update() {
|
||||
strAppName = WatchUi.loadResource($.Rez.Strings.AppName);
|
||||
strConfirm = WatchUi.loadResource($.Rez.Strings.Confirm);
|
||||
strExecuted = WatchUi.loadResource($.Rez.Strings.Executed);
|
||||
strNoPhone = WatchUi.loadResource($.Rez.Strings.NoPhone);
|
||||
strNoInternet = WatchUi.loadResource($.Rez.Strings.NoInternet);
|
||||
strNoResponse = WatchUi.loadResource($.Rez.Strings.NoResponse);
|
||||
strNoApiKey = WatchUi.loadResource($.Rez.Strings.NoAPIKey);
|
||||
strNoApiUrl = WatchUi.loadResource($.Rez.Strings.NoApiUrl);
|
||||
strNoConfigUrl = WatchUi.loadResource($.Rez.Strings.NoConfigUrl);
|
||||
strApiFlood = WatchUi.loadResource($.Rez.Strings.ApiFlood);
|
||||
strApiUrlNotFound = WatchUi.loadResource($.Rez.Strings.ApiUrlNotFound);
|
||||
strConfigUrlNotFound = WatchUi.loadResource($.Rez.Strings.ConfigUrlNotFound);
|
||||
strNoJson = WatchUi.loadResource($.Rez.Strings.NoJson);
|
||||
strUnhandledHttpErr = WatchUi.loadResource($.Rez.Strings.UnhandledHttpErr);
|
||||
strTrailingSlashErr = WatchUi.loadResource($.Rez.Strings.TrailingSlashErr);
|
||||
strWebhookFailed = WatchUi.loadResource($.Rez.Strings.WebhookFailed);
|
||||
strTemplateError = WatchUi.loadResource($.Rez.Strings.TemplateError);
|
||||
strAvailable = WatchUi.loadResource($.Rez.Strings.Available);
|
||||
strChecking = WatchUi.loadResource($.Rez.Strings.Checking);
|
||||
strUnavailable = WatchUi.loadResource($.Rez.Strings.Unavailable);
|
||||
strUnconfigured = WatchUi.loadResource($.Rez.Strings.Unconfigured);
|
||||
strCached = WatchUi.loadResource($.Rez.Strings.Cached);
|
||||
strGlanceMenu = WatchUi.loadResource($.Rez.Strings.GlanceMenu);
|
||||
strMemory = WatchUi.loadResource($.Rez.Strings.Memory);
|
||||
}
|
||||
|
||||
static function getAppName() as Lang.String {
|
||||
return strAppName;
|
||||
}
|
||||
|
||||
static function getConfirm() as Lang.String {
|
||||
return strConfirm;
|
||||
}
|
||||
|
||||
static function getExecuted() as Lang.String {
|
||||
return strExecuted;
|
||||
}
|
||||
|
||||
static function getNoPhone() as Lang.String {
|
||||
return strNoPhone;
|
||||
}
|
||||
|
||||
static function getNoInternet() as Lang.String {
|
||||
return strNoInternet;
|
||||
}
|
||||
|
||||
static function getNoResponse() as Lang.String {
|
||||
return strNoResponse;
|
||||
}
|
||||
|
||||
static function getNoApiKey() as Lang.String {
|
||||
return strNoApiKey;
|
||||
}
|
||||
|
||||
static function getNoApiUrl() as Lang.String {
|
||||
return strNoApiUrl;
|
||||
}
|
||||
|
||||
static function getNoConfigUrl() as Lang.String {
|
||||
return strNoConfigUrl;
|
||||
}
|
||||
|
||||
static function getApiFlood() as Lang.String {
|
||||
return strApiFlood;
|
||||
}
|
||||
|
||||
static function getApiUrlNotFound() as Lang.String {
|
||||
return strApiUrlNotFound;
|
||||
}
|
||||
|
||||
static function getConfigUrlNotFound() as Lang.String {
|
||||
return strConfigUrlNotFound;
|
||||
}
|
||||
|
||||
static function getNoJson() as Lang.String {
|
||||
return strNoJson;
|
||||
}
|
||||
|
||||
static function getUnhandledHttpErr() as Lang.String {
|
||||
return strUnhandledHttpErr;
|
||||
}
|
||||
|
||||
static function getTrailingSlashErr() as Lang.String {
|
||||
return strTrailingSlashErr;
|
||||
}
|
||||
|
||||
static function getWebhookFailed() as Lang.String {
|
||||
return strWebhookFailed;
|
||||
}
|
||||
|
||||
static function getTemplateError() as Lang.String {
|
||||
return strTemplateError;
|
||||
}
|
||||
|
||||
static function getAvailable() as Lang.String {
|
||||
return strAvailable;
|
||||
}
|
||||
|
||||
static function getChecking() as Lang.String {
|
||||
return strChecking;
|
||||
}
|
||||
|
||||
static function getUnavailable() as Lang.String {
|
||||
return strUnavailable;
|
||||
}
|
||||
|
||||
static function getUnconfigured() as Lang.String {
|
||||
return strUnconfigured;
|
||||
}
|
||||
|
||||
static function getCached() as Lang.String {
|
||||
return strCached;
|
||||
}
|
||||
|
||||
static function getGlanceMenu() as Lang.String {
|
||||
return strGlanceMenu;
|
||||
}
|
||||
|
||||
static function getMemory() as Lang.String {
|
||||
return strMemory;
|
||||
}
|
||||
|
||||
}
|
@ -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 => RezStrings.getAppName(),
|
||||
: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 => RezStrings.getChecking(),
|
||||
: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 => RezStrings.getGlanceMenu() + ":",
|
||||
: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 => RezStrings.getChecking(),
|
||||
: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 => RezStrings.getMemory() + ":",
|
||||
: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 => RezStrings.getChecking(),
|
||||
: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 = (100 * 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;
|
||||
}
|
||||
}
|
@ -34,15 +34,15 @@ 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 mPollDelay 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;
|
||||
private static var mHasService as Lang.Boolean = false;
|
||||
|
||||
// Must keep the object so it doesn't get garbage collected.
|
||||
private static var mWebhookManager as WebhookManager or Null;
|
||||
|
||||
@ -55,10 +55,11 @@ 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");
|
||||
mPollDelay = Properties.getValue("poll_delay");
|
||||
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");
|
||||
|
||||
@ -68,32 +69,28 @@ 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();
|
||||
}
|
||||
}
|
||||
if (Globals.scDebug) {
|
||||
System.println("Settings update(): getTemporalEventRegisteredTime() = " + Background.getTemporalEventRegisteredTime());
|
||||
if (Background.getTemporalEventRegisteredTime() != null) {
|
||||
System.println("Settings update(): getTemporalEventRegisteredTime().value() = " + Background.getTemporalEventRegisteredTime().value().format("%d") + " seconds");
|
||||
} else {
|
||||
System.println("Settings update(): getTemporalEventRegisteredTime() = null");
|
||||
}
|
||||
}
|
||||
// System.println("Settings update(): getTemporalEventRegisteredTime() = " + Background.getTemporalEventRegisteredTime());
|
||||
// if (Background.getTemporalEventRegisteredTime() != null) {
|
||||
// System.println("Settings update(): getTemporalEventRegisteredTime().value() = " + Background.getTemporalEventRegisteredTime().value().format("%d") + " seconds");
|
||||
// } else {
|
||||
// System.println("Settings update(): getTemporalEventRegisteredTime() = null");
|
||||
// }
|
||||
}
|
||||
|
||||
static function getApiKey() as Lang.String {
|
||||
@ -135,10 +132,18 @@ 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
|
||||
}
|
||||
|
||||
static function getPollDelay() as Lang.Number {
|
||||
return mPollDelay * 1000; // Convert to milliseconds
|
||||
}
|
||||
|
||||
static function getConfirmTimeout() as Lang.Number {
|
||||
return mConfirmTimeout * 1000; // Convert to milliseconds
|
||||
}
|
||||
@ -147,10 +152,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);
|
||||
@ -158,4 +159,5 @@ class Settings {
|
||||
Background.deleteTemporalEvent();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -20,7 +20,7 @@
|
||||
// larger submissions in order to prevent overflow of the blue tooth stack.
|
||||
//
|
||||
//-----------------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
// Usage:
|
||||
// wl = new WebLog();
|
||||
// wl.clear();
|
||||
@ -28,7 +28,7 @@
|
||||
// wl.flush();
|
||||
//
|
||||
// https://domain.name/path/log.php
|
||||
//
|
||||
//
|
||||
// <?php
|
||||
// $myfile = fopen("log", "a");
|
||||
// $queries = array();
|
||||
@ -36,11 +36,11 @@
|
||||
// fwrite($myfile, $queries['log']);
|
||||
// print "Success";
|
||||
// ?>
|
||||
//
|
||||
//
|
||||
// Logs published to: https://domain.name/path/log
|
||||
//
|
||||
// https://domain.name/path/log_clear.php
|
||||
//
|
||||
//
|
||||
// <?php
|
||||
// $myfile = fopen("log", "w");
|
||||
// fwrite($myfile, "");
|
||||
@ -78,9 +78,7 @@ class WebLog {
|
||||
var myTime = System.getClockTime();
|
||||
buffer += myTime.hour.format("%02d") + ":" + myTime.min.format("%02d") + ":" + myTime.sec.format("%02d") + " " + str;
|
||||
numCalls++;
|
||||
if (Globals.scDebug) {
|
||||
System.println("WebLog print() str = " + str);
|
||||
}
|
||||
// System.println("WebLog print() str = " + str);
|
||||
if (numCalls >= callsbuffer) {
|
||||
doPrint();
|
||||
}
|
||||
@ -97,9 +95,7 @@ class WebLog {
|
||||
// submission level set by 'callsbuffer'.
|
||||
//
|
||||
function flush() {
|
||||
if (Globals.scDebug) {
|
||||
System.println("WebLog flush()");
|
||||
}
|
||||
// System.println("WebLog flush()");
|
||||
if (numCalls > 0) {
|
||||
doPrint();
|
||||
}
|
||||
@ -108,15 +104,11 @@ class WebLog {
|
||||
// Perform the submission to the online logger.
|
||||
//
|
||||
function doPrint() {
|
||||
if (Globals.scDebug) {
|
||||
System.println("WebLog doPrint()");
|
||||
System.println(buffer);
|
||||
}
|
||||
// System.println("WebLog doPrint()");
|
||||
// System.println(buffer);
|
||||
Communications.makeWebRequest(
|
||||
ClientId.webLogUrl,
|
||||
{
|
||||
"log" => buffer
|
||||
},
|
||||
{ "log" => buffer },
|
||||
{
|
||||
:method => Communications.HTTP_REQUEST_METHOD_GET,
|
||||
:headers => {
|
||||
@ -134,9 +126,7 @@ class WebLog {
|
||||
// execution.
|
||||
//
|
||||
function clear() {
|
||||
if (Globals.scDebug) {
|
||||
System.println("WebLog clear()");
|
||||
}
|
||||
// System.println("WebLog clear()");
|
||||
Communications.makeWebRequest(
|
||||
ClientId.webLogClearUrl,
|
||||
{},
|
||||
@ -156,24 +146,20 @@ class WebLog {
|
||||
// Callback function to print the outcome of a doPrint() method.
|
||||
//
|
||||
function onLog(responseCode as Lang.Number, data as Null or Lang.Dictionary or Lang.String) as Void {
|
||||
if (Globals.scDebug) {
|
||||
if (responseCode != 200) {
|
||||
System.println("WebLog onLog() Failed");
|
||||
System.println("WebLog onLog() Response Code: " + responseCode);
|
||||
System.println("WebLog onLog() Response Data: " + data);
|
||||
}
|
||||
}
|
||||
// if (responseCode != 200) {
|
||||
// System.println("WebLog onLog() Failed");
|
||||
// System.println("WebLog onLog() Response Code: " + responseCode);
|
||||
// System.println("WebLog onLog() Response Data: " + data);
|
||||
// }
|
||||
}
|
||||
|
||||
// Callback function to print the outcome of a clear() method.
|
||||
//
|
||||
function onClear(responseCode as Lang.Number, data as Null or Lang.Dictionary or Lang.String) as Void {
|
||||
if (Globals.scDebug) {
|
||||
if (responseCode != 200) {
|
||||
System.println("WebLog onClear() Failed");
|
||||
System.println("WebLog onClear() Response Code: " + responseCode);
|
||||
System.println("WebLog onClear() Response Data: " + data);
|
||||
}
|
||||
}
|
||||
// if (responseCode != 200) {
|
||||
// System.println("WebLog onClear() Failed");
|
||||
// System.println("WebLog onClear() Response Code: " + responseCode);
|
||||
// System.println("WebLog onClear() Response Data: " + data);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
@ -32,52 +32,42 @@ class WebhookManager {
|
||||
switch (responseCode) {
|
||||
case Communications.BLE_HOST_TIMEOUT:
|
||||
case Communications.BLE_CONNECTION_UNAVAILABLE:
|
||||
if (Globals.scDebug) {
|
||||
System.println("WebhookManager onReturnRequestWebhookId() Response Code: BLE_HOST_TIMEOUT or BLE_CONNECTION_UNAVAILABLE, Bluetooth connection severed.");
|
||||
}
|
||||
ErrorView.show(RezStrings.getWebhookFailed() + "\n" + RezStrings.getNoPhone() + ".");
|
||||
// System.println("WebhookManager onReturnRequestWebhookId() Response Code: BLE_HOST_TIMEOUT or BLE_CONNECTION_UNAVAILABLE, Bluetooth connection severed.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String + ".");
|
||||
break;
|
||||
|
||||
case Communications.BLE_QUEUE_FULL:
|
||||
if (Globals.scDebug) {
|
||||
System.println("WebhookManager onReturnRequestWebhookId() Response Code: BLE_QUEUE_FULL, API calls too rapid.");
|
||||
}
|
||||
ErrorView.show(RezStrings.getWebhookFailed() + "\n" + RezStrings.getApiFlood());
|
||||
// System.println("WebhookManager onReturnRequestWebhookId() Response Code: BLE_QUEUE_FULL, API calls too rapid.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + WatchUi.loadResource($.Rez.Strings.ApiFlood) as Lang.String);
|
||||
break;
|
||||
|
||||
case Communications.NETWORK_REQUEST_TIMED_OUT:
|
||||
if (Globals.scDebug) {
|
||||
System.println("WebhookManager onReturnRequestWebhookId() Response Code: NETWORK_REQUEST_TIMED_OUT, check Internet connection.");
|
||||
}
|
||||
ErrorView.show(RezStrings.getWebhookFailed() + "\n" + RezStrings.getNoResponse());
|
||||
// System.println("WebhookManager onReturnRequestWebhookId() Response Code: NETWORK_REQUEST_TIMED_OUT, check Internet connection.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + WatchUi.loadResource($.Rez.Strings.NoResponse) as Lang.String);
|
||||
break;
|
||||
|
||||
case Communications.NETWORK_RESPONSE_OUT_OF_MEMORY:
|
||||
if (Globals.scDebug) {
|
||||
System.println("WebhookManager onReturnRequestWebhookId() Response Code: NETWORK_RESPONSE_OUT_OF_MEMORY, are we going too fast?");
|
||||
}
|
||||
// System.println("WebhookManager onReturnRequestWebhookId() Response Code: NETWORK_RESPONSE_OUT_OF_MEMORY, are we going too fast?");
|
||||
// Ignore and see if we can carry on
|
||||
break;
|
||||
case Communications.INVALID_HTTP_BODY_IN_NETWORK_RESPONSE:
|
||||
if (Globals.scDebug) {
|
||||
System.println("WebhookManager onReturnRequestWebhookId() Response Code: INVALID_HTTP_BODY_IN_NETWORK_RESPONSE, check JSON is returned.");
|
||||
}
|
||||
// System.println("WebhookManager onReturnRequestWebhookId() Response Code: INVALID_HTTP_BODY_IN_NETWORK_RESPONSE, check JSON is returned.");
|
||||
Settings.unsetIsBatteryLevelEnabled();
|
||||
ErrorView.show(RezStrings.getWebhookFailed() + "\n" + RezStrings.getNoJson());
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + WatchUi.loadResource($.Rez.Strings.NoJson) as Lang.String);
|
||||
break;
|
||||
|
||||
case 404:
|
||||
if (Globals.scDebug) {
|
||||
System.println("WebhookManager onReturnRequestWebhookId() Response Code: 404, page not found. Check API URL setting.");
|
||||
}
|
||||
// System.println("WebhookManager onReturnRequestWebhookId() Response Code: 404, page not found. Check API URL setting.");
|
||||
Settings.unsetIsBatteryLevelEnabled();
|
||||
ErrorView.show(RezStrings.getWebhookFailed() + "\n" + RezStrings.getApiUrlNotFound());
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + WatchUi.loadResource($.Rez.Strings.ApiUrlNotFound) as Lang.String);
|
||||
break;
|
||||
|
||||
case 200:
|
||||
case 201:
|
||||
var id = data.get("webhook_id") as Lang.String or Null;
|
||||
if (id != null) {
|
||||
Settings.setWebhookId(id);
|
||||
// System.println("WebhookManager onReturnRegisterWebhookSensor(): Registering first sensor: Battery Level");
|
||||
registerWebhookSensor({
|
||||
"device_class" => "battery",
|
||||
"name" => "Battery Level",
|
||||
@ -88,50 +78,37 @@ class WebhookManager {
|
||||
"state_class" => "measurement",
|
||||
"entity_category" => "diagnostic",
|
||||
"disabled" => false
|
||||
});
|
||||
registerWebhookSensor({
|
||||
"device_class" => "battery_charging",
|
||||
"name" => "Battery is Charging",
|
||||
"state" => System.getSystemStats().charging,
|
||||
"type" => "binary_sensor",
|
||||
"unique_id" => "battery_is_charging",
|
||||
"entity_category" => "diagnostic",
|
||||
"disabled" => false
|
||||
});
|
||||
}, 0);
|
||||
} else {
|
||||
if (Globals.scDebug) {
|
||||
System.println("WebhookManager onReturnRequestWebhookId(): No webhook id in response data.");
|
||||
}
|
||||
// System.println("WebhookManager onReturnRequestWebhookId(): No webhook id in response data.");
|
||||
Settings.unsetIsBatteryLevelEnabled();
|
||||
ErrorView.show(RezStrings.getWebhookFailed());
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
if (Globals.scDebug) {
|
||||
System.println("WebhookManager onReturnRequestWebhookId(): Unhandled HTTP response code = " + responseCode);
|
||||
}
|
||||
// System.println("WebhookManager onReturnRequestWebhookId(): Unhandled HTTP response code = " + responseCode);
|
||||
Settings.unsetIsBatteryLevelEnabled();
|
||||
ErrorView.show(RezStrings.getWebhookFailed() + "\n" + RezStrings.getUnhandledHttpErr() + responseCode);
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + WatchUi.loadResource($.Rez.Strings.UnhandledHttpErr) as Lang.String + responseCode);
|
||||
}
|
||||
}
|
||||
|
||||
function requestWebhookId() {
|
||||
if (Globals.scDebug) {
|
||||
System.println("WebhookManager requestWebhookId(): Requesting webhook id");
|
||||
}
|
||||
// System.println("WebhookManager requestWebhookId(): Requesting webhook id");
|
||||
var deviceSettings = System.getDeviceSettings();
|
||||
Communications.makeWebRequest(
|
||||
Settings.getApiUrl() + "/mobile_app/registrations",
|
||||
{
|
||||
"device_id" => System.getDeviceSettings().uniqueIdentifier,
|
||||
"device_id" => deviceSettings.uniqueIdentifier,
|
||||
"app_id" => "garmin_home_assistant",
|
||||
"app_name" => RezStrings.getAppName(),
|
||||
"app_name" => WatchUi.loadResource($.Rez.Strings.AppName) as Lang.String,
|
||||
"app_version" => "",
|
||||
"device_name" => "Garmin Watch",
|
||||
"device_name" => "Garmin Device",
|
||||
"manufacturer" => "Garmin",
|
||||
"model" => "",
|
||||
// An unhelpful part number that can be translated to a familiar model name.
|
||||
"model" => deviceSettings.partNumber,
|
||||
"os_name" => "",
|
||||
"os_version" => Lang.format("$1$.$2$", System.getDeviceSettings().firmwareVersion),
|
||||
"os_version" => Lang.format("$1$.$2$", deviceSettings.firmwareVersion),
|
||||
"supports_encryption" => false,
|
||||
"app_data" => {}
|
||||
},
|
||||
@ -147,87 +124,124 @@ class WebhookManager {
|
||||
);
|
||||
}
|
||||
|
||||
function onReturnRegisterWebhookSensor(responseCode as Lang.Number, data as Null or Lang.Dictionary or Lang.String) as Void {
|
||||
function onReturnRegisterWebhookSensor(responseCode as Lang.Number, data as Null or Lang.Dictionary or Lang.String, step as Lang.Number) as Void {
|
||||
switch (responseCode) {
|
||||
case Communications.BLE_HOST_TIMEOUT:
|
||||
case Communications.BLE_CONNECTION_UNAVAILABLE:
|
||||
if (Globals.scDebug) {
|
||||
System.println("WebhookManager onReturnRegisterWebhookSensor() Response Code: BLE_HOST_TIMEOUT or BLE_CONNECTION_UNAVAILABLE, Bluetooth connection severed.");
|
||||
}
|
||||
// System.println("WebhookManager onReturnRegisterWebhookSensor() Response Code: BLE_HOST_TIMEOUT or BLE_CONNECTION_UNAVAILABLE, Bluetooth connection severed.");
|
||||
Settings.unsetWebhookId();
|
||||
ErrorView.show(RezStrings.getWebhookFailed() + "\n" + RezStrings.getNoPhone() + ".");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String + ".");
|
||||
break;
|
||||
|
||||
case Communications.BLE_QUEUE_FULL:
|
||||
if (Globals.scDebug) {
|
||||
System.println("WebhookManager onReturnRegisterWebhookSensor() Response Code: BLE_QUEUE_FULL, API calls too rapid.");
|
||||
}
|
||||
// System.println("WebhookManager onReturnRegisterWebhookSensor() Response Code: BLE_QUEUE_FULL, API calls too rapid.");
|
||||
Settings.unsetWebhookId();
|
||||
ErrorView.show(RezStrings.getWebhookFailed() + "\n" + RezStrings.getApiFlood());
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + WatchUi.loadResource($.Rez.Strings.ApiFlood) as Lang.String);
|
||||
break;
|
||||
|
||||
case Communications.NETWORK_REQUEST_TIMED_OUT:
|
||||
if (Globals.scDebug) {
|
||||
System.println("WebhookManager onReturnRegisterWebhookSensor() Response Code: NETWORK_REQUEST_TIMED_OUT, check Internet connection.");
|
||||
}
|
||||
// System.println("WebhookManager onReturnRegisterWebhookSensor() Response Code: NETWORK_REQUEST_TIMED_OUT, check Internet connection.");
|
||||
Settings.unsetWebhookId();
|
||||
ErrorView.show(RezStrings.getWebhookFailed() + "\n" + RezStrings.getNoResponse());
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + WatchUi.loadResource($.Rez.Strings.NoResponse) as Lang.String);
|
||||
break;
|
||||
|
||||
case Communications.NETWORK_RESPONSE_OUT_OF_MEMORY:
|
||||
if (Globals.scDebug) {
|
||||
System.println("WebhookManager onReturnRegisterWebhookSensor() Response Code: NETWORK_RESPONSE_OUT_OF_MEMORY, are we going too fast?");
|
||||
}
|
||||
// System.println("WebhookManager onReturnRegisterWebhookSensor() Response Code: NETWORK_RESPONSE_OUT_OF_MEMORY, are we going too fast?");
|
||||
Settings.unsetWebhookId();
|
||||
// Ignore and see if we can carry on
|
||||
break;
|
||||
|
||||
case Communications.INVALID_HTTP_BODY_IN_NETWORK_RESPONSE:
|
||||
if (Globals.scDebug) {
|
||||
System.println("WebhookManager onReturnRegisterWebhookSensor() Response Code: INVALID_HTTP_BODY_IN_NETWORK_RESPONSE, check JSON is returned.");
|
||||
}
|
||||
// System.println("WebhookManager onReturnRegisterWebhookSensor() Response Code: INVALID_HTTP_BODY_IN_NETWORK_RESPONSE, check JSON is returned.");
|
||||
Settings.unsetWebhookId();
|
||||
Settings.unsetIsBatteryLevelEnabled();
|
||||
ErrorView.show(RezStrings.getWebhookFailed() + "\n" + RezStrings.getNoJson());
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + WatchUi.loadResource($.Rez.Strings.NoJson) as Lang.String);
|
||||
break;
|
||||
|
||||
case 404:
|
||||
if (Globals.scDebug) {
|
||||
System.println("WebhookManager onReturnRequestWebhookId() Response Code: 404, page not found. Check API URL setting.");
|
||||
}
|
||||
// System.println("WebhookManager onReturnRequestWebhookId() Response Code: 404, page not found. Check API URL setting.");
|
||||
Settings.unsetWebhookId();
|
||||
Settings.unsetIsBatteryLevelEnabled();
|
||||
ErrorView.show(RezStrings.getWebhookFailed() + "\n" + RezStrings.getApiUrlNotFound());
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + WatchUi.loadResource($.Rez.Strings.ApiUrlNotFound) as Lang.String);
|
||||
break;
|
||||
|
||||
case 200:
|
||||
case 201:
|
||||
if ((data.get("success") as Lang.Boolean or Null) == true) {
|
||||
if (Globals.scDebug) {
|
||||
System.println("WebhookManager onReturnRegisterWebhookSensor(): Success");
|
||||
if ((data.get("success") as Lang.Boolean or Null) != false) {
|
||||
// System.println("WebhookManager onReturnRegisterWebhookSensor(): Success");
|
||||
switch (step) {
|
||||
case 0:
|
||||
// System.println("WebhookManager onReturnRegisterWebhookSensor(): Registering next sensor: Battery is Charging");
|
||||
registerWebhookSensor({
|
||||
"device_class" => "battery_charging",
|
||||
"name" => "Battery is Charging",
|
||||
"state" => System.getSystemStats().charging,
|
||||
"type" => "binary_sensor",
|
||||
"unique_id" => "battery_is_charging",
|
||||
"entity_category" => "diagnostic",
|
||||
"disabled" => false
|
||||
}, 1);
|
||||
break;
|
||||
case 1:
|
||||
// System.println("WebhookManager onReturnRegisterWebhookSensor(): Registering next sensor: Activity");
|
||||
if (Activity has :getProfileInfo) {
|
||||
var activity = Activity.getProfileInfo().sport;
|
||||
if ((Activity.getActivityInfo() != null) and
|
||||
((Activity.getActivityInfo().elapsedTime == null) or
|
||||
(Activity.getActivityInfo().elapsedTime == 0))) {
|
||||
// Indicate no activity with -1, not part of Garmin's activity codes.
|
||||
// https://developer.garmin.com/connect-iq/api-docs/Toybox/Activity.html#Sport-module
|
||||
activity = -1;
|
||||
}
|
||||
registerWebhookSensor({
|
||||
"name" => "Activity",
|
||||
"state" => activity,
|
||||
"type" => "sensor",
|
||||
"unique_id" => "activity",
|
||||
"disabled" => false
|
||||
}, 2);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
// System.println("WebhookManager onReturnRegisterWebhookSensor(): Registering next sensor: Activity");
|
||||
if (Activity has :getProfileInfo) {
|
||||
var sub_activity = Activity.getProfileInfo().subSport;
|
||||
if ((Activity.getActivityInfo() != null) and
|
||||
((Activity.getActivityInfo().elapsedTime == null) or
|
||||
(Activity.getActivityInfo().elapsedTime == 0))) {
|
||||
// Indicate no activity with -1, not part of Garmin's activity codes.
|
||||
// https://developer.garmin.com/connect-iq/api-docs/Toybox/Activity.html#Sport-module
|
||||
sub_activity = -1;
|
||||
}
|
||||
registerWebhookSensor({
|
||||
"name" => "Sub-activity",
|
||||
"state" => sub_activity,
|
||||
"type" => "sensor",
|
||||
"unique_id" => "sub_activity",
|
||||
"disabled" => false
|
||||
}, 3);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
}
|
||||
} else {
|
||||
if (Globals.scDebug) {
|
||||
System.println("WebhookManager onReturnRegisterWebhookSensor(): Failure");
|
||||
}
|
||||
// System.println("WebhookManager onReturnRegisterWebhookSensor(): Failure");
|
||||
Settings.unsetWebhookId();
|
||||
Settings.unsetIsBatteryLevelEnabled();
|
||||
ErrorView.show(RezStrings.getWebhookFailed());
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
if (Globals.scDebug) {
|
||||
System.println("WebhookManager onReturnRequestWebhookId(): Unhandled HTTP response code = " + responseCode);
|
||||
}
|
||||
// System.println("WebhookManager onReturnRequestWebhookId(): Unhandled HTTP response code = " + responseCode);
|
||||
Settings.unsetWebhookId();
|
||||
Settings.unsetIsBatteryLevelEnabled();
|
||||
ErrorView.show(RezStrings.getWebhookFailed() + "\n" + RezStrings.getUnhandledHttpErr() + responseCode);
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + WatchUi.loadResource($.Rez.Strings.UnhandledHttpErr) as Lang.String + responseCode);
|
||||
}
|
||||
}
|
||||
|
||||
function registerWebhookSensor(sensor as Lang.Object) {
|
||||
if (Globals.scDebug) {
|
||||
System.println("WebhookManager registerWebhookSensor(): Registering webhook sensor: " + sensor.toString());
|
||||
}
|
||||
function registerWebhookSensor(sensor as Lang.Object, step as Lang.Number) {
|
||||
// System.println("WebhookManager registerWebhookSensor(): Registering webhook sensor: " + sensor.toString());
|
||||
Communications.makeWebRequest(
|
||||
Settings.getApiUrl() + "/webhook/" + Settings.getWebhookId(),
|
||||
{
|
||||
@ -239,7 +253,8 @@ class WebhookManager {
|
||||
:headers => {
|
||||
"Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON
|
||||
},
|
||||
:responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON
|
||||
:responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON,
|
||||
:context => step
|
||||
},
|
||||
method(:onReturnRegisterWebhookSensor)
|
||||
);
|
||||
|
1
web/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
node_modules/
|
449
web/index.html
Normal file
@ -0,0 +1,449 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>GarminHomeAssistant</title>
|
||||
|
||||
<link
|
||||
rel="stylesheet"
|
||||
data-name="vs/editor/editor.main"
|
||||
href="https://unpkg.com/monaco-editor@0.45.0/min/vs/editor/editor.main.css" />
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="https://unpkg.com/toastify-js@1.12.0/src/toastify.css" />
|
||||
<style>
|
||||
@import url('https://unpkg.com/@catppuccin/palette/css/catppuccin.css');
|
||||
|
||||
body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
html,
|
||||
body,
|
||||
#container {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
background-color: var(--ctp-mocha-base);
|
||||
}
|
||||
|
||||
.tap {
|
||||
background-image: url(../resources-icons-48/tap_type.svg);
|
||||
background-size: contain;
|
||||
margin-left: 0.5em;
|
||||
filter: grayscale() invert();
|
||||
}
|
||||
.template {
|
||||
background-image: url(../resources-icons-48/info_type.svg);
|
||||
background-size: contain;
|
||||
margin-left: 0.5em;
|
||||
filter: grayscale() invert();
|
||||
}
|
||||
.toggle_on {
|
||||
background-image: url(https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/toggle_on/default/48px.svg);
|
||||
background-size: contain;
|
||||
margin-left: 0.5em;
|
||||
filter: grayscale() invert();
|
||||
rotate: -90deg;
|
||||
}
|
||||
.toggle_off {
|
||||
background-image: url(https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/toggle_off/default/48px.svg);
|
||||
background-size: contain;
|
||||
margin-left: 0.5em;
|
||||
filter: grayscale() invert();
|
||||
rotate: -90deg;
|
||||
}
|
||||
.group {
|
||||
background-image: url(../resources-icons-48/group_type.svg);
|
||||
background-size: contain;
|
||||
margin-left: 0.5em;
|
||||
filter: grayscale() invert();
|
||||
}
|
||||
|
||||
:root {
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
}
|
||||
|
||||
#settings {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
padding: 0.4em;
|
||||
gap: 0.25em;
|
||||
background-color: var(--ctp-mocha-mantle);
|
||||
color: var(--ctp-mocha-text);
|
||||
}
|
||||
|
||||
dialog {
|
||||
background-color: var(--ctp-mocha-base);
|
||||
color: var(--ctp-mocha-text);
|
||||
border: 1px solid var(--ctp-mocha-surface1);
|
||||
border-radius: 0.25em;
|
||||
padding: 0.5em;
|
||||
max-width: min(900px, calc(100% - 10em));
|
||||
max-height: 500px;
|
||||
|
||||
& > div {
|
||||
margin-bottom: 0.5em;
|
||||
|
||||
& > p {
|
||||
margin-inline: 0.5em;
|
||||
}
|
||||
& > code {
|
||||
margin: 0.5em;
|
||||
}
|
||||
}
|
||||
|
||||
&:focus-within,
|
||||
&:focus-visible {
|
||||
outline: none;
|
||||
border: 1px solid var(--ctp-mocha-teal);
|
||||
}
|
||||
|
||||
&::backdrop {
|
||||
background-color: black;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
& h2 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
padding: 0.4em;
|
||||
gap: 0.25em;
|
||||
}
|
||||
|
||||
#settings:has(.invalid, :invalid) + #container {
|
||||
opacity: 0.5;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
#settings,
|
||||
dialog {
|
||||
& input {
|
||||
background-color: var(--ctp-mocha-surface1);
|
||||
color: var(--ctp-mocha-text);
|
||||
border: 1px solid var(--ctp-mocha-surface1);
|
||||
border-radius: 0.25em;
|
||||
padding: 0.25em;
|
||||
|
||||
&::placeholder {
|
||||
color: var(--ctp-mocha-text);
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
&:focus-visible {
|
||||
outline: none;
|
||||
border: 1px solid var(--ctp-mocha-teal);
|
||||
}
|
||||
|
||||
&.outofsync {
|
||||
border: 1px solid var(--ctp-mocha-yellow);
|
||||
}
|
||||
|
||||
&.invalid,
|
||||
&:invalid {
|
||||
border: 1px solid var(--ctp-mocha-red);
|
||||
}
|
||||
|
||||
flex-grow: 1;
|
||||
&#api_token {
|
||||
flex-grow: 0;
|
||||
}
|
||||
}
|
||||
|
||||
code {
|
||||
display: block;
|
||||
background-color: var(--ctp-mocha-surface1);
|
||||
border-radius: 0.5em;
|
||||
padding: 1em;
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
|
||||
& pre {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
}
|
||||
|
||||
kbd {
|
||||
background-color: var(--ctp-mocha-surface1);
|
||||
border-radius: 0.25em;
|
||||
padding: 0.25em;
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--ctp-mocha-teal);
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
button {
|
||||
background-color: var(--ctp-mocha-surface1);
|
||||
color: var(--ctp-mocha-text);
|
||||
border: 1px solid var(--ctp-mocha-surface1);
|
||||
border-radius: 0.25em;
|
||||
padding-inline: 0.5em;
|
||||
padding-block: 0.25em;
|
||||
user-select: none;
|
||||
|
||||
&:focus-visible {
|
||||
outline: none;
|
||||
border: 1px solid var(--ctp-mocha-teal);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
background-color: var(--ctp-mocha-surface0);
|
||||
}
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
button.icon {
|
||||
border: none;
|
||||
padding: 0.1em;
|
||||
margin: 0;
|
||||
width: 1.8em;
|
||||
height: 1.8em;
|
||||
background-color: var(--ctp-mocha-surface1);
|
||||
|
||||
&:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: var(--ctp-mocha-overlay1);
|
||||
}
|
||||
|
||||
&::before {
|
||||
display: block;
|
||||
content: '';
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
filter: grayscale() invert();
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
&[icon='close'] {
|
||||
&:hover {
|
||||
background-color: var(--ctp-mocha-red);
|
||||
}
|
||||
&::before {
|
||||
background-image: url(https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/close/default/48px.svg);
|
||||
}
|
||||
}
|
||||
&[icon='download']::before {
|
||||
background-image: url(https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/download/default/48px.svg);
|
||||
}
|
||||
&[icon='copy']::before {
|
||||
background-image: url(https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/content_copy/default/48px.svg);
|
||||
}
|
||||
&[icon='info']::before {
|
||||
background-image: url(https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/info/default/48px.svg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 0.6em;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track-piece {
|
||||
background-color: var(--ctp-mocha-mantle);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: var(--ctp-mocha-surface1);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background-color: var(--ctp-mocha-overlay1);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="settings">
|
||||
<input
|
||||
required
|
||||
placeholder="https://<home-assistant>/api"
|
||||
title="Home Assistant API URL `https://<home-assistant>/api`"
|
||||
type="url"
|
||||
name="api_url"
|
||||
id="api_url"
|
||||
pattern="https://.*/api" />
|
||||
<input
|
||||
placeholder="https://<home-assistant>/local/garmin/menu.json"
|
||||
title="Menu JSON URL `https://<home-assistant>/local/garmin/menu.json`"
|
||||
type="url"
|
||||
name="menu_url"
|
||||
id="menu_url"
|
||||
pattern="https://.*\.json" />
|
||||
<button
|
||||
title="Download content of menu url and put it in the editor"
|
||||
class="icon"
|
||||
icon="download"
|
||||
id="download"
|
||||
type="button"></button>
|
||||
<button
|
||||
title="Copy the content of the editor to the clipboard"
|
||||
class="icon"
|
||||
icon="copy"
|
||||
id="copy"
|
||||
type="button"></button>
|
||||
<input
|
||||
required
|
||||
autocomplete="new-password"
|
||||
placeholder="API Token"
|
||||
title="Home Assistant Long-lived Access Token"
|
||||
type="password"
|
||||
name="api_token"
|
||||
id="api_token" />
|
||||
<button id="troubleshooting" type="button">Troubleshooting</button>
|
||||
<button
|
||||
title="How to use the editor"
|
||||
class="icon"
|
||||
icon="info"
|
||||
id="info"
|
||||
type="button"></button>
|
||||
</div>
|
||||
|
||||
<div id="container"></div>
|
||||
|
||||
<dialog id="troubleshooting-dialog">
|
||||
<div>
|
||||
<div class="row">
|
||||
<h2>GarminHomeAssistant Troubleshooting</h2>
|
||||
<button
|
||||
title="Close"
|
||||
class="icon"
|
||||
icon="close"
|
||||
onclick="this.parentElement.parentElement.parentElement.close()"
|
||||
type="button"></button>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
This is a troubleshooting tool for the GarminHomeAssistant watch app.
|
||||
It allows you to test your Home Assistant API connection.
|
||||
</p>
|
||||
|
||||
<div class="row">
|
||||
<div id="test-api-response">Check now!</div>
|
||||
<button
|
||||
title="Check the status of the API"
|
||||
id="test-api"
|
||||
type="button">
|
||||
Test API
|
||||
</button>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div id="test-menu-response">Check now!</div>
|
||||
<button
|
||||
title="Check the availability of the menu configuration"
|
||||
id="test-menu"
|
||||
type="button">
|
||||
Test menu
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</dialog>
|
||||
|
||||
<dialog id="info-dialog">
|
||||
<div>
|
||||
<div class="row">
|
||||
<h2>GarminHomeAssistant Web Editor</h2>
|
||||
<button
|
||||
title="Close"
|
||||
class="icon"
|
||||
icon="close"
|
||||
onclick="this.parentElement.parentElement.parentElement.close()"
|
||||
type="button"></button>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
This is the web editor for the GarminHomeAssistant watch app, it
|
||||
offers enhanced schema checking and validation over the original JSON
|
||||
schema by using the HomeAssistant API to create a schema based on your
|
||||
HomeAssistant configuration.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
This editor makes use of the same credentials as the watch app (these
|
||||
can be pasted in the top bar of this page). However in order for this
|
||||
editor to work, you will need to amend the CORS settings of your
|
||||
HomeAssistant instance. Add this to your configuration.yaml file:
|
||||
</p>
|
||||
|
||||
<code>
|
||||
<pre id="cors-settings" data-lang="yaml">
|
||||
http:
|
||||
cors_allowed_origins:
|
||||
- https://house-of-abbey.github.io</pre
|
||||
>
|
||||
</code>
|
||||
|
||||
<p>
|
||||
Once you have added this to your configuration.yaml file, you will
|
||||
need to restart HomeAssistant. After HomeAssistant is restarted,
|
||||
reload this page.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Now you should have validation and autocompletion, anywhere in the
|
||||
editor, press <kbd>Ctrl</kbd> + <kbd>Space</kbd> to see the available
|
||||
options. You will also see red lines under syntax errors and yellow
|
||||
lines under validation errors. Hover over these lines to see the
|
||||
message. You can also click on the `Run Action` and `Toggle` buttons
|
||||
to test your actions.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
In the top bar there are 4 buttons, the first button will download the
|
||||
online version of your menu.json file and put it in the editor. The
|
||||
second button will copy the content of the editor to the clipboard.
|
||||
The third button will open the troubleshooting dialog, this will allow
|
||||
you to test your HomeAssistant API connection. The fourth button will
|
||||
open this dialog.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
For directions on how to write your menu.json file, please see the
|
||||
<a
|
||||
href="https://github.com/house-of-abbey/GarminHomeAssistant#dashboard-definition"
|
||||
>README</a
|
||||
>
|
||||
in the GitHub repo.
|
||||
</p>
|
||||
</div>
|
||||
</dialog>
|
||||
|
||||
<script src="https://unpkg.com/monaco-editor@0.45.0/min/vs/loader.js"></script>
|
||||
<script src="https://unpkg.com/json-ast-comments@1.1.1/lib/json.js"></script>
|
||||
<script src="https://unpkg.com/toastify-js@1.12.0/src/toastify.js"></script>
|
||||
<script type="module" src="./main.js"></script>
|
||||
</body>
|
||||
</html>
|
12
web/jsconfig.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"lib": ["esnext", "dom"],
|
||||
"types": [
|
||||
"./node_modules/monaco-editor/monaco.d.ts",
|
||||
"./node_modules/json-ast-comments/lib/index.d.ts",
|
||||
"./node_modules/@types/toastify-js/index.d.ts",
|
||||
"./types.d.ts"
|
||||
]
|
||||
},
|
||||
"include": ["."]
|
||||
}
|
1162
web/main.js
Normal file
19
web/package.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "web",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"start": "serve .."
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"@types/toastify-js": "^1.12.3",
|
||||
"@vscode/webview-ui-toolkit": "1.4.0",
|
||||
"json-ast-comments": "1.1.1",
|
||||
"monaco-editor": "0.45.0",
|
||||
"serve": "^14.2.1"
|
||||
}
|
||||
}
|
676
web/pnpm-lock.yaml
generated
Normal file
@ -0,0 +1,676 @@
|
||||
lockfileVersion: '6.0'
|
||||
|
||||
settings:
|
||||
autoInstallPeers: true
|
||||
excludeLinksFromLockfile: false
|
||||
|
||||
devDependencies:
|
||||
'@types/toastify-js':
|
||||
specifier: ^1.12.3
|
||||
version: 1.12.3
|
||||
'@vscode/webview-ui-toolkit':
|
||||
specifier: 1.4.0
|
||||
version: 1.4.0(react@18.2.0)
|
||||
json-ast-comments:
|
||||
specifier: 1.1.1
|
||||
version: 1.1.1
|
||||
monaco-editor:
|
||||
specifier: 0.45.0
|
||||
version: 0.45.0
|
||||
serve:
|
||||
specifier: ^14.2.1
|
||||
version: 14.2.1
|
||||
|
||||
packages:
|
||||
|
||||
/@microsoft/fast-element@1.12.0:
|
||||
resolution: {integrity: sha512-gQutuDHPKNxUEcQ4pypZT4Wmrbapus+P9s3bR/SEOLsMbNqNoXigGImITygI5zhb+aA5rzflM6O8YWkmRbGkPA==}
|
||||
dev: true
|
||||
|
||||
/@microsoft/fast-foundation@2.49.4:
|
||||
resolution: {integrity: sha512-5I2tSPo6bnOfVAIX7XzX+LhilahwvD7h+yzl3jW0t5IYmMX9Lci9VUVyx5f8hHdb1O9a8Y9Atb7Asw7yFO/u+w==}
|
||||
dependencies:
|
||||
'@microsoft/fast-element': 1.12.0
|
||||
'@microsoft/fast-web-utilities': 5.4.1
|
||||
tabbable: 5.3.3
|
||||
tslib: 1.14.1
|
||||
dev: true
|
||||
|
||||
/@microsoft/fast-react-wrapper@0.3.22(react@18.2.0):
|
||||
resolution: {integrity: sha512-XhlX4m6znh7XW92oPvlKoG9USUn9JtF9rP1qtUoIbkaDaFtUS+H8o1Jn6/oK/rS44LbBLJXrvRkInmSWlDiGFw==}
|
||||
peerDependencies:
|
||||
react: '>=16.9.0'
|
||||
dependencies:
|
||||
'@microsoft/fast-element': 1.12.0
|
||||
'@microsoft/fast-foundation': 2.49.4
|
||||
react: 18.2.0
|
||||
dev: true
|
||||
|
||||
/@microsoft/fast-web-utilities@5.4.1:
|
||||
resolution: {integrity: sha512-ReWYncndjV3c8D8iq9tp7NcFNc1vbVHvcBFPME2nNFKNbS1XCesYZGlIlf3ot5EmuOXPlrzUHOWzQ2vFpIkqDg==}
|
||||
dependencies:
|
||||
exenv-es6: 1.1.1
|
||||
dev: true
|
||||
|
||||
/@types/toastify-js@1.12.3:
|
||||
resolution: {integrity: sha512-9RjLlbAHMSaae/KZNHGv19VG4gcLIm3YjvacCXBtfMfYn26h76YP5oxXI8k26q4iKXCB9LNfv18lsoS0JnFPTg==}
|
||||
dev: true
|
||||
|
||||
/@vscode/webview-ui-toolkit@1.4.0(react@18.2.0):
|
||||
resolution: {integrity: sha512-modXVHQkZLsxgmd5yoP3ptRC/G8NBDD+ob+ngPiWNQdlrH6H1xR/qgOBD85bfU3BhOB5sZzFWBwwhp9/SfoHww==}
|
||||
peerDependencies:
|
||||
react: '>=16.9.0'
|
||||
dependencies:
|
||||
'@microsoft/fast-element': 1.12.0
|
||||
'@microsoft/fast-foundation': 2.49.4
|
||||
'@microsoft/fast-react-wrapper': 0.3.22(react@18.2.0)
|
||||
react: 18.2.0
|
||||
tslib: 2.6.2
|
||||
dev: true
|
||||
|
||||
/@zeit/schemas@2.29.0:
|
||||
resolution: {integrity: sha512-g5QiLIfbg3pLuYUJPlisNKY+epQJTcMDsOnVNkscrDP1oi7vmJnzOANYJI/1pZcVJ6umUkBv3aFtlg1UvUHGzA==}
|
||||
dev: true
|
||||
|
||||
/accepts@1.3.8:
|
||||
resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==}
|
||||
engines: {node: '>= 0.6'}
|
||||
dependencies:
|
||||
mime-types: 2.1.35
|
||||
negotiator: 0.6.3
|
||||
dev: true
|
||||
|
||||
/ajv@8.11.0:
|
||||
resolution: {integrity: sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==}
|
||||
dependencies:
|
||||
fast-deep-equal: 3.1.3
|
||||
json-schema-traverse: 1.0.0
|
||||
require-from-string: 2.0.2
|
||||
uri-js: 4.4.1
|
||||
dev: true
|
||||
|
||||
/ansi-align@3.0.1:
|
||||
resolution: {integrity: sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==}
|
||||
dependencies:
|
||||
string-width: 4.2.3
|
||||
dev: true
|
||||
|
||||
/ansi-regex@5.0.1:
|
||||
resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}
|
||||
engines: {node: '>=8'}
|
||||
dev: true
|
||||
|
||||
/ansi-regex@6.0.1:
|
||||
resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==}
|
||||
engines: {node: '>=12'}
|
||||
dev: true
|
||||
|
||||
/ansi-styles@4.3.0:
|
||||
resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==}
|
||||
engines: {node: '>=8'}
|
||||
dependencies:
|
||||
color-convert: 2.0.1
|
||||
dev: true
|
||||
|
||||
/ansi-styles@6.2.1:
|
||||
resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==}
|
||||
engines: {node: '>=12'}
|
||||
dev: true
|
||||
|
||||
/arch@2.2.0:
|
||||
resolution: {integrity: sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==}
|
||||
dev: true
|
||||
|
||||
/arg@5.0.2:
|
||||
resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==}
|
||||
dev: true
|
||||
|
||||
/balanced-match@1.0.2:
|
||||
resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
|
||||
dev: true
|
||||
|
||||
/boxen@7.0.0:
|
||||
resolution: {integrity: sha512-j//dBVuyacJbvW+tvZ9HuH03fZ46QcaKvvhZickZqtB271DxJ7SNRSNxrV/dZX0085m7hISRZWbzWlJvx/rHSg==}
|
||||
engines: {node: '>=14.16'}
|
||||
dependencies:
|
||||
ansi-align: 3.0.1
|
||||
camelcase: 7.0.1
|
||||
chalk: 5.0.1
|
||||
cli-boxes: 3.0.0
|
||||
string-width: 5.1.2
|
||||
type-fest: 2.19.0
|
||||
widest-line: 4.0.1
|
||||
wrap-ansi: 8.1.0
|
||||
dev: true
|
||||
|
||||
/brace-expansion@1.1.11:
|
||||
resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==}
|
||||
dependencies:
|
||||
balanced-match: 1.0.2
|
||||
concat-map: 0.0.1
|
||||
dev: true
|
||||
|
||||
/bytes@3.0.0:
|
||||
resolution: {integrity: sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==}
|
||||
engines: {node: '>= 0.8'}
|
||||
dev: true
|
||||
|
||||
/camelcase@7.0.1:
|
||||
resolution: {integrity: sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==}
|
||||
engines: {node: '>=14.16'}
|
||||
dev: true
|
||||
|
||||
/chalk-template@0.4.0:
|
||||
resolution: {integrity: sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==}
|
||||
engines: {node: '>=12'}
|
||||
dependencies:
|
||||
chalk: 4.1.2
|
||||
dev: true
|
||||
|
||||
/chalk@4.1.2:
|
||||
resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
|
||||
engines: {node: '>=10'}
|
||||
dependencies:
|
||||
ansi-styles: 4.3.0
|
||||
supports-color: 7.2.0
|
||||
dev: true
|
||||
|
||||
/chalk@5.0.1:
|
||||
resolution: {integrity: sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w==}
|
||||
engines: {node: ^12.17.0 || ^14.13 || >=16.0.0}
|
||||
dev: true
|
||||
|
||||
/cli-boxes@3.0.0:
|
||||
resolution: {integrity: sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==}
|
||||
engines: {node: '>=10'}
|
||||
dev: true
|
||||
|
||||
/clipboardy@3.0.0:
|
||||
resolution: {integrity: sha512-Su+uU5sr1jkUy1sGRpLKjKrvEOVXgSgiSInwa/qeID6aJ07yh+5NWc3h2QfjHjBnfX4LhtFcuAWKUsJ3r+fjbg==}
|
||||
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
|
||||
dependencies:
|
||||
arch: 2.2.0
|
||||
execa: 5.1.1
|
||||
is-wsl: 2.2.0
|
||||
dev: true
|
||||
|
||||
/color-convert@2.0.1:
|
||||
resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}
|
||||
engines: {node: '>=7.0.0'}
|
||||
dependencies:
|
||||
color-name: 1.1.4
|
||||
dev: true
|
||||
|
||||
/color-name@1.1.4:
|
||||
resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
|
||||
dev: true
|
||||
|
||||
/compressible@2.0.18:
|
||||
resolution: {integrity: sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==}
|
||||
engines: {node: '>= 0.6'}
|
||||
dependencies:
|
||||
mime-db: 1.52.0
|
||||
dev: true
|
||||
|
||||
/compression@1.7.4:
|
||||
resolution: {integrity: sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==}
|
||||
engines: {node: '>= 0.8.0'}
|
||||
dependencies:
|
||||
accepts: 1.3.8
|
||||
bytes: 3.0.0
|
||||
compressible: 2.0.18
|
||||
debug: 2.6.9
|
||||
on-headers: 1.0.2
|
||||
safe-buffer: 5.1.2
|
||||
vary: 1.1.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/concat-map@0.0.1:
|
||||
resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
|
||||
dev: true
|
||||
|
||||
/content-disposition@0.5.2:
|
||||
resolution: {integrity: sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==}
|
||||
engines: {node: '>= 0.6'}
|
||||
dev: true
|
||||
|
||||
/cross-spawn@7.0.3:
|
||||
resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==}
|
||||
engines: {node: '>= 8'}
|
||||
dependencies:
|
||||
path-key: 3.1.1
|
||||
shebang-command: 2.0.0
|
||||
which: 2.0.2
|
||||
dev: true
|
||||
|
||||
/debug@2.6.9:
|
||||
resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==}
|
||||
peerDependencies:
|
||||
supports-color: '*'
|
||||
peerDependenciesMeta:
|
||||
supports-color:
|
||||
optional: true
|
||||
dependencies:
|
||||
ms: 2.0.0
|
||||
dev: true
|
||||
|
||||
/deep-extend@0.6.0:
|
||||
resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==}
|
||||
engines: {node: '>=4.0.0'}
|
||||
dev: true
|
||||
|
||||
/eastasianwidth@0.2.0:
|
||||
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
|
||||
dev: true
|
||||
|
||||
/emoji-regex@8.0.0:
|
||||
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
|
||||
dev: true
|
||||
|
||||
/emoji-regex@9.2.2:
|
||||
resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==}
|
||||
dev: true
|
||||
|
||||
/execa@5.1.1:
|
||||
resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==}
|
||||
engines: {node: '>=10'}
|
||||
dependencies:
|
||||
cross-spawn: 7.0.3
|
||||
get-stream: 6.0.1
|
||||
human-signals: 2.1.0
|
||||
is-stream: 2.0.1
|
||||
merge-stream: 2.0.0
|
||||
npm-run-path: 4.0.1
|
||||
onetime: 5.1.2
|
||||
signal-exit: 3.0.7
|
||||
strip-final-newline: 2.0.0
|
||||
dev: true
|
||||
|
||||
/exenv-es6@1.1.1:
|
||||
resolution: {integrity: sha512-vlVu3N8d6yEMpMsEm+7sUBAI81aqYYuEvfK0jNqmdb/OPXzzH7QWDDnVjMvDSY47JdHEqx/dfC/q8WkfoTmpGQ==}
|
||||
dev: true
|
||||
|
||||
/fast-deep-equal@3.1.3:
|
||||
resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
|
||||
dev: true
|
||||
|
||||
/fast-url-parser@1.1.3:
|
||||
resolution: {integrity: sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==}
|
||||
dependencies:
|
||||
punycode: 1.4.1
|
||||
dev: true
|
||||
|
||||
/get-stream@6.0.1:
|
||||
resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==}
|
||||
engines: {node: '>=10'}
|
||||
dev: true
|
||||
|
||||
/has-flag@4.0.0:
|
||||
resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==}
|
||||
engines: {node: '>=8'}
|
||||
dev: true
|
||||
|
||||
/human-signals@2.1.0:
|
||||
resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==}
|
||||
engines: {node: '>=10.17.0'}
|
||||
dev: true
|
||||
|
||||
/ini@1.3.8:
|
||||
resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==}
|
||||
dev: true
|
||||
|
||||
/is-docker@2.2.1:
|
||||
resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==}
|
||||
engines: {node: '>=8'}
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
/is-fullwidth-code-point@3.0.0:
|
||||
resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==}
|
||||
engines: {node: '>=8'}
|
||||
dev: true
|
||||
|
||||
/is-port-reachable@4.0.0:
|
||||
resolution: {integrity: sha512-9UoipoxYmSk6Xy7QFgRv2HDyaysmgSG75TFQs6S+3pDM7ZhKTF/bskZV+0UlABHzKjNVhPjYCLfeZUEg1wXxig==}
|
||||
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
|
||||
dev: true
|
||||
|
||||
/is-stream@2.0.1:
|
||||
resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==}
|
||||
engines: {node: '>=8'}
|
||||
dev: true
|
||||
|
||||
/is-wsl@2.2.0:
|
||||
resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==}
|
||||
engines: {node: '>=8'}
|
||||
dependencies:
|
||||
is-docker: 2.2.1
|
||||
dev: true
|
||||
|
||||
/isexe@2.0.0:
|
||||
resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==}
|
||||
dev: true
|
||||
|
||||
/js-tokens@4.0.0:
|
||||
resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
|
||||
dev: true
|
||||
|
||||
/json-ast-comments@1.1.1:
|
||||
resolution: {integrity: sha512-UOHlf7ns5t1GiI3+T5tf9SN2OepXTo/sqhd+cQj++DaUMKQOOCbX+eRlIoHcEv9m902reDTc1mCJD4J69xFJSg==}
|
||||
dev: true
|
||||
|
||||
/json-schema-traverse@1.0.0:
|
||||
resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==}
|
||||
dev: true
|
||||
|
||||
/loose-envify@1.4.0:
|
||||
resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
js-tokens: 4.0.0
|
||||
dev: true
|
||||
|
||||
/merge-stream@2.0.0:
|
||||
resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==}
|
||||
dev: true
|
||||
|
||||
/mime-db@1.33.0:
|
||||
resolution: {integrity: sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==}
|
||||
engines: {node: '>= 0.6'}
|
||||
dev: true
|
||||
|
||||
/mime-db@1.52.0:
|
||||
resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==}
|
||||
engines: {node: '>= 0.6'}
|
||||
dev: true
|
||||
|
||||
/mime-types@2.1.18:
|
||||
resolution: {integrity: sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==}
|
||||
engines: {node: '>= 0.6'}
|
||||
dependencies:
|
||||
mime-db: 1.33.0
|
||||
dev: true
|
||||
|
||||
/mime-types@2.1.35:
|
||||
resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==}
|
||||
engines: {node: '>= 0.6'}
|
||||
dependencies:
|
||||
mime-db: 1.52.0
|
||||
dev: true
|
||||
|
||||
/mimic-fn@2.1.0:
|
||||
resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==}
|
||||
engines: {node: '>=6'}
|
||||
dev: true
|
||||
|
||||
/minimatch@3.1.2:
|
||||
resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==}
|
||||
dependencies:
|
||||
brace-expansion: 1.1.11
|
||||
dev: true
|
||||
|
||||
/minimist@1.2.8:
|
||||
resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==}
|
||||
dev: true
|
||||
|
||||
/monaco-editor@0.45.0:
|
||||
resolution: {integrity: sha512-mjv1G1ZzfEE3k9HZN0dQ2olMdwIfaeAAjFiwNprLfYNRSz7ctv9XuCT7gPtBGrMUeV1/iZzYKj17Khu1hxoHOA==}
|
||||
dev: true
|
||||
|
||||
/ms@2.0.0:
|
||||
resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==}
|
||||
dev: true
|
||||
|
||||
/negotiator@0.6.3:
|
||||
resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==}
|
||||
engines: {node: '>= 0.6'}
|
||||
dev: true
|
||||
|
||||
/npm-run-path@4.0.1:
|
||||
resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==}
|
||||
engines: {node: '>=8'}
|
||||
dependencies:
|
||||
path-key: 3.1.1
|
||||
dev: true
|
||||
|
||||
/on-headers@1.0.2:
|
||||
resolution: {integrity: sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==}
|
||||
engines: {node: '>= 0.8'}
|
||||
dev: true
|
||||
|
||||
/onetime@5.1.2:
|
||||
resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==}
|
||||
engines: {node: '>=6'}
|
||||
dependencies:
|
||||
mimic-fn: 2.1.0
|
||||
dev: true
|
||||
|
||||
/path-is-inside@1.0.2:
|
||||
resolution: {integrity: sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==}
|
||||
dev: true
|
||||
|
||||
/path-key@3.1.1:
|
||||
resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==}
|
||||
engines: {node: '>=8'}
|
||||
dev: true
|
||||
|
||||
/path-to-regexp@2.2.1:
|
||||
resolution: {integrity: sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==}
|
||||
dev: true
|
||||
|
||||
/punycode@1.4.1:
|
||||
resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==}
|
||||
dev: true
|
||||
|
||||
/punycode@2.3.1:
|
||||
resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
|
||||
engines: {node: '>=6'}
|
||||
dev: true
|
||||
|
||||
/range-parser@1.2.0:
|
||||
resolution: {integrity: sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==}
|
||||
engines: {node: '>= 0.6'}
|
||||
dev: true
|
||||
|
||||
/rc@1.2.8:
|
||||
resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
deep-extend: 0.6.0
|
||||
ini: 1.3.8
|
||||
minimist: 1.2.8
|
||||
strip-json-comments: 2.0.1
|
||||
dev: true
|
||||
|
||||
/react@18.2.0:
|
||||
resolution: {integrity: sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
dependencies:
|
||||
loose-envify: 1.4.0
|
||||
dev: true
|
||||
|
||||
/registry-auth-token@3.3.2:
|
||||
resolution: {integrity: sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==}
|
||||
dependencies:
|
||||
rc: 1.2.8
|
||||
safe-buffer: 5.2.1
|
||||
dev: true
|
||||
|
||||
/registry-url@3.1.0:
|
||||
resolution: {integrity: sha512-ZbgR5aZEdf4UKZVBPYIgaglBmSF2Hi94s2PcIHhRGFjKYu+chjJdYfHn4rt3hB6eCKLJ8giVIIfgMa1ehDfZKA==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
dependencies:
|
||||
rc: 1.2.8
|
||||
dev: true
|
||||
|
||||
/require-from-string@2.0.2:
|
||||
resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
dev: true
|
||||
|
||||
/safe-buffer@5.1.2:
|
||||
resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==}
|
||||
dev: true
|
||||
|
||||
/safe-buffer@5.2.1:
|
||||
resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
|
||||
dev: true
|
||||
|
||||
/serve-handler@6.1.5:
|
||||
resolution: {integrity: sha512-ijPFle6Hwe8zfmBxJdE+5fta53fdIY0lHISJvuikXB3VYFafRjMRpOffSPvCYsbKyBA7pvy9oYr/BT1O3EArlg==}
|
||||
dependencies:
|
||||
bytes: 3.0.0
|
||||
content-disposition: 0.5.2
|
||||
fast-url-parser: 1.1.3
|
||||
mime-types: 2.1.18
|
||||
minimatch: 3.1.2
|
||||
path-is-inside: 1.0.2
|
||||
path-to-regexp: 2.2.1
|
||||
range-parser: 1.2.0
|
||||
dev: true
|
||||
|
||||
/serve@14.2.1:
|
||||
resolution: {integrity: sha512-48er5fzHh7GCShLnNyPBRPEjs2I6QBozeGr02gaacROiyS/8ARADlj595j39iZXAqBbJHH/ivJJyPRWY9sQWZA==}
|
||||
engines: {node: '>= 14'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@zeit/schemas': 2.29.0
|
||||
ajv: 8.11.0
|
||||
arg: 5.0.2
|
||||
boxen: 7.0.0
|
||||
chalk: 5.0.1
|
||||
chalk-template: 0.4.0
|
||||
clipboardy: 3.0.0
|
||||
compression: 1.7.4
|
||||
is-port-reachable: 4.0.0
|
||||
serve-handler: 6.1.5
|
||||
update-check: 1.5.4
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/shebang-command@2.0.0:
|
||||
resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==}
|
||||
engines: {node: '>=8'}
|
||||
dependencies:
|
||||
shebang-regex: 3.0.0
|
||||
dev: true
|
||||
|
||||
/shebang-regex@3.0.0:
|
||||
resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==}
|
||||
engines: {node: '>=8'}
|
||||
dev: true
|
||||
|
||||
/signal-exit@3.0.7:
|
||||
resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==}
|
||||
dev: true
|
||||
|
||||
/string-width@4.2.3:
|
||||
resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==}
|
||||
engines: {node: '>=8'}
|
||||
dependencies:
|
||||
emoji-regex: 8.0.0
|
||||
is-fullwidth-code-point: 3.0.0
|
||||
strip-ansi: 6.0.1
|
||||
dev: true
|
||||
|
||||
/string-width@5.1.2:
|
||||
resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==}
|
||||
engines: {node: '>=12'}
|
||||
dependencies:
|
||||
eastasianwidth: 0.2.0
|
||||
emoji-regex: 9.2.2
|
||||
strip-ansi: 7.1.0
|
||||
dev: true
|
||||
|
||||
/strip-ansi@6.0.1:
|
||||
resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==}
|
||||
engines: {node: '>=8'}
|
||||
dependencies:
|
||||
ansi-regex: 5.0.1
|
||||
dev: true
|
||||
|
||||
/strip-ansi@7.1.0:
|
||||
resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==}
|
||||
engines: {node: '>=12'}
|
||||
dependencies:
|
||||
ansi-regex: 6.0.1
|
||||
dev: true
|
||||
|
||||
/strip-final-newline@2.0.0:
|
||||
resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==}
|
||||
engines: {node: '>=6'}
|
||||
dev: true
|
||||
|
||||
/strip-json-comments@2.0.1:
|
||||
resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
dev: true
|
||||
|
||||
/supports-color@7.2.0:
|
||||
resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==}
|
||||
engines: {node: '>=8'}
|
||||
dependencies:
|
||||
has-flag: 4.0.0
|
||||
dev: true
|
||||
|
||||
/tabbable@5.3.3:
|
||||
resolution: {integrity: sha512-QD9qKY3StfbZqWOPLp0++pOrAVb/HbUi5xCc8cUo4XjP19808oaMiDzn0leBY5mCespIBM0CIZePzZjgzR83kA==}
|
||||
dev: true
|
||||
|
||||
/tslib@1.14.1:
|
||||
resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==}
|
||||
dev: true
|
||||
|
||||
/tslib@2.6.2:
|
||||
resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==}
|
||||
dev: true
|
||||
|
||||
/type-fest@2.19.0:
|
||||
resolution: {integrity: sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==}
|
||||
engines: {node: '>=12.20'}
|
||||
dev: true
|
||||
|
||||
/update-check@1.5.4:
|
||||
resolution: {integrity: sha512-5YHsflzHP4t1G+8WGPlvKbJEbAJGCgw+Em+dGR1KmBUbr1J36SJBqlHLjR7oob7sco5hWHGQVcr9B2poIVDDTQ==}
|
||||
dependencies:
|
||||
registry-auth-token: 3.3.2
|
||||
registry-url: 3.1.0
|
||||
dev: true
|
||||
|
||||
/uri-js@4.4.1:
|
||||
resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
|
||||
dependencies:
|
||||
punycode: 2.3.1
|
||||
dev: true
|
||||
|
||||
/vary@1.1.2:
|
||||
resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==}
|
||||
engines: {node: '>= 0.8'}
|
||||
dev: true
|
||||
|
||||
/which@2.0.2:
|
||||
resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==}
|
||||
engines: {node: '>= 8'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
isexe: 2.0.0
|
||||
dev: true
|
||||
|
||||
/widest-line@4.0.1:
|
||||
resolution: {integrity: sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==}
|
||||
engines: {node: '>=12'}
|
||||
dependencies:
|
||||
string-width: 5.1.2
|
||||
dev: true
|
||||
|
||||
/wrap-ansi@8.1.0:
|
||||
resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==}
|
||||
engines: {node: '>=12'}
|
||||
dependencies:
|
||||
ansi-styles: 6.2.1
|
||||
string-width: 5.1.2
|
||||
strip-ansi: 7.1.0
|
||||
dev: true
|
7
web/types.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
declare namespace json {
|
||||
export function parse(text: string): import('json-ast-comments').JsonDocument;
|
||||
}
|
||||
|
||||
declare module 'https://cdn.jsdelivr.net/npm/monaco-yaml@5.1.1/+esm' {
|
||||
export * from 'monaco-yaml';
|
||||
}
|