Compare commits

..

113 Commits
v2.27 ... v3.2

Author SHA1 Message Date
Philip Abbey
2923c8faec Documentation update for v3.2 2025-08-15 17:54:19 +01:00
Philip Abbey
a37b9842cb Update HISTORY.md
Amended v3.1 text. Added v3.2 text.
2025-08-15 17:26:32 +01:00
__JosephAbbey
ec2324a8d1 Only re-register sensors if the state has changed (#275) 2025-08-15 17:15:02 +01:00
Philip Abbey
7d77a79ad8 Fix for update before Webhook ID (re-)created. 2025-08-15 17:04:54 +01:00
Philip Abbey
756647d156 Added Setting option to clear the Webhook ID
Co-Authored-By: __JosephAbbey <me@josephabbey.dev>
2025-08-15 15:23:30 +01:00
Joseph Abbey
25cbcfe59a Rename variable 2025-08-15 13:56:46 +01:00
Philip Abbey
04dec1a8ba Merge branch 'main' into 273-only-reregister-sensors-if-the-setting-has-been-updated 2025-08-15 13:41:37 +01:00
Philip Abbey
46740fac76 Update HISTORY.md
Amended v3.1 test to include the bug fix.
2025-08-15 13:39:56 +01:00
Joseph Abbey
474bd552ad Only re-register sensors if the state has changed 2025-08-15 13:22:29 +01:00
Philip Abbey
649f0f250d 264 add custom https headers for eg cloudflare tunnels (#272)
Additional settings to provide a custom HTTP header so that the
application can work with Cloudflare's Web Application Firewall (WAF).
2025-08-15 13:09:27 +01:00
Philip Abbey
5a0bd98ddb Candidate bug fix for crash opening app from glance
Changed the function parameters on WebhookManager.onReturnRegisterWebhookSensor() to remove the last optional parameter that was causing the error message and this appears to keep the application happy on start up. Looks like an API request race between the glance's last call and the app first call.

Co-Authored-By: __JosephAbbey <me@josephabbey.dev>
2025-08-15 12:56:22 +01:00
Philip Abbey
ce81c6af0a Review comments
Co-Authored-By: Lars Pöpperl <45465820+tispokes@users.noreply.github.com>
2025-08-11 20:07:10 +01:00
Philip Abbey
3d7b588d2c small doc suggestions (#271)
Thank you!
2025-08-10 20:52:29 +01:00
Philip Abbey
166b5f4ec3 Found a path to a crash condition
Preventing a de-reference of null when the HA server is unreachable.
2025-08-10 20:50:12 +01:00
Philip Abbey
57128bf7a4 Update README.md
Amended path to create security tokens.
2025-08-10 19:09:52 +01:00
Philip Abbey
64bebded0a Update GarminHomeAssistantSettings.png 2025-08-10 18:42:48 +01:00
tispokes
b9db9af3bf small doc suggestions
small doc suggestions

small doc suggestions
2025-08-10 18:42:28 +02:00
Philip Abbey
ad7d278072 Amended documentation
No longer using groups for sub-menus.
2025-08-10 14:39:55 +01:00
Philip Abbey
dd484aa615 Fix for settings
HTTP-Headers settings no longer crash the application on the device. Group settings removed as they could be be changed a second time due to a bug in the SDK.
2025-08-10 14:08:52 +01:00
Philip Abbey
f224268554 Documentation 2025-08-09 16:36:46 +01:00
Philip Abbey
e9f6ccfd0d Updated translations from @tispokes
Amended translate.py and created a batch script to ease of running the translations.

Co-Authored-By: Lars Pöpperl <45465820+tispokes@users.noreply.github.com>
2025-08-09 13:42:55 +01:00
Philip Abbey
ad8a895f58 Added international strings
Required for new settings.
2025-08-09 11:41:22 +01:00
Philip Abbey
549b04f349 Minor fix to strings.xml
Both English and German to remove a historical ambiguity.
2025-08-09 11:08:06 +01:00
Philip Abbey
dca99cc1a9 Merge branch 'main' into 264-add-custom-https-headers-for-eg-cloudflare-tunnels 2025-08-09 10:47:49 +01:00
Philip Abbey
f76a4b60c7 Update deu translation (#265)
Kept some parts of older translations, renewed some,
can check the translation when you have added the headers :-)
2025-08-09 10:45:38 +01:00
Philip Abbey
24232acfbe Add TLS 1.2 compatibility guidance for Garmin Wi-Fi/LTE connection issues (#266)
This update adds a note to the “Limits of Use” section explaining that
some Garmin devices use TLS 1.2 for HTTPS handshakes. If a server or
proxy enforces a minimum TLS version of 1.3 or higher, users may
experience SSL handshake errors with the message HTTP request returned
error code = 0.

The documentation now includes:

An explanation of the issue

How to identify the error

A practical solution example for Cloudflare Tunneling users to lower the
minimum TLS version to 1.2

A security note advising against lowering TLS below 1.2

This helps users troubleshoot connectivity problems when using Wi-Fi or
LTE features on Garmin watches with Home Assistant.
2025-08-09 10:40:52 +01:00
Ali Alaei
50eccad4dc docs: clarify TLS 1.2 limitation for Garmin Wi-Fi/LTE connections
Signed-off-by: Ali Alaei <49282631+aalaei@users.noreply.github.com>
2025-08-09 11:33:51 +02:00
Ali Alaei
8b641f1ee9 docs: add TLS 1.2 compatibility note for Garmin Wi-Fi/LTE connections
Signed-off-by: Ali Alaei <49282631+aalaei@users.noreply.github.com>
2025-08-08 23:46:01 +02:00
Philip Abbey
c1cddc54e4 Initial attempt
Lacking an end to end test on this code presently.
2025-08-08 11:40:13 +01:00
Lars Pöpperl
fa8ec2ec4d Added all contributors
Signed-off-by: Lars Pöpperl <45465820+tispokes@users.noreply.github.com>
2025-08-08 11:33:51 +02:00
Lars Pöpperl
c2f99d71ad Updated German corrections
Signed-off-by: Lars Pöpperl <45465820+tispokes@users.noreply.github.com>
2025-08-08 11:28:32 +02:00
Philip Abbey
8a8d64bcab Update Wi-Fi.md
Videos only work when they are uploaded to https://github.com/user-attachments/assets/, so that means drag and drop the video into the markdown file rather than reference one already in your source tree.

Signed-off-by: Philip Abbey <philipabbey@users.noreply.github.com>
2025-07-25 18:42:37 +01:00
Philip Abbey
55bbb4901c Update HISTORY.md
Amended v3.0 change text.

Signed-off-by: Philip Abbey <philipabbey@users.noreply.github.com>
2025-07-25 12:32:27 +01:00
Philip Abbey
3396c6c47d Update manifest.xml
Careless previous commit with reduced device list, this reverts the file.
2025-07-25 12:00:52 +01:00
Philip Abbey
4cfd3ffb6b 260 documentation for wi fi enabled application (#261)
Proposed documentation for the Wi-Fi/LTE enabled Garmin Home Assistant App.
2025-07-25 11:52:08 +01:00
Philip Abbey
d8f944b02f Merge branch 'main' into 260-documentation-for-wi-fi-enabled-application 2025-07-25 11:48:24 +01:00
Philip Abbey
3e0de7ad6e 259 code tidy (#262)
Should be functionally equivalent.
2025-07-25 11:47:47 +01:00
Philip Abbey
6574cf5bac Update GarminHomeAssistantSettings.png
New Wi-Fi option in Setting screen capture.
2025-07-25 11:42:38 +01:00
__JosephAbbey
c0a99946f8 Merge branch 'main' into 259-code-tidy 2025-07-25 10:26:04 +01:00
philipabbey
e8f901167f Apply automatic changes 2025-07-25 09:17:03 +00:00
Philip Abbey
d110826392 Amended Globals.mc
Moved wifiPollDelayMs to Globals class.
2025-07-25 08:38:55 +01:00
Philip Abbey
d645adb3c9 Reuse translations (#263) 2025-07-25 08:23:02 +01:00
__JosephAbbey
9e7ac9de6d Update removeTranslations.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: __JosephAbbey <me@josephabbey.dev>
2025-07-24 23:46:25 +01:00
__JosephAbbey
d43c2d427f Update translate.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: __JosephAbbey <me@josephabbey.dev>
2025-07-24 23:46:15 +01:00
Joseph Abbey
c599b9fcf3 Reuse translations 2025-07-24 23:42:27 +01:00
Philip Abbey
0d73de494e Tidy 2025-07-24 20:56:08 +01:00
Philip Abbey
a686e1a104 Reordered settings 2025-07-24 19:49:44 +01:00
Philip Abbey
8868f2152c Comments & Dictionaries
Reformatted comments to work in VSCode and converted `dict.get(:key)` to `dict[:key]` syntax as its nicer.
2025-07-24 18:54:27 +01:00
Philip Abbey
f28a060bf5 Update Wi-Fi.md
Added final note.
2025-07-24 11:04:58 +01:00
Philip Abbey
5b58a0c1be Update Wi-Fi.md
Co-authored-by: Vincent <59287019+vincentezw@users.noreply.github.com>
Signed-off-by: Philip Abbey <philipabbey@users.noreply.github.com>
2025-07-24 11:01:52 +01:00
Philip Abbey
084e7144cc Update Wi-Fi.md
Co-authored-by: Vincent <59287019+vincentezw@users.noreply.github.com>
Signed-off-by: Philip Abbey <philipabbey@users.noreply.github.com>
2025-07-24 11:01:28 +01:00
Philip Abbey
1ad5cb3263 Update Wi-Fi.md
Co-authored-by: Vincent <59287019+vincentezw@users.noreply.github.com>
Signed-off-by: Philip Abbey <philipabbey@users.noreply.github.com>
2025-07-24 11:01:01 +01:00
Philip Abbey
af3820c7a8 Update README.md
Co-authored-by: Vincent <59287019+vincentezw@users.noreply.github.com>
Signed-off-by: Philip Abbey <philipabbey@users.noreply.github.com>
2025-07-24 11:00:48 +01:00
Philip Abbey
70f05e8912 Added missing code headers
And included vincentezw in headers for the code he touched.
2025-07-22 22:14:46 +01:00
Philip Abbey
7239bc85c0 Amended to include LTE
Previously overlooked.
2025-07-22 22:09:39 +01:00
Philip Abbey
c138fad6ca Update properties.xml
Moved Wi-Fi option up to be more prominent.
2025-07-22 22:05:04 +01:00
Philip Abbey
9641313492 Wifi -> Wi-Fi
Amended in presentational aspects only, not in the actual code. "Wi-Fi" is the proper noun and registered trademark.
2025-07-22 22:03:10 +01:00
Philip Abbey
6f5e591910 Initial Docs for review 2025-07-22 21:42:51 +01:00
Philip Abbey
e2722319a6 add Wifi LTE command execution (#255)
Firstly, thank you to all the maintainers for your work on this very
useful application.

This PR adds the ability to execute Home Assistant commands over Wi-Fi
or LTE, behind an opt-in setting. While not a full "Wi-Fi mode," this
feature allows the app to function in limited scenarios where the phone
is unavailable but the device still has a direct network connection
(e.g. Wi-Fi or LTE).

When enabled:
- The app can launch with a cached menu without phone connection.
- On command execution, the user is prompted to confirm.
- Upon confirmation, a bulk sync is triggered to send the request to
Home Assistant.

This enables basic control even without Bluetooth connectivity — so I
can switch off that pesky bathroom light late at night when I don't have
my phone nearby.

I’ve seen a few issues suggesting similar functionality, and I believe
this strikes a useful balance between functionality and simplicity. That
said, I understand if this doesn't align with the intended featureset —
feel free to close if so.

This PR also adds a few string resources without translations. I'm not
sure if those are autogenerated or user-provided — happy to adjust if
needed.
2025-07-22 20:52:07 +01:00
Vincent Elger Zwanenburg
0b84983eaf use fixed poll delay from const 2025-07-21 21:02:51 +01:00
Vincent Elger Zwanenburg
d32135af63 fix setting toggleItem, periodic pulling 2025-07-21 19:45:14 +01:00
Vincent Elger Zwanenburg
db3fbd9886 timers as statics, defensive popviews, no double confirmation, add pin
screen onBack, toggle state tweaks
2025-07-19 10:35:35 +01:00
Vincent Elger Zwanenburg
be7eed1ae1 early return from fetchApiStatus for in-app wifi, fix typo in docstrings 2025-07-19 10:35:35 +01:00
Vincent Elger Zwanenburg
576f8c4a64 HomeAssistantConfirmationDelegate and HomeAssistantPinConfirmationDelegate undo toggles on timeout and reject 2025-07-19 10:35:35 +01:00
Vincent Elger Zwanenburg
979d85fce5 show toast, not error, in updateMenuItems 2025-07-19 10:35:35 +01:00
Vincent Elger Zwanenburg
ac899ff784 simplify delegate, toggle switch for empty response body 2025-07-19 10:35:35 +01:00
Vincent Elger Zwanenburg
b45f02ef7b move popview up so it does not close wifi dialog 2025-07-19 10:35:35 +01:00
Vincent Elger Zwanenburg
62f0e711c9 make setting conditional by using group 2025-07-19 10:35:35 +01:00
Vincent Elger Zwanenburg
b2b8ffb332 separate syncdelegate class file, check for startsync2 2025-07-19 10:35:34 +01:00
Vincent Elger Zwanenburg
172d4ad1e4 add Wifi LTE command execution 2025-07-19 10:35:34 +01:00
Joseph Abbey
460f247728 Improve web: dim disabled, icons, pin 2025-07-19 07:37:05 +01:00
__JosephAbbey
a6b4925ff7 257 pin dialog does not popup when using is servicetap (#258)
Need this urgently as it affects the use of the PIN for tap menu items.
2025-07-18 20:51:10 +01:00
Philip Abbey
3672a598fb Update HISTORY.md
Added v2.32
2025-07-18 20:49:10 +01:00
Philip Abbey
f6d0916315 Update HomeAssistantTapMenuItem.mc
Requirement for use of the PIN was not being correctly extracted from the options. Goes to show why the security features should not be relied on! A recent compilation fix created this breaking change.
2025-07-18 20:46:49 +01:00
Philip Abbey
6db7b67536 Update HISTORY.md
Added v2.31 text
2025-07-11 09:43:30 +01:00
Philip Abbey
e5df010af8 253 compilation failed on fenix5s (#254)
This is the fix to an annoying problem I faced as I was about to compile
the final v2.31 release. Please approve, but **don't merge** just yet.
I'll do that once the full device list compilation succeeds, just to
check if there are any residual issues.

Thanks
2025-07-11 09:31:37 +01:00
Philip Abbey
ee964ce882 Update HomeAssistantMenuItemFactory.mc
Function documentation fix.
2025-07-11 01:11:00 +01:00
Philip Abbey
ee9da24592 Fix for too many arguments to a function call on some devices 2025-07-11 01:06:15 +01:00
Philip Abbey
906cdf7371 Code documentation comments were not updated 2025-07-10 23:54:05 +01:00
__JosephAbbey
7dd85937fa 243 option to close application after command (#252)
Also closes #250.
2025-07-10 22:02:12 +01:00
Philip Abbey
d141c03104 Review comment
Moved point of application exit for the menu item option.
2025-07-10 19:46:04 +01:00
Philip Abbey
842a31a1cc Review comment
enable => enabled
2025-07-10 18:24:30 +01:00
Philip Abbey
5639ff5c42 Amended heading levels in docs 2025-07-09 21:51:18 +01:00
Philip Abbey
8b3e86a00f Amended documentation for two new menu item options
The options are 'enable' and 'exit'.
2025-07-09 21:48:58 +01:00
Philip Abbey
6dbcea94cf Update HomeAssistantView.mc
Refined more precisely where the exit option can be used and enforced in the code.
2025-07-09 21:09:33 +01:00
Philip Abbey
b28daacafd Update config.schema.json
Removed exit from non-actionable menu items.
2025-07-09 20:54:28 +01:00
Philip Abbey
029a9f373e Update config.schema.json
Added to boolean options for disable and exit.
2025-07-09 19:57:11 +01:00
Philip Abbey
ec044c5408 Added two new options to menu items
1. The ability to disable a menu item without deleting it.
2. The option to quit the application on item selection.
2025-07-08 22:48:42 +01:00
Philip Abbey
659a060c76 Forgotten image used on App home page 2025-07-08 22:45:39 +01:00
__JosephAbbey
3acef26fea 247 improve the glance view (#249)
2s seems to be a good compromise between the status flickering and the
update delay. When the menu is cached there's no flickering.
2025-07-07 13:49:53 +01:00
__JosephAbbey
e898fc1fe5 Update config.schema.json
Signed-off-by: __JosephAbbey <me@josephabbey.dev>
2025-07-07 13:49:33 +01:00
Philip Abbey
4df1fd69bc Update Globals.mc
Increased the API back off time from 1s to 2s to remove the glance's status flickering. The assumption is that the GET requests are too fast for the Bluetooth stack.
2025-07-06 21:31:33 +01:00
Philip Abbey
fc19599586 Update export.cmd
Removed a commented out command line option no longer used and unlikely to be replaced.
2025-07-06 21:29:19 +01:00
Philip Abbey
13f70af45a Update Glance.md
Explained to turn on menu caching.
2025-07-06 21:28:40 +01:00
Philip Abbey
90ed1f4bea Update HomeAssistantGlanceView.mc
Improved layout.
2025-07-06 19:02:59 +01:00
Philip Abbey
2117b27210 Update HISTORY.md
Added two images.
2025-07-06 19:01:27 +01:00
Philip Abbey
df7874e825 Update HISTORY.md
Added link to Glance view for 2.30 text.
2025-07-06 17:32:12 +01:00
Philip Abbey
f3c5947b82 Merge branch 'main' into 247-improve-the-glance-view 2025-07-06 14:49:49 +01:00
Philip Abbey
47a930828a Revised glance view
Refreshed default view and new customisable view.
2025-07-06 14:44:53 +01:00
Philip Abbey
ef299bcaf6 Render correct icon in web editor for info types (#248) 2025-07-06 13:53:24 +01:00
__JosephAbbey
f0eb9c26b1 Render correct icon in web editor for info types 2025-07-06 13:07:04 +01:00
__JosephAbbey
f1c592179d Added correctly formatted code comments (#246)
The newer SDK support tooltips to show the function prototype and help
text, so best to make good use of it.

I'm not expecting this to be 100% on the first iteration.
2025-07-05 13:58:35 +01:00
__JosephAbbey
4ed81df60a Fix spelling of Bluetooth
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: __JosephAbbey <me@josephabbey.dev>
2025-07-05 13:57:35 +01:00
__JosephAbbey
b4f5f34760 Fix spelling of Webhook
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: __JosephAbbey <me@josephabbey.dev>
2025-07-05 13:57:02 +01:00
Philip Abbey
4cf5a0ae26 Update HomeAssistantApp.mc
Fix the 'fixed' comment string.
2025-07-04 17:26:33 +01:00
Philip Abbey
b44d4c6155 Update HomeAssistantApp.mc
Amended 4 comments
2025-07-04 17:20:48 +01:00
Philip Abbey
f2d65aa6e3 Added correctly formatted code comments
The newer SDK support tooltips to show the function prototype and help text, so best to make good use of it.
2025-07-04 16:57:25 +01:00
Philip Abbey
6b2aa3135a Added support for 3 new devices (#237) 2025-05-27 06:37:19 +01:00
Philip Abbey
907848b5fb Added support for 3 new devices 2025-05-24 15:53:19 +01:00
__JosephAbbey
5f34f870d9 Support for Vivoactive 6 device (#230)
This required an update to the SDK to version 8.1.0. The new SDK found
some new code warnings for unreachable code previously known to be
reached based on stricter type checking, so fixed in this commit too.
2025-04-25 07:59:58 +01:00
Philip Abbey
ada18f8323 Update export.cmd
'--api-level' command line switch removed from SDK 8.1.0
2025-04-24 22:38:10 +01:00
Philip Abbey
f74a3168de Update manifest.xml
The App ID should not have been changed from the test app.
2025-04-24 22:30:43 +01:00
Philip Abbey
7e58e5416d Support for Vivoactive 6 device
This required an update to the SDK to version 8.1.0. The new SDK found some new code warnings for unreachable code previously known to be reached based on stricter type checking, so fixed in this commit too.
2025-04-24 22:26:18 +01:00
98 changed files with 4653 additions and 2126 deletions

View File

@@ -2,5 +2,10 @@
"cSpell.words": [ "cSpell.words": [
"usbs", "usbs",
"Venu" "Venu"
] ],
"files.exclude": {
"resources-*": true,
"bin": true,
"export": true
}
} }

View File

@@ -1,4 +1,4 @@
[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) [Home](README.md) | [Switches](examples/Switches.md) | [Actions](examples/Actions.md) | [Templates](examples/Templates.md) | [Glance](examples/Glance.md) | [Background Service](BackgroundService.md) | [Wi-Fi](Wi-Fi.md) | [HTTP Headers](HTTP_Headers.md) | [Trouble Shooting](TroubleShooting.md) | [Version History](HISTORY.md)
# Background Service # Background Service

View File

@@ -1,4 +1,4 @@
[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 [Home](README.md) | [Switches](examples/Switches.md) | [Actions](examples/Actions.md) | [Templates](examples/Templates.md) | [Glance](examples/Glance.md) | [Background Service](BackgroundService.md) | [Wi-Fi](Wi-Fi.md) | [HTTP Headers](HTTP_Headers.md) | [Trouble Shooting](TroubleShooting.md) | [Version History](HISTORY.md)
# Version History # Version History
@@ -34,9 +34,17 @@
| 2.19 | A template to evaluate is now optionally allowed on both `group` and `toggle` menu items. The template to evaluate is non-optional on a `template` menu item. All updates are performed in a single HTTP GET request for efficiency. Bug fix for negative heading values. Vibration now (optionally) confirms toggle menu items being tapped. | | 2.19 | A template to evaluate is now optionally allowed on both `group` and `toggle` menu items. The template to evaluate is non-optional on a `template` menu item. All updates are performed in a single HTTP GET request for efficiency. Bug fix for negative heading values. Vibration now (optionally) confirms toggle menu items being tapped. |
| 2.20 | Simplified the code base now that templates have been requested in all menu items. This means the `template` menu item became a superset of `tap`. Therefore the `tap` code has been has been upgraded to include `template` and the latter deprecated. JSON menu definitions continue to support `template` items by instantiating a `tap` menu item, but the schema marks them as deprecated and users should migrate their menu definitions now. Use the [web editor](https://house-of-abbey.github.io/GarminHomeAssistant/web/) for assistance with changes. | | 2.20 | Simplified the code base now that templates have been requested in all menu items. This means the `template` menu item became a superset of `tap`. Therefore the `tap` code has been has been upgraded to include `template` and the latter deprecated. JSON menu definitions continue to support `template` items by instantiating a `tap` menu item, but the schema marks them as deprecated and users should migrate their menu definitions now. Use the [web editor](https://house-of-abbey.github.io/GarminHomeAssistant/web/) for assistance with changes. |
| 2.21 | Added 7 new devices (`edge1050`, `enduro3`, `fenix843mm`, `fenix847mm`, `fenix8solar47mm`, `fenix8solar51mm`, `fenixe`) and upgraded the SDK to 7.3.0. Fix for a bug on Edge devices introduced by v2.16 activity reporting improvements. | | 2.21 | Added 7 new devices (`edge1050`, `enduro3`, `fenix843mm`, `fenix847mm`, `fenix8solar47mm`, `fenix8solar51mm`, `fenixe`) and upgraded the SDK to 7.3.0. Fix for a bug on Edge devices introduced by v2.16 activity reporting improvements. |
| 2.22 | Major feature release adding an optional PIN to menu items. This significant new feature has been provided by [moesterheld](https://github.com/moesterheld). Please do not rely on this application for security. Use at your own risk! | | 2.22 | <img src="images/pin_view.png" width="200" title="PIN Entry View"/><br/>Major feature release adding an optional PIN to menu items. This significant new feature has been provided by [moesterheld](https://github.com/moesterheld). Please do not rely on this application for security. Use at your own risk! |
| 2.23 | Added "info" menu item for displaying information via a template without a tap or toggle. Essentially like the old 'template' type that was deprecated when all items were amended to display evaluated templates. That action removed the display only items too hastily. Added 5 new devices in the model range Instinct 3 and Instinct E. | | 2.23 | Added "info" menu item for displaying information via a template without a tap or toggle. Essentially like the old 'template' type that was deprecated when all items were amended to display evaluated templates. That action removed the display only items too hastily. Added 5 new devices in the model range Instinct 3 and Instinct E. |
| 2.24 | Experiment to prevent new Webhook IDs being created unnecessarily. Reduced the latency for the first menu update. Added 4 new devices: approachs50, descentg2, descentmk1, and gpsmap66. | | 2.24 | Experiment to prevent new Webhook IDs being created unnecessarily. Reduced the latency for the first menu update. Added 4 new devices: approachs50, descentg2, descentmk1, and gpsmap66. |
| 2.25 | 2 Bug fixes. First time startup issues caused by v2.24 change and a fix for pure numbers in returned templates. | | 2.25 | 2 Bug fixes. First time startup issues caused by v2.24 change and a fix for pure numbers in returned templates. |
| 2.26 | Retry responsive menu fix failed in v2.24. Cosmetic internal class changes. | | 2.26 | Retry responsive menu fix failed in v2.24. Cosmetic internal class changes. |
| 2.27 | Trivial bug fix for the glance view to prevent the "Unconfigured" result being erroneously displayed because the settings were not yet pulled from persistent storage. | | 2.27 | Trivial bug fix for the glance view to prevent the "Unconfigured" result being erroneously displayed because the settings were not yet pulled from persistent storage. |
| 2.28 | Added support for Vivoactive 6 device which also required an SDK update to 8.1.0. |
| 2.29 | Added support for three new devices, Forerunners 570 42mm & 47mm and 970. |
| 2.30 | <img src="images/Venu2_glance_default.png" width="200" title="Default Glance"/><br/>Extensive re-work of the [Glance](examples/Glance.md) view, including the ability to customise it with a user supplied template. |
| 2.31 | Adding [two new options](./examples/Actions.md#exit-on-tap) to the menu items: 1) The ability to disable a menu item, e.g. temporarily for seasonal changes, 2) The option to exit after a menu item has been select. |
| 2.32 | Bug fix for a breaking change extracting options caused by the need to rearrange function parameters for an [annoying compiler error](https://github.com/house-of-abbey/GarminHomeAssistant/issues/253). |
| 3.0 | First version with the ability to use [Wi-Fi or LTE](Wi-Fi.md) instead of Bluetooth but with limited functionality, thanks to [@vincentezw](https://github.com/vincentezw). |
| 3.1 | Added the ability for users to provide [custom HTTP headers](HTTP_Headers.md) for their Home Assistant server. Improved German language translations. Thanks to [@tispokes](https://github.com/tispokes) for assisting with both of those. Removed all groups in settings as the SDK is buggy. Fixed a bug with templates in glances causing application crash on startup. |
| 3.2 | Only enable or disable sensors on Home Assistant when the background service options is changed, i.e. do not call the API to enable on start up every time. |

37
HTTP_Headers.md Normal file
View File

@@ -0,0 +1,37 @@
[Home](README.md) | [Switches](examples/Switches.md) | [Actions](examples/Actions.md) | [Templates](examples/Templates.md) | [Glance](examples/Glance.md) | [Background Service](BackgroundService.md) | [Wi-Fi](Wi-Fi.md) | [HTTP Headers](HTTP_Headers.md) | [Trouble Shooting](TroubleShooting.md) | [Version History](HISTORY.md)
# User Specified Custom HTTP Headers
Principally for those who use Home Assistant add-on [Cloudflared](https://github.com/brenner-tobias/addon-cloudflared) in order to provide additional security via Cloudflare's Web Application Firewall (WAF). But Garmin does not support certificates in requests. And the solution is generic enough for other use cases.
Please let us know if this solution is found to be useful for other situations.
## Setup
The settings contain two options for users to specify both the HTTP header name and the value as two free form strings.
<img src="images/http_header_settings.png" width="400" title="Application Settings"/>
If you don't know why you need these, leave them empty and ignore.
### Cloudflare WAF rule example
`(any(http.request.headers["your-header-name"][*] eq "your-header-key"))`
Make the key strong enough!
## Support
**None!**
The authors of the Garmin Home Assistant application do not use, and hence do not know, the [Cloudflared](https://github.com/brenner-tobias/addon-cloudflared) add-on. While we have enabled the HTTP headers to support using this add-on, it does mean _you support yourself_. Please do not raise issues about this functionality unless you are supplying the answers for any required changes too!
## Credits
With thanks to Lars Pöpperl ([@tispokes](https://github.com/tispokes)) for contributing to this solution.
## References
* [Using Cloudflare ZeroTrust and mTLS to securely access Home Assistant via the internet](https://kcore.org/2024/06/28/using-cloudflare-zerotrust-and-mtls-with-home-assistant-via-the-internet/)
* [Home Assistant Add-on: Cloudflared](https://github.com/brenner-tobias/addon-cloudflared)

View File

@@ -4,5 +4,9 @@
"path": "." "path": "."
} }
], ],
"settings": {} "settings": {
"cSpell.words": [
"Initialiser"
]
}
} }

View File

@@ -1,4 +1,4 @@
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) [Home](README.md) | [Switches](examples/Switches.md) | [Actions](examples/Actions.md) | [Templates](examples/Templates.md) | [Glance](examples/Glance.md) | [Background Service](BackgroundService.md) | [Wi-Fi](Wi-Fi.md) | [HTTP Headers](HTTP_Headers.md) | [Trouble Shooting](TroubleShooting.md) | [Version History](HISTORY.md)
# GarminHomeAssistant # GarminHomeAssistant
@@ -10,13 +10,20 @@ The application is designed around a simple scrollable menu where menu items hav
**The intended audience for this application are those comfortable with configuring a Home Assistant** (e.g. editing the YAML configuration files) and debugging why URLs don't work. It does not require programming skills, but the menu is configured via JSON which feels like "coding" (more like "describing"). 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" (more like "describing"). If you are not comfortable with this relatively low level of configuration, you may like to try other Garmin applications instead.
**If you are struggling with getting the application to work, please consult the [troubleshooting guide](TroubleShooting.md#menu-configuration-url) first.**
## No HTTPS?
> [!IMPORTANT] > [!IMPORTANT]
> The Garmin SDK allows HTTP requests only to a limited number of domains specified in their app. Therefore, for your Garmin to communicate with your Home Assistant instance, your Home Assistant instance must be accessible via HTTPS (with a public certificate!) or through a local DNS server that overrides one of the whitelisted domains to communicate using HTTP. > The Garmin SDK allows HTTP requests only to a limited number of domains specified in their app. Therefore, for your Garmin to communicate with your Home Assistant instance, your Home Assistant instance must be accessible via HTTPS (with a public certificate!) or through a local DNS server that overrides one of the whitelisted domains to communicate using HTTP.
>
>New with version 3.1, you can use [Cloudflared](https://github.com/brenner-tobias/addon-cloudflared) plug-in in combination with a [custom HTTP header](HTTP_Headers.md) and do not need a public certificate for HTTPS.
>
> To make your Home Assistant instance accessible via HTTPS, you will need 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.) > To make your Home Assistant instance accessible via HTTPS, you will need 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 use a local DNS server (like [Pi-Hole](https://pi-hole.net/)), you can create a local DNS record for the domain `garmincdn.com` (which is allowed for HTTP in the Garmin SDK) and map it to your Home Assistant instance's IP. You can find additional workarounds for HTTP request restrictions in the Garmin SDK [here](https://www.instructables.com/About-Communication-Between-Garmin-SDK-and-a-Raspb/). >
> If you use a local DNS server (like [Pi-Hole](https://pi-hole.net/)), you can create a local DNS record for the domain `garmincdn.com` (which is allowed for HTTP in the Garmin SDK) and map it to your Home Assistant instance's IP. "_[About Communication Between Garmin SDK and a Raspberry Pi](https://www.instructables.com/About-Communication-Between-Garmin-SDK-and-a-Raspb/)_" provides additional workarounds for HTTP request restrictions in the Garmin SDK.
**If you are struggling with getting the application to work, please consult the [trouble shooting](TroubleShooting.md#menu-configuration-url) guide first.** >
> **No support is offered to those circumventing the HTTPS restriction of the Connect IQ SDK.** You are supporting yourself!
## Widget or Application? ## Widget or Application?
@@ -24,7 +31,7 @@ As of version 2.0, there are now two installable versions. For older devices bef
| Version | Explanation | | Version | Explanation |
|------------------------|-------------| |------------------------|-------------|
| Application (original) | For newer devices that allow glance views in their applications, e.g. Venu 2, the GarminHomeAssistant application can be started either from a glance or from the list of applications and activities. Head over to the [GarminHomeAssistant](https://apps.garmin.com/en-US/apps/61c91d28-ec5e-438d-9f83-39e9f45b199d) application page on the [Connect IQ application store](https://apps.garmin.com/en-US/) to download the application. The application can be started two different ways, either from the glance in the carousel, or as an application from the list of applications & activities. With the latter, it is worth marking the application as a favourite.<br/><img src="images/Venu2_app_start.png" width="200" title="Venu 2" style="margin:5px"/><img src="images/Vivoactive3_app_start.jpg" width="200" title="Venu 2" style="margin:5px"/><br/>If you place the application on your list of favourites, and rearrange it to appear near the top, then the item is just one button press away from the watch face. This second picture here shows the application menu on a Vivoactive 3 watch.<br/><img src="images/Venu2_glance_start.png" width="200" title="Venu 2" style="margin:5px"/><br/>On newer watches, you can also start the application from the glance carousel. The glance view here typically displays some trackable status, so ours provides some early indication of availability. Older watches will still allow you to start this application from the list of applications and activities. | | 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="Vivoactive 3" 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_default.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. | | 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. |
### Features ### Features
@@ -225,7 +232,7 @@ Make sure you can browse to the URL of your JSON file in a standard web browser
## API Key Creation ## 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 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 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 -> "Security" tab -> Long-lived access tokens`. Make sure you save the generated token before dismissing it.
![Long-Lived Access Token](images/Long_Lived_Access_Tokens.png) ![Long-Lived Access Token](images/Long_Lived_Access_Tokens.png)
@@ -266,7 +273,7 @@ The application timeout prevents the HomeAssistant App running on your watch whe
| 0 | > 0 | Permanently open, but poll more gently to save battery. | | 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. | | > 0 | > 0 | Temporarily open, poll more gently to save battery, but the application closes before the benefit is realised. Not recommended. |
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 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 developers will not be held responsible for any insecurities resulting from using this feature, including any inadvertent code changes that cause the PIN feature to not work._
The confirmation timeout is also used for the maximum time between clicks in the PIN confirmation dialog. The PIN confirmation provides a more secure alternative for toggling security-sensitive actions. The confirmation timeout is also used for the maximum time between clicks in the PIN confirmation dialog. The PIN confirmation provides a more secure alternative for toggling security-sensitive actions.
@@ -334,3 +341,7 @@ The `id` attribute values are taken from the same names used in [`strings.xml`](
8. There is a [bug in Garmin Express so that when you use that software to amend the application's settings](https://github.com/house-of-abbey/GarminHomeAssistant/issues/194), the page appears in a random language not of your choice. I would like to thank user [heviiguy](https://github.com/heviiguy) for his work researching the issue, leading to these references that indicate the authors of Garmin Home Assistant cannot resolve this issue as its a bug in Garmin Express that Garmin are refusing to believe exists! See these pages for details: 8. There is a [bug in Garmin Express so that when you use that software to amend the application's settings](https://github.com/house-of-abbey/GarminHomeAssistant/issues/194), the page appears in a random language not of your choice. I would like to thank user [heviiguy](https://github.com/heviiguy) for his work researching the issue, leading to these references that indicate the authors of Garmin Home Assistant cannot resolve this issue as its a bug in Garmin Express that Garmin are refusing to believe exists! See these pages for details:
- [Garmin Express - Wrong Language](https://forums.garmin.com/developer/connect-iq/i/bug-reports/garmin-express---wrong-language) - [Garmin Express - Wrong Language](https://forums.garmin.com/developer/connect-iq/i/bug-reports/garmin-express---wrong-language)
- [Incorrect language displayed for custom data fields](https://forums.garmin.com/developer/connect-iq/f/discussion/388137/incorrect-language-displayed-for-custom-data-fields) - [Incorrect language displayed for custom data fields](https://forums.garmin.com/developer/connect-iq/f/discussion/388137/incorrect-language-displayed-for-custom-data-fields)
# Authors & Contributors
For an up to date list of all authors and contributors, please check the [contributor's page](https://github.com/house-of-abbey/GarminHomeAssistant/graphs/contributors). Thank you all for improving this application.

View File

@@ -1,4 +1,4 @@
[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) [Home](README.md) | [Switches](examples/Switches.md) | [Actions](examples/Actions.md) | [Templates](examples/Templates.md) | [Glance](examples/Glance.md) | [Background Service](BackgroundService.md) | [Wi-Fi](Wi-Fi.md) | [HTTP Headers](HTTP_Headers.md) | [Trouble Shooting](TroubleShooting.md) | [Version History](HISTORY.md)
# Troubleshooting Guides # Troubleshooting Guides
@@ -311,6 +311,16 @@ JSON for copy & paste:
} }
``` ```
# Failed API Calls
![No JSON](images/NoJson.png)
When the application persists in reporting "No JSON returned from HTTP request." this might be due to a mismatch between the Webhook ID and the device settings on the Home Assistant server. We have discovered that the Webhook ID is required for Home Assistant API calls with templates in order to work in a non-privileged account. The application options include the ability to clear the Webhook ID in the application forcing a new one to be set up. This should prevent the above error being shown on startup.
Look for this option in the application settings:
![Nabu Casa Setup](images/delete_webhook_id.png)
# Debug Logs # Debug Logs
As a desperate measure to assist with debugging the Home Assistant Application, you might be asked to send the authors a debug log. As a desperate measure to assist with debugging the Home Assistant Application, you might be asked to send the authors a debug log.

43
Wi-Fi.md Normal file
View File

@@ -0,0 +1,43 @@
[Home](README.md) | [Switches](examples/Switches.md) | [Actions](examples/Actions.md) | [Templates](examples/Templates.md) | [Glance](examples/Glance.md) | [Background Service](BackgroundService.md) | [Wi-Fi](Wi-Fi.md) | [HTTP Headers](HTTP_Headers.md) | [Trouble Shooting](TroubleShooting.md) | [Version History](HISTORY.md)
# Wi-Fi & LTE
Many watches now include the ability to synchronise data over Wi-Fi or event LTE in addition to Bluetooth. This gives users of this application the expectation that they should be able to operate Home Assistant devices from their watch without Bluetooth and hence their phone (that they left out of contact distance). The whole point of Bluetooth after all is that it is [low power](https://en.wikipedia.org/wiki/Bluetooth#Uses). Using Wi-Fi and LTE are power hungry and therefore not something that can be left on continuously in a small device. The watch function that uses Wi-Fi & LTE is the ability to 'synchronise', e.g. activity data (FIT files) and application updates. This function then has a limited period of time for which radio is active. Neither Wi-Fi nor LTE are "always on" like Bluetooth.
With version 3.0 onwards the application now includes the ability to temporarily turn on Wi-Fi or LTE in order to perform a task on the watch. To do this, the "synchronise" function of the Connect IQ SDK has been cleverly hijacked. This appears to be a highly sought after solution from several users as **it allows the watch to operate when out of range of the associated phone**.
## Limits of Use
1. An API request issued over Wi-Fi requires the watch to open up an IP connection to your Wi-Fi access point. This means setting up a secure channel with WPA and being allocated an IP address. Establishing the communication channel takes a short while. _You will see that this adds a noticeable delay to usability._
2. **The Wi-Fi/LTE functionality can only be used when the menu is already cached.** _The watch will not perform an HTTPS GET request to retrieve the JSON menu file_. Therefore, to enable the Wifi/LTE functionality in the application settings, you must enable caching first.
3. The menu item statuses will not be set correctly. Instead you will be warned about the lack of connectivity by a 'toast', i.e. message partially occupying the top of the screen temporarily. Fetching the menu item statuses, including rendered templates, requires its own API call, hence this not performed.
4. Remember that you need to be within range of your watch's configured Wi-Fi access point to utilize this functionality. If supported by your device, LTE offers a longer range, but network charges may apply.
5. On some Garmin devices, the HTTPS handshake is performed using **TLS 1.2**. If your server or proxy enforces a higher minimum (e.g., TLS 1.3), you will encounter an SSL handshake error with the message:
```
HTTP request returned error code = 0
```
This limitation only affects **Wi-Fi/LTE connections**. When connected over **Bluetooth**, the watch routes requests through the paired phone, which handles the TLS handshake and supports newer TLS versions (such as 1.3) without issue.
To fix this, lower the minimum TLS setting to allow TLS 1.2. For example, if you are using **Cloudflare Tunneling**, go to:
`SSL/TLS → Edge Certificates → Minimum TLS Version`
and set it to **at most TLS 1.2**. _Reducing below TLS 1.2 is not recommended due to security risks._
## Video
This video using will hopefully make it obvious how slow it is to use the Wi-Fi option and illustrate the cautionary notes above.
https://github.com/user-attachments/assets/269981e9-12dc-44f2-a28f-b8e844b2b2f8
### Please Note
We emphasize that the Wi-Fi/LTE functionality should be viewed as a 'last resort' method for executing tasks when your phone is not available. It is not recommended as a continuous mode of operation.
## Credits
With thanks to Vincent, [@vincentezw](https://github.com/vincentezw) for contributing this solution, and to Ali Alaei, [@aalaei](https://github.com/aalaei) for the finer details on TLS.

View File

@@ -33,21 +33,24 @@ set DEVICE=venu2
set JUNGLE=monkey.jungle set JUNGLE=monkey.jungle
rem C:\>java -jar %SDK_PATH%\monkeybrains.jar -h rem C:\>java -jar %SDK_PATH%\monkeybrains.jar -h
rem usage: monkeyc [-a <arg>] [-b <arg>] [--build-stats <arg>] [-c <arg>] [-d <arg>] rem usage: monkeyc [-a <arg>] [-b <arg>] [--build-stats <arg>] [-d <arg>]
rem [--debug-log-level <arg>] [--debug-log-output <arg>] [-e] rem [--debug-log-level <arg>] [--debug-log-output <arg>]
rem [--disable-api-has-check-removal] [--disable-v2-opcodes] [-e]
rem [--Eno-invalid-symbol] [-f <arg>] [-g] [-h] [-i <arg>] [-k] [-l <arg>] rem [--Eno-invalid-symbol] [-f <arg>] [-g] [-h] [-i <arg>] [-k] [-l <arg>]
rem [-m <arg>] [--no-gen-styles] [-o <arg>] [-O <arg>] [-p <arg>] [-r] [-s rem [-m <arg>] [--no-gen-styles] [-o <arg>] [-O <arg>] [-p <arg>] [-r] [-t]
rem <arg>] [-t] [-u <arg>] [-v] [-w] [-x <arg>] [-y <arg>] [-z <arg>] rem [-u <arg>] [-v] [-w] [-x <arg>] [-y <arg>] [-z <arg>]
rem -a,--apidb <arg> API import file rem -a,--apidb <arg> API import file
rem -b,--apimir <arg> API MIR file rem -b,--apimir <arg> API MIR file
rem --build-stats <arg> Print build stats [0=basic] rem --build-stats <arg> Print build stats [0=basic]
rem -c,--api-level <arg> API Level to target
rem -d,--device <arg> Target device rem -d,--device <arg> Target device
rem --debug-log-level <arg> Debug logging verbosity [0=errors, 1=basic, rem --debug-log-level <arg> Debug logging verbosity [0=errors, 1=basic,
rem 2=intermediate, 3=verbose] rem 2=intermediate, 3=verbose]
rem --debug-log-output <arg>Output log zip file rem --debug-log-output <arg> Output log zip file
rem --disable-api-has-check-removalDo not optimize out API has checks
rem --disable-v2-opcodes Do not use the v2 opcodes
rem -e,--package-app Create an application package. rem -e,--package-app Create an application package.
rem --Eno-invalid-symbol Do not error when a symbol is found to be invalid rem --Eno-invalid-symbol Do not error when a symbol is found to be
rem invalid
rem -f,--jungles <arg> Jungle files rem -f,--jungles <arg> Jungle files
rem -g,--debug Print debug output rem -g,--debug Print debug output
rem -h,--help Prints help information rem -h,--help Prints help information
@@ -59,16 +62,18 @@ rem -m,--manifest <arg> Manifest file (deprecated)
rem --no-gen-styles Do not generate Rez.Styles module rem --no-gen-styles Do not generate Rez.Styles module
rem -o,--output <arg> Output file to create rem -o,--output <arg> Output file to create
rem -O,--optimization <arg> Optimization level [0=none, 1=basic, 2=fast rem -O,--optimization <arg> Optimization level [0=none, 1=basic, 2=fast
rem optimizations, 3=slow optimizations] [p=optimize rem optimizations, 3=slow optimizations]
rem performance, z=optimize code space] rem [p=optimize performance, z=optimize code
rem space]
rem -p,--project-info <arg> projectInfo.xml file to use when compiling rem -p,--project-info <arg> projectInfo.xml file to use when compiling
rem -r,--release Strip debug information rem -r,--release Strip debug information
rem -s,--sdk-version <arg> SDK version to target (deprecated, use -c
rem -t,--unit-test Enables compilation of unit tests rem -t,--unit-test Enables compilation of unit tests
rem -u,--devices <arg> devices.xml file to use when compiling (deprecated) rem -u,--devices <arg> devices.xml file to use when compiling
rem (deprecated)
rem -v,--version Prints the compiler version rem -v,--version Prints the compiler version
rem -w,--warn Show compiler warnings rem -w,--warn Show compiler warnings
rem -x,--excludes <arg> Add annotations to the exclude list (deprecated) rem -x,--excludes <arg> Add annotations to the exclude list
rem (deprecated)
rem -y,--private-key <arg> Private key to sign builds with rem -y,--private-key <arg> Private key to sign builds with
rem -z,--rez <arg> Resource files (deprecated) rem -z,--rez <arg> Resource files (deprecated)

View File

@@ -2,14 +2,19 @@
"$schema": "https://json-schema.org/draft/2020-12/schema", "$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object", "type": "object",
"properties": { "properties": {
"$schema": {
"type": "string",
"description": "The schema will prevent JSON file errors."
},
"title": { "title": {
"type": "string" "type": "string",
"description": "Top level menu title"
},
"glance": {
"$ref": "#/$defs/glance"
}, },
"items": { "items": {
"$ref": "#/$defs/items" "$ref": "#/$defs/items"
},
"$schema": {
"type": "string"
} }
}, },
"required": ["title", "items"], "required": ["title", "items"],
@@ -29,8 +34,7 @@
"const": "toggle" "const": "toggle"
}, },
"content": { "content": {
"$ref": "#/$defs/content", "$ref": "#/$defs/content"
"description": "Optional in a toggle."
}, },
"tap_action": { "tap_action": {
"type": "object", "type": "object",
@@ -43,6 +47,12 @@
} }
}, },
"additionalProperties": false "additionalProperties": false
},
"enabled": {
"$ref": "#/$defs/enabled"
},
"exit": {
"$ref": "#/$defs/exit"
} }
}, },
"required": ["entity", "name", "type"], "required": ["entity", "name", "type"],
@@ -71,6 +81,9 @@
"deprecated": true, "deprecated": true,
"title": "Schema change:", "title": "Schema change:",
"description": "Use 'info' or 'tap' instead." "description": "Use 'info' or 'tap' instead."
},
"enabled": {
"$ref": "#/$defs/enabled"
} }
}, },
"required": ["name", "content", "type"], "required": ["name", "content", "type"],
@@ -97,6 +110,12 @@
}, },
"tap_action": { "tap_action": {
"$ref": "#/$defs/tap_action" "$ref": "#/$defs/tap_action"
},
"enabled": {
"$ref": "#/$defs/enabled"
},
"exit": {
"$ref": "#/$defs/exit"
} }
}, },
"required": ["name", "content", "type", "tap_action"], "required": ["name", "content", "type", "tap_action"],
@@ -116,6 +135,9 @@
"type": { "type": {
"$ref": "#/$defs/type", "$ref": "#/$defs/type",
"const": "info" "const": "info"
},
"enabled": {
"$ref": "#/$defs/enabled"
} }
}, },
"required": ["name", "content", "type"], "required": ["name", "content", "type"],
@@ -135,8 +157,7 @@
"const": "tap" "const": "tap"
}, },
"content": { "content": {
"$ref": "#/$defs/content", "$ref": "#/$defs/content"
"description": "Optional in a tap."
}, },
"service": { "service": {
"$ref": "#/$defs/entity", "$ref": "#/$defs/entity",
@@ -146,6 +167,12 @@
}, },
"tap_action": { "tap_action": {
"$ref": "#/$defs/tap_action" "$ref": "#/$defs/tap_action"
},
"enabled": {
"$ref": "#/$defs/enabled"
},
"exit": {
"$ref": "#/$defs/exit"
} }
}, },
"required": ["name", "type"], "required": ["name", "type"],
@@ -174,11 +201,13 @@
"const": "group" "const": "group"
}, },
"content": { "content": {
"$ref": "#/$defs/content", "$ref": "#/$defs/content"
"description": "Optional in a group."
}, },
"items": { "items": {
"$ref": "#/$defs/items" "$ref": "#/$defs/items"
},
"enabled": {
"$ref": "#/$defs/enabled"
} }
}, },
"required": ["name", "title", "type", "items"], "required": ["name", "title", "type", "items"],
@@ -190,7 +219,6 @@
}, },
"items": { "items": {
"type": "array", "type": "array",
"maxItems": 16,
"items": { "items": {
"oneOf": [ "oneOf": [
{ {
@@ -248,7 +276,8 @@
"required": ["service"] "required": ["service"]
}, },
"content": { "content": {
"title": "Jinja2 template defining the text to display.", "title": "Home Assistant Template",
"description": "Jinja2 template defining the text to display. Must be included in an 'info'. Optional in a 'toggle', 'tap' and 'group'. Special characters may not render in the glance context.",
"type": "string" "type": "string"
}, },
"confirm": { "confirm": {
@@ -262,6 +291,47 @@
"default": false, "default": false,
"title": "PIN Confirmation", "title": "PIN Confirmation",
"description": "Optional PIN confirmation of the action before execution as a precaution. Has precedence over 'confirm': true if both are set." "description": "Optional PIN confirmation of the action before execution as a precaution. Has precedence over 'confirm': true if both are set."
},
"glance": {
"type": "object",
"title": "Glance customisation",
"oneOf": [
{
"properties": {
"type": {
"title": "Glance type",
"description": "One of 'info' or 'status'. 'info' renders the template specified in the 'content' field inside the glance view. 'status' reverts to the default glance view and ignores the 'content' field. This allows for disabling the template temporarily.",
"const": "info"
},
"content": {
"$ref": "#/$defs/content"
}
},
"required": ["type", "content"]
},
{
"properties": {
"type": {
"title": "Glance type",
"description": "One of 'info' or 'status'.",
"const": "status"
}
},
"required": ["type"]
}
]
},
"enabled": {
"type": "boolean",
"default": true,
"title": "Enable the menu item",
"description": "Typically used to temporarily disable a menu item, e.g. for seasonal variations. Enabled (true) by default."
},
"exit": {
"type": "boolean",
"default": false,
"title": "Exit on selection",
"description": "Choose to exit the application after this item has been selected. Disabled (false) by default. N.B. Only actionable menu items can have this field added."
} }
} }
} }

View File

@@ -1,4 +1,5 @@
[Home](../README.md) | [Switches](Switches.md) | Actions | [Templates](Templates.md) | [Background Service](../BackgroundService.md) | [Trouble Shooting](../TroubleShooting.md) | [Version History](../HISTORY.md) [Home](../README.md) | [Switches](Switches.md) | [Actions](Actions.md) | [Templates](Templates.md) | [Glance](Glance.md) | [Background Service](../BackgroundService.md) | [Wi-Fi](../Wi-Fi.md) | [HTTP Headers](../HTTP_Headers.md) | [Trouble Shooting](../TroubleShooting.md) | [Version History](../HISTORY.md)
# Actions # Actions
@@ -75,3 +76,35 @@ Note that for notify events, you _must_ not supply an `entity_id` or the API cal
> Be careful with the value of the `service` field. > Be careful with the value of the `service` field.
Note that the `service` field will need to be a locally custom `script.<something>` as soon as any `data` fields are populated and not something more generic like `script.turn_on`. If the `service` field is wrong, the application will fail with a [`Communications.INVALID_HTTP_BODY_IN_NETWORK_RESPONSE`](https://developer.garmin.com/connect-iq/api-docs/Toybox/Communications.html) error in the response from your Home Assistant and show the error message as _"No JSON returned from HTTP request"_ on your device. In the [web-based editor](https://house-of-abbey.github.io/GarminHomeAssistant/web/) you can use the standard developer tools to observe an `HTTP 400` error which the application does not see. Here we are limited by the [Garmin Connect IQ](https://developer.garmin.com/connect-iq/overview/) software development kit (SDK). We do not have enough information at the point of execution in the application to determine the cause of the error. Nor is there an immediately obvious way of identifying this issue using the JSON schema checks. Note that the `service` field will need to be a locally custom `script.<something>` as soon as any `data` fields are populated and not something more generic like `script.turn_on`. If the `service` field is wrong, the application will fail with a [`Communications.INVALID_HTTP_BODY_IN_NETWORK_RESPONSE`](https://developer.garmin.com/connect-iq/api-docs/Toybox/Communications.html) error in the response from your Home Assistant and show the error message as _"No JSON returned from HTTP request"_ on your device. In the [web-based editor](https://house-of-abbey.github.io/GarminHomeAssistant/web/) you can use the standard developer tools to observe an `HTTP 400` error which the application does not see. Here we are limited by the [Garmin Connect IQ](https://developer.garmin.com/connect-iq/overview/) software development kit (SDK). We do not have enough information at the point of execution in the application to determine the cause of the error. Nor is there an immediately obvious way of identifying this issue using the JSON schema checks.
## Exit on Tap
You can choose individual items that will quit after they have completed their action.
```json
{
"entity": "automation.turn_off_stuff",
"name": "Turn off Stuff",
"type": "tap",
"tap_action": {
"service": "automation.trigger"
},
"exit": true
}
```
## Disable Menu Item
If you would like to temporarily disable an item in your menu, e.g. for seasonal reasons like not needing to turn on the heating in summer, then rather than swapping menu definition files or deleting a section of the menu you can mark the item as 'disabled'. This field applies to all menu items.
```json
{
"entity": "automation.turn_off_stuff",
"name": "Turn off Stuff",
"type": "tap",
"tap_action": {
"service": "automation.trigger"
},
"enabled": false
}
```

80
examples/Glance.md Normal file
View File

@@ -0,0 +1,80 @@
[Home](../README.md) | [Switches](Switches.md) | [Actions](Actions.md) | [Templates](Templates.md) | [Glance](Glance.md) | [Background Service](../BackgroundService.md) | [Wi-Fi](../Wi-Fi.md) | [HTTP Headers](../HTTP_Headers.md) | [Trouble Shooting](../TroubleShooting.md) | [Version History](../HISTORY.md)
# Glance
Since [version 2.30](../History.md), it is possible to ovverride the text displayed on the Glance view. This page explains how to customise the text.
## Default View
The default view has always been to display the status of the menu and API availability to indicate if there's a problem. This view has now been updated to be more colourful.
<img src="../images/Venu2_glance_default.png" width="200" title="Venu 2 Default Glance"/>
When either the API or the menu file is inaccessible, the fields will turn red.
## Customised View
In order to customise the Glance view you need to add a `glance` field to the top level of the JSON menu file as illustrated here:
```json
{
"$schema": "https://raw.githubusercontent.com/house-of-abbey/GarminHomeAssistant/main/config.schema.json",
"title": "Home",
"glance": {
"type": "info",
"content": "Text: {% .. %}"
},
"items": [...]
}
```
For example:
<img src="../images/Venu2_glance_custom.png" width="200" title="Venu 2 Customised Glance"/>
```json
{
"$schema": "https://raw.githubusercontent.com/house-of-abbey/GarminHomeAssistant/main/config.schema.json",
"glance": {
"type": "info",
"content": "Solar Battery: {{ states('sensor.battery_capacity_charge') }}%"
},
:
}
```
You may make this as complicated as you like! But you have limited space and only ASCII text characters. **It is best to turn on menu caching in order to speed up the display of the template**. The display is then nearly instantaneous.
The default view will persist showing until the errors are resolved. In order to extract the custom glance template both the menu and the API are required. So it is logical that the two tests must pass first. The exception here is if the menu is cached, in which case only the API needs to pass.
> [!IMPORTANT]
> Sadly what you cannot do is use special characters like: 🌞🔋⛅🪫. Whilst these do display in menu items, they do not seem to work on the Glance view. We really like them, so have tried but failed. Only ASCII text appears to be supported by the Garmin Connect IQ SDK's Glance View. This is not something we have any control over, please do not request this to be "fixed".
It is possible to revert to the default glance content without deleting the template by changing the `type` to `status`.
```json
{
"$schema": "https://raw.githubusercontent.com/house-of-abbey/GarminHomeAssistant/main/config.schema.json",
"title": "Home",
"glance": {
"type": "status",
"content": "Text: {% .. %}"
},
"items": [...]
}
```
So the glance view object has a `type` field with two possible values: `info` and `status`. When the type is `status` the `content` field is not required.
## Displayed Errors
The following shows the default glance when the menu file is not available at the specified URL.
<img src="../images/Venu2_glance_no_menu.png" width="200" title="Venu 2 Glance showing errors"/>
Once the custom glance template has been retrieved and evaluated the display will change. Should the connectivity to your Home Assistant then be lost, e.g. you move out of range of your phone, the glance reflects this in the colour of the residual two rectangles. The top one remains an indicator for the API, and the bottom rectangle remains an indicator for the menu availability, reflecting the original placement in the default glance view that has now been replaced.
<img src="../images/Venu2_glance_no_bt.png" width="200" title="Venu 2 Glance showing lost connectivity"/>

View File

@@ -1,4 +1,4 @@
[Home](../README.md) | Switches | [Actions](Actions.md) | [Templates](Templates.md) | [Background Service](../BackgroundService.md) | [Trouble Shooting](../TroubleShooting.md) | [Version History](../HISTORY.md) [Home](../README.md) | [Switches](Switches.md) | [Actions](Actions.md) | [Templates](Templates.md) | [Glance](Glance.md) | [Background Service](../BackgroundService.md) | [Wi-Fi](../Wi-Fi.md) | [HTTP Headers](../HTTP_Headers.md) | [Trouble Shooting](../TroubleShooting.md) | [Version History](../HISTORY.md)
# Switches # Switches
@@ -108,3 +108,29 @@ Then you can use the following in your config:
"type": "toggle" "type": "toggle"
} }
``` ```
## Exit On Toggle
You can choose individual items that will quit after they have completed their action.
```json
{
"entity": "light.hall_light",
"name": "Hall Light & Quit",
"type": "toggle",
"exit": true
}
```
## Disable Menu Item
If you would like to temporarily disable an item in your menu, e.g. for seasonal reasons like not needing to turn on Christmas tree lights outside the festive season, then rather than swapping menu definition files or deleting a section of the menu you can mark the item as 'disabled'. This field applies to all menu items.
```json
{
"entity": "light.chrissmas_tree",
"name": "Christmas Lights",
"type": "toggle",
"enabled": false
}
```

View File

@@ -1,4 +1,4 @@
[Home](../README.md) | [Switches](Switches.md) | [Actions](Actions.md) | Templates | [Background Service](../BackgroundService.md) | [Trouble Shooting](../TroubleShooting.md) | [Version History](../HISTORY.md) [Home](../README.md) | [Switches](Switches.md) | [Actions](Actions.md) | [Templates](Templates.md) | [Glance](Glance.md) | [Background Service](../BackgroundService.md) | [Wi-Fi](../Wi-Fi.md) | [HTTP Headers](../HTTP_Headers.md) | [Trouble Shooting](../TroubleShooting.md) | [Version History](../HISTORY.md)
# Templates # Templates
@@ -218,6 +218,19 @@ An example of a dimmer light with 4 brightness settings 0..3. Here our light wor
} }
``` ```
## Disable Menu Item
If you would like to temporarily disable an item in your menu, then rather than swapping menu definition files or deleting a section of the menu you can mark the item as 'disabled'. This field applies to all menu items.
```json
{
"name": "Phone",
"type": "info",
"content": "{{ ... }}",
"enabled": false
}
```
## Warnings ## Warnings
Just remember, on older smaller memory devices **you have the ability to crash the application by creating an excessive menu definition**. Templates can require significant definition for highly customised text. Don't be silly. Just remember, on older smaller memory devices **you have the ability to crash the application by creating an excessive menu definition**. Templates can require significant definition for highly customised text. Don't be silly.

View File

@@ -29,22 +29,24 @@ rem Assume we can create and use this directory
set DEST=export set DEST=export
set IQ=HomeAssistant-app.iq set IQ=HomeAssistant-app.iq
rem C:\>java -jar %SDK_PATH%\monkeybrains.jar -h rem usage: monkeyc [-a <arg>] [-b <arg>] [--build-stats <arg>] [-d <arg>]
rem usage: monkeyc [-a <arg>] [-b <arg>] [--build-stats <arg>] [-c <arg>] [-d <arg>] rem [--debug-log-level <arg>] [--debug-log-output <arg>]
rem [--debug-log-level <arg>] [--debug-log-output <arg>] [-e] rem [--disable-api-has-check-removal] [--disable-v2-opcodes] [-e]
rem [--Eno-invalid-symbol] [-f <arg>] [-g] [-h] [-i <arg>] [-k] [-l <arg>] rem [--Eno-invalid-symbol] [-f <arg>] [-g] [-h] [-i <arg>] [-k] [-l <arg>]
rem [-m <arg>] [--no-gen-styles] [-o <arg>] [-O <arg>] [-p <arg>] [-r] [-s rem [-m <arg>] [--no-gen-styles] [-o <arg>] [-O <arg>] [-p <arg>] [-r] [-t]
rem <arg>] [-t] [-u <arg>] [-v] [-w] [-x <arg>] [-y <arg>] [-z <arg>] rem [-u <arg>] [-v] [-w] [-x <arg>] [-y <arg>] [-z <arg>]
rem -a,--apidb <arg> API import file rem -a,--apidb <arg> API import file
rem -b,--apimir <arg> API MIR file rem -b,--apimir <arg> API MIR file
rem --build-stats <arg> Print build stats [0=basic] rem --build-stats <arg> Print build stats [0=basic]
rem -c,--api-level <arg> API Level to target
rem -d,--device <arg> Target device rem -d,--device <arg> Target device
rem --debug-log-level <arg> Debug logging verbosity [0=errors, 1=basic, rem --debug-log-level <arg> Debug logging verbosity [0=errors, 1=basic,
rem 2=intermediate, 3=verbose] rem 2=intermediate, 3=verbose]
rem --debug-log-output <arg>Output log zip file rem --debug-log-output <arg> Output log zip file
rem --disable-api-has-check-removalDo not optimize out API has checks
rem --disable-v2-opcodes Do not use the v2 opcodes
rem -e,--package-app Create an application package. rem -e,--package-app Create an application package.
rem --Eno-invalid-symbol Do not error when a symbol is found to be invalid rem --Eno-invalid-symbol Do not error when a symbol is found to be
rem invalid
rem -f,--jungles <arg> Jungle files rem -f,--jungles <arg> Jungle files
rem -g,--debug Print debug output rem -g,--debug Print debug output
rem -h,--help Prints help information rem -h,--help Prints help information
@@ -56,16 +58,18 @@ rem -m,--manifest <arg> Manifest file (deprecated)
rem --no-gen-styles Do not generate Rez.Styles module rem --no-gen-styles Do not generate Rez.Styles module
rem -o,--output <arg> Output file to create rem -o,--output <arg> Output file to create
rem -O,--optimization <arg> Optimization level [0=none, 1=basic, 2=fast rem -O,--optimization <arg> Optimization level [0=none, 1=basic, 2=fast
rem optimizations, 3=slow optimizations] [p=optimize rem optimizations, 3=slow optimizations]
rem performance, z=optimize code space] rem [p=optimize performance, z=optimize code
rem space]
rem -p,--project-info <arg> projectInfo.xml file to use when compiling rem -p,--project-info <arg> projectInfo.xml file to use when compiling
rem -r,--release Strip debug information rem -r,--release Strip debug information
rem -s,--sdk-version <arg> SDK version to target (deprecated, use -c
rem -t,--unit-test Enables compilation of unit tests rem -t,--unit-test Enables compilation of unit tests
rem -u,--devices <arg> devices.xml file to use when compiling (deprecated) rem -u,--devices <arg> devices.xml file to use when compiling
rem (deprecated)
rem -v,--version Prints the compiler version rem -v,--version Prints the compiler version
rem -w,--warn Show compiler warnings rem -w,--warn Show compiler warnings
rem -x,--excludes <arg> Add annotations to the exclude list (deprecated) rem -x,--excludes <arg> Add annotations to the exclude list
rem (deprecated)
rem -y,--private-key <arg> Private key to sign builds with rem -y,--private-key <arg> Private key to sign builds with
rem -z,--rez <arg> Resource files (deprecated) rem -z,--rez <arg> Resource files (deprecated)
@@ -96,13 +100,11 @@ echo.
-Dfile.encoding=UTF-8 ^ -Dfile.encoding=UTF-8 ^
-Dapple.awt.UIElement=true ^ -Dapple.awt.UIElement=true ^
-jar %SDK_PATH%\monkeybrains.jar ^ -jar %SDK_PATH%\monkeybrains.jar ^
--api-level 3.1.0 ^
--output %IQ% ^ --output %IQ% ^
--jungles %SRC%\monkey.jungle ^ --jungles %SRC%\monkey.jungle ^
--private-key %SRC%\..\developer_key ^ --private-key %SRC%\..\developer_key ^
--package-app ^ --package-app ^
--release --release
rem --warn
echo. echo.
echo Finished exporting HomeAssistant echo Finished exporting HomeAssistant

Binary file not shown.

Before

Width:  |  Height:  |  Size: 697 KiB

After

Width:  |  Height:  |  Size: 580 KiB

BIN
images/NoJson.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
images/wi-fi.mp4 Normal file

Binary file not shown.

View File

@@ -24,10 +24,6 @@
Use "Monkey C: Edit Application" from the Visual Studio Code command palette Use "Monkey C: Edit Application" from the Visual Studio Code command palette
to update the application attributes. to update the application attributes.
--> -->
<!--
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
-->
<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="98c36259-498a-4458-9cef-74a273ad2bc3" type="watch-app" name="@Strings.AppName" entry="HomeAssistantApp" launcherIcon="@Drawables.LauncherIcon" minApiLevel="3.1.0">
<!-- <!--
Use the following from the Visual Studio Code command palette to edit Use the following from the Visual Studio Code command palette to edit
@@ -108,6 +104,8 @@
<iq:product id="fr265"/> <iq:product id="fr265"/>
<iq:product id="fr265s"/> <iq:product id="fr265s"/>
<iq:product id="fr55"/> <iq:product id="fr55"/>
<iq:product id="fr57042mm"/>
<iq:product id="fr57047mm"/>
<iq:product id="fr645"/> <iq:product id="fr645"/>
<iq:product id="fr645m"/> <iq:product id="fr645m"/>
<iq:product id="fr745"/> <iq:product id="fr745"/>
@@ -116,6 +114,7 @@
<iq:product id="fr945lte"/> <iq:product id="fr945lte"/>
<iq:product id="fr955"/> <iq:product id="fr955"/>
<iq:product id="fr965"/> <iq:product id="fr965"/>
<iq:product id="fr970"/>
<iq:product id="gpsmap66"/> <iq:product id="gpsmap66"/>
<iq:product id="gpsmap67"/> <iq:product id="gpsmap67"/>
<iq:product id="instinct2"/> <iq:product id="instinct2"/>
@@ -159,6 +158,7 @@
<iq:product id="vivoactive4"/> <iq:product id="vivoactive4"/>
<iq:product id="vivoactive4s"/> <iq:product id="vivoactive4s"/>
<iq:product id="vivoactive5"/> <iq:product id="vivoactive5"/>
<iq:product id="vivoactive6"/>
</iq:products> </iq:products>
<!-- <!--
Use "Monkey C: Edit Permissions" from the Visual Studio Code command Use "Monkey C: Edit Permissions" from the Visual Studio Code command

View File

@@ -87,8 +87,7 @@ edgeexplore.resourcePath = $(edgeexplore.resourcePath);resources-launcher-36-36;
edgeexplore2.resourcePath = $(edgeexplore2.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 # Screen Size 280x280 launcher icon size 40x40
enduro.resourcePath = $(enduro.resourcePath);resources-launcher-40-40;resources-icons-32 enduro.resourcePath = $(enduro.resourcePath);resources-launcher-40-40;resources-icons-32
# Screen Size 280x280 launcher icon size 40x40 enduro3.resourcePath = $(enduro3.resourcePath);resources-launcher-40-40;resources-icons-32
enduro3.resourcePath = $(enduro3.resourcePath);resources-launcher-40-40;resources-icons-32
# Screen Size 416x416 launcher icon size 60x60 # Screen Size 416x416 launcher icon size 60x60
epix2.resourcePath = $(epix2.resourcePath);resources-launcher-60-60;resources-icons-48 epix2.resourcePath = $(epix2.resourcePath);resources-launcher-60-60;resources-icons-48
# Screen Size 390x390 launcher icon size 60x60 # Screen Size 390x390 launcher icon size 60x60
@@ -115,7 +114,6 @@ fenix6spro.resourcePath = $(fenix6spro.resourcePath);resources-launcher-40-40;re
fenix6xpro.resourcePath = $(fenix6xpro.resourcePath);resources-launcher-40-40;resources-icons-32 fenix6xpro.resourcePath = $(fenix6xpro.resourcePath);resources-launcher-40-40;resources-icons-32
# Screen Size 260x260 launcher icon size 40x40 # Screen Size 260x260 launcher icon size 40x40
fenix7.resourcePath = $(fenix7.resourcePath);resources-launcher-40-40;resources-icons-30 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 fenix7pro.resourcePath = $(fenix7pro.resourcePath);resources-launcher-40-40;resources-icons-30
fenix7pronowifi.resourcePath = $(fenix7pronowifi.resourcePath);resources-launcher-40-40;resources-icons-30 fenix7pronowifi.resourcePath = $(fenix7pronowifi.resourcePath);resources-launcher-40-40;resources-icons-30
# Screen Size 240x240 launcher icon size 40x40 # Screen Size 240x240 launcher icon size 40x40
@@ -124,7 +122,6 @@ fenix7s.resourcePath = $(fenix7s.resourcePath);resources-launcher-40-40;resource
fenix7spro.resourcePath = $(fenix7spro.resourcePath);resources-launcher-40-40;resources-icons-28 fenix7spro.resourcePath = $(fenix7spro.resourcePath);resources-launcher-40-40;resources-icons-28
# Screen Size 280x280 launcher icon size 40x40 # Screen Size 280x280 launcher icon size 40x40
fenix7x.resourcePath = $(fenix7x.resourcePath);resources-launcher-40-40;resources-icons-32 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 fenix7xpro.resourcePath = $(fenix7xpro.resourcePath);resources-launcher-40-40;resources-icons-32
fenix7xpronowifi.resourcePath = $(fenix7xpronowifi.resourcePath);resources-launcher-40-40;resources-icons-32 fenix7xpronowifi.resourcePath = $(fenix7xpronowifi.resourcePath);resources-launcher-40-40;resources-icons-32
# Screen Size 416x416 launcher icon size 60x60 # Screen Size 416x416 launcher icon size 60x60
@@ -141,7 +138,6 @@ fenixchronos.resourcePath = $(fenixchronos.resourcePath);resources-launcher-36-3
fenixe.resourcePath = $(fenixe.resourcePath);resources-launcher-60-60;resources-icons-48 fenixe.resourcePath = $(fenixe.resourcePath);resources-launcher-60-60;resources-icons-48
# Screen Size 390 x 390 launcher icon size 54x54 # Screen Size 390 x 390 launcher icon size 54x54
fr165.resourcePath = $(descentmk2s.resourcePath);resources-launcher-54-54;resources-icons-46 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 fr165m.resourcePath = $(descentmk2s.resourcePath);resources-launcher-54-54;resources-icons-46
# Screen Size 240x240 launcher icon size 40x40 # Screen Size 240x240 launcher icon size 40x40
fr245.resourcePath = $(fr245.resourcePath);resources-launcher-40-40;resources-icons-28 fr245.resourcePath = $(fr245.resourcePath);resources-launcher-40-40;resources-icons-28
@@ -157,6 +153,10 @@ fr265.resourcePath = $(fr265.resourcePath);resources-launcher-60-60;resources-ic
fr265s.resourcePath = $(fr265s.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 # Screen Size 208x208 launcher icon size 35x35
fr55.resourcePath = $(fr55.resourcePath);resources-launcher-35-35;resources-icons-24 fr55.resourcePath = $(fr55.resourcePath);resources-launcher-35-35;resources-icons-24
# Screen Size 390x390 launcher icon size 54x54
fr57042mm.resourcePath = $(fr57042mm.resourcePath);resources-launcher-54-54;resources-icons-46
# Screen Size 454x454 launcher icon size 65x65
fr57047mm.resourcePath = $(fr57047mm.resourcePath);resources-launcher-65-65;resources-icons-53
# Screen Size 240x240 launcher icon size 40x40 # Screen Size 240x240 launcher icon size 40x40
fr645.resourcePath = $(fr645.resourcePath);resources-launcher-40-40;resources-icons-28 fr645.resourcePath = $(fr645.resourcePath);resources-launcher-40-40;resources-icons-28
fr645m.resourcePath = $(fr645m.resourcePath);resources-launcher-40-40;resources-icons-28 fr645m.resourcePath = $(fr645m.resourcePath);resources-launcher-40-40;resources-icons-28
@@ -169,9 +169,9 @@ fr945lte.resourcePath = $(fr945lte.resourcePath);resources-launcher-40-40;resour
fr955.resourcePath = $(fr955.resourcePath);resources-launcher-40-40;resources-icons-30 fr955.resourcePath = $(fr955.resourcePath);resources-launcher-40-40;resources-icons-30
# Screen Size 454x454 launcher icon size 65x65 # Screen Size 454x454 launcher icon size 65x65
fr965.resourcePath = $(fr965.resourcePath);resources-launcher-65-65;resources-icons-53 fr965.resourcePath = $(fr965.resourcePath);resources-launcher-65-65;resources-icons-53
fr970.resourcePath = $(fr970.resourcePath);resources-launcher-65-65;resources-icons-53
# Screen Size 240x400 launcher icon size 38x33 # Screen Size 240x400 launcher icon size 38x33
gpsmap66.resourcePath = $(gpsmap66.resourcePath);resources-launcher-33-33;resources-icons-28 gpsmap66.resourcePath = $(gpsmap66.resourcePath);resources-launcher-33-33;resources-icons-28
# Screen Size 240x400 launcher icon size 38x33
gpsmap67.resourcePath = $(gpsmap67.resourcePath);resources-launcher-33-33;resources-icons-28 gpsmap67.resourcePath = $(gpsmap67.resourcePath);resources-launcher-33-33;resources-icons-28
# Screen Size 176x176 launcher icon size 62x62 # Screen Size 176x176 launcher icon size 62x62
instinct2.resourcePath = $(instinct2.resourcePath);resources-launcher-62-62;resources-icons-21-w instinct2.resourcePath = $(instinct2.resourcePath);resources-launcher-62-62;resources-icons-21-w
@@ -229,7 +229,6 @@ venud.resourcePath = $(venud.resourcePath);resources-launcher-60-60;resources-ic
venusq.resourcePath = $(venusq.resourcePath);resources-launcher-36-36;resources-icons-28 venusq.resourcePath = $(venusq.resourcePath);resources-launcher-36-36;resources-icons-28
# Screen Size 320x360 launcher icon size 40x40 # Screen Size 320x360 launcher icon size 40x40
venusq2.resourcePath = $(venusq2.resourcePath);resources-launcher-40-40;resources-icons-38 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 venusq2m.resourcePath = $(venusq2m.resourcePath);resources-launcher-40-40;resources-icons-38
# Screen Size 240x240 launcher icon size 36x36 # Screen Size 240x240 launcher icon size 36x36
venusqm.resourcePath = $(venusqm.resourcePath);resources-launcher-36-36;resources-icons-28 venusqm.resourcePath = $(venusqm.resourcePath);resources-launcher-36-36;resources-icons-28
@@ -241,5 +240,7 @@ vivoactive3mlte.resourcePath = $(vivoactive3mlte.resourcePath);resources-launche
vivoactive4.resourcePath = $(vivoactive4.resourcePath);resources-launcher-35-35;resources-icons-30 vivoactive4.resourcePath = $(vivoactive4.resourcePath);resources-launcher-35-35;resources-icons-30
# Screen Size 218x218 launcher icon size 30x30 # Screen Size 218x218 launcher icon size 30x30
vivoactive4s.resourcePath = $(vivoactive4s.resourcePath);resources-launcher-30-30;resources-icons-26 vivoactive4s.resourcePath = $(vivoactive4s.resourcePath);resources-launcher-30-30;resources-icons-26
# Screen Size 390x390 launcher icon size 70x70 # Screen Size 390x390 launcher icon size 56x56
vivoactive5.resourcePath = $(vivoactive5.resourcePath);resources-launcher-70-70;resources-icons-46 vivoactive5.resourcePath = $(vivoactive5.resourcePath);resources-launcher-56-56;resources-icons-46
# Screen Size 390x390 launcher icon size 54x54
vivoactive6.resourcePath = $(vivoactive6.resourcePath);resources-launcher-54-54;resources-icons-46

94
removeTranslations.py Normal file
View File

@@ -0,0 +1,94 @@
####################################################################################
#
# 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, 24 July 2025
#
#
# Description:
#
# Python script to remove all the translations of a specific id from the XML files.
#
# Usage:
# python removeTranslations.py <id>
#
# Python installation:
# pip install beautifulsoup4
# NB. For XML formatting:
# pip install lxml
#
# References:
# * https://www.crummy.com/software/BeautifulSoup/bs4/doc/
# * https://realpython.com/beautiful-soup-web-scraper-python/
# * https://www.crummy.com/software/BeautifulSoup/bs4/doc/#parsing-xml
# * https://www.crummy.com/software/BeautifulSoup/bs4/doc/#xml
#
####################################################################################
import sys
# from bs4 import BeautifulSoup
import os
def remove_translations(file_path: str, translation_id: str) -> None:
"""
Remove all translations of a specific id from the XML file.
:param file_path: Path to the XML file.
:param translation_id: The id of the translation to remove.
"""
# Breaks the formatting
# with open(file_path, "r", encoding="utf-8") as file:
# soup = BeautifulSoup(file, features="xml")
# # Find all string elements with the specified id
# strings_to_remove = soup.find_all("string", {"id": translation_id})
# for string in strings_to_remove:
# string.decompose() # Remove the string element
# # Write the modified XML back to the file
# with open(file_path, "wb") as file:
# file.write(soup.encode("utf-8") + b"\n")
# Use standard string replace instead
with open(file_path, "r", encoding="utf-8") as file:
content = file.read()
new = ""
for line in content.splitlines():
if not f'id="{translation_id}"' in line:
new += line + "\n"
with open(file_path, "w", encoding="utf-8") as file:
file.write(new)
def main(translation_id: str) -> None:
"""
Main function to process all XML files.
:param translation_id: The id of the translation to remove.
"""
xml_files = []
for directory in os.listdir("."):
if os.path.isdir(directory) and "resources-" in directory:
xml_file_path = os.path.join(directory, "strings", "strings.xml")
if os.path.exists(xml_file_path):
xml_files.append(xml_file_path)
for xml_file in xml_files:
print(f"Processing file: {xml_file}")
remove_translations(xml_file, translation_id)
if __name__ == "__main__":
if len(sys.argv) != 2:
print("Usage: python removeTranslations.py <id>")
sys.exit(1)
translation_id = sys.argv[1]
main(translation_id)

View File

@@ -9,7 +9,7 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
@@ -19,54 +19,66 @@
--> -->
<strings> <strings>
<string id="ApiFlood">مكالمات واجهة برمجة التطبيقات سريعة جدًا. يُرجى إبطاء طلباتك.</string> <string id="ApiFlood">API يدعو سريع للغاية. يرجى إبطاء طلباتك.</string>
<string id="ApiUrlNotFound">لم يتم العثور على عنوان URL. قد يكون هناك خطأ في عنوان URL الخاص بواجهة برمجة التطبيقات في الإعدادات.</string> <string id="ApiUrlNotFound">URL لم يتم العثور عليه. خطأ URL API المحتمل في الإعدادات.</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">متاح</string> <string id="Available" scope="glance">متاح</string>
<string id="Cached" scope="glance">مخزن مؤقتا</string> <string id="Cached" scope="glance">مخبأة</string>
<string id="Checking" scope="glance">جاري التحقق...</string> <string id="Checking" scope="glance">التحقق ...</string>
<string id="ConfigUrlNotFound">لم يتم العثور على عنوان URL. قد يكون هناك خطأ في تكوين عنوان URL في الإعدادات.</string> <string id="ConfigUrlNotFound">URL لم يتم العثور عليه. خطأ في عنوان URL التكوين المحتمل في الإعدادات.</string>
<string id="Confirm">بالتأكيد؟</string> <string id="Confirm">بالتأكيد؟</string>
<string id="Empty">فارغ</string> <string id="Empty">فارغ</string>
<string id="Executed" scope="glance">مؤكد</string> <string id="Executed" scope="glance">مؤكد</string>
<string id="GlanceMenu" scope="glance">قائمة طعام</string> <string id="GlanceMenu" scope="glance">قائمة طعام</string>
<string id="Memory" scope="glance">ذاكرة</string> <string id="Memory" scope="glance">ذاكرة</string>
<string id="NoAPIKey" scope="glance">لا يوجد مفتاح API في إعدادات التطبيق.</string> <string id="NoAPIKey" scope="glance">لا مفتاح API في إعدادات التطبيق.</string>
<string id="NoApiUrl" scope="glance">لا يوجد عنوان URL لـ API في إعدادات التطبيق.</string> <string id="NoApiUrl" scope="glance">لا عنوان URL API في إعدادات التطبيق.</string>
<string id="NoConfigUrl" scope="glance">لا يوجد عنوان URL للتكوين في إعدادات التطبيق.</string> <string id="NoConfigUrl" scope="glance">لا يوجد عنوان URL للتكوين في إعدادات التطبيق.</string>
<string id="NoInternet">لا يوجد اتصال بالإنترنت.</string> <string id="NoInternet">لا اتصال إنترنت.</string>
<string id="NoJson">لم يتم إرجاع JSON من طلب HTTP.</string> <string id="NoJson">لم يتم إرجاع أي JSON من طلب HTTP.</string>
<string id="NoPhone" scope="glance">لا يوجد اتصال بالهاتف.</string> <string id="NoPhone" scope="glance">لا يوجد اتصال هاتفي.</string>
<string id="NoResponse">لا يوجد رد، تحقق من اتصال الإنترنت</string> <string id="NoPhoneNoCache" scope="glance">لا اتصال الهاتف ، لا توجد قائمة مخبأة.</string>
<string id="PinInputLocked">تم قفل مدخل رقم التعريف الشخصي (PIN)</string> <string id="NoResponse">لا استجابة ، تحقق من اتصال الإنترنت</string>
<string id="TimedOut">طلب توقيت الخروج</string>
<string id="PinInputLocked">دبوس إدخال مغلق ل</string>
<string id="PotentialError">خطأ محتمل</string> <string id="PotentialError">خطأ محتمل</string>
<string id="Seconds">ثواني</string> <string id="Seconds">ثوان</string>
<string id="TemplateError">خطأ القالب</string> <string id="TemplateError">خطأ قالب</string>
<string id="TrailingSlashErr">يجب ألا يحتوي عنوان URL الخاص بواجهة برمجة التطبيقات على شرطة مائلة '/' في نهايته.</string> <string id="TrailingSlashErr">يجب ألا يكون URL url API مائلة زائدة "/".</string>
<string id="Unavailable" scope="glance">غير متاح</string> <string id="Unavailable" scope="glance">غير متاح</string>
<string id="Unconfigured" scope="glance">غير مهيأ</string> <string id="Unconfigured" scope="glance">غير متكافئ</string>
<string id="UnhandledHttpErr">طلب HTTP أعاد رمز الخطأ =</string> <string id="UnhandledHttpErr">طلب HTTP رمز الخطأ الذي تم إرجاعه =</string>
<string id="WebhookFailed">فشل في تسجيل Webhook</string> <string id="WebhookFailed">فشل في تسجيل webhook</string>
<string id="WrongPin">رقم التعريف الشخصي خاطئ</string> <string id="WrongPin">دبوس خاطئ</string>
<!-- بالنسبة لإعدادات واجهة المستخدم الرسومية، يجب أن تكون السلاسل بالترتيب الذي يتم استخدامها به. --> <string id="WifiLteNotAvailable">لا متوفر Wi-Fi أو LTE</string>
<string id="WifiLtePrompt">تنفيذ على Wi-Fi/LTE؟</string>
<string id="WifiLteExecutionTitle">إرسال إلى المنزل مساعد.</string>
<string id="WifiLteExecutionDataError">لم يتم استلام البيانات.</string>
<!-- بالنسبة للإعدادات واجهة المستخدم الرسومية ، يجب أن تكون السلاسل بالترتيب المستخدمة. -->
<string id="SettingsSelect">يختار...</string> <string id="SettingsSelect">يختار...</string>
<string id="SettingsApiKey">مفتاح API لـ HomeAssistant.</string> <string id="SettingsApiKey">مفتاح API للمثليين.</string>
<string id="SettingsApiKeyPrompt">رمز الوصول طويل الأمد.</string> <string id="SettingsApiKeyPrompt">رمز الوصول منذ فترة طويلة.</string>
<string id="SettingsApiUrl">عنوان URL لـ API HomeAssistant.</string> <string id="SettingsApiUrl">عنوان URL لـ HereasSistant API.</string>
<string id="SettingsConfigUrl">عنوان URL لتكوين القائمة (JSON).</string> <string id="SettingsConfigUrl">عنوان URL لتكوين القائمة (JSON).</string>
<string id="SettingsCacheConfig">هل يجب على التطبيق تخزين تكوين القائمة مؤقتًا؟</string> <string id="SettingsCacheConfig">هل يجب أن يقوم تطبيق ذاكرة التخزين المؤقت لتكوين القائمة؟</string>
<string id="SettingsClearCache">هل يجب على التطبيق مسح ذاكرة التخزين المؤقت الموجودة في المرة التالية التي يتم تشغيله فيها؟</string> <string id="SettingsClearCache">هل يجب على التطبيق مسح ذاكرة التخزين المؤقت الموجودة في المرة القادمة التي يتم فيها بدء تشغيلها؟</string>
<string id="SettingsVibration">هل يجب أن يوفر التطبيق ردود الفعل عبر الاهتزازات؟</string> <string id="SettingsWifiLteExecutionEnable">تمكين تنفيذ الأوامر على Wi-Fi/LTE.</string>
<string id="SettingsAppTimeout">مهلة زمنية بالثواني. قم بالخروج من التطبيق بعد هذه الفترة من عدم النشاط للحفاظ على بطارية الجهاز.</string> <string id="SettingsVibration">هل يجب أن يقدم التطبيق ملاحظات عبر الاهتزازات؟</string>
<string id="SettingsPollDelay">تأخير إضافي في الاستطلاع (بالثواني). يضيف تأخيرًا بين تحديث حالة جميع عناصر القائمة.</string> <string id="SettingsAppTimeout">مهلة في ثوان. الخروج من التطبيق بعد هذه الفترة من عدم النشاط لحفظ بطارية الجهاز.</string>
<string id="SettingsConfirmTimeout">بعد هذا الوقت (بالثواني)، يتم إغلاق مربع حوار التأكيد الخاص بالإجراء تلقائيًا ويتم إلغاء الإجراء. اضبطه على 0 لتعطيل مهلة الانتظار.</string> <string id="SettingsPollDelay">تأخير استطلاع إضافي (بالثواني). يضيف تأخيرًا بين تحديث الحالة لجميع عناصر القائمة.</string>
<string id="SettingsPin">رقم التعريف الشخصي (PIN) المكون من 4 أرقام الذي سيتم استخدامه لجميع الإجراءات التي تتطلب التأكيد (0000-9999).</string> <string id="SettingsConfirmTimeout">بعد هذا الوقت (بالثواني) ، يتم إغلاق مربع حوار تأكيد لإجراء ما ويتم إلغاء الإجراء. ضبط على 0 لتعطيل المهلة.</string>
<string id="SettingsPinError">يرجى تكوين رقم تعريف شخصي صالح مكون من 4 أرقام بين 0000 و9999 في إعدادات التطبيق.</string> <string id="SettingsPin">دبوس من 4 أرقام لاستخدامه في جميع الإجراءات التي تتطلب ذلك (0000-9999).</string>
<string id="SettingsTextAlign">محاذاة القائمة اليسرى (إيقاف) أو اليمنى (تشغيل).</string> <string id="SettingsPinError">يرجى تكوين دبوس رقمي مكون من 4 أرقام بين 0000 و 9999 في إعدادات التطبيق.</string>
<string id="LeftToRight">من اليسار إلى اليمين</string> <string id="SettingsTextAlign">اليسار (قبالة) أو محاذاة القائمة اليمنى (ON).</string>
<string id="RightToLeft">من اليمين إلى اليسار</string> <string id="SettingsLeftToRight">من اليسار إلى اليمين</string>
<string id="SettingsWidgetStart">(الأداة فقط) قم بتشغيل التطبيق تلقائيًا من الأداة دون انتظار نقرة.</string> <string id="SettingsRightToLeft">من اليمين إلى اليسار</string>
<string id="SettingsEnableBatteryLevel">قم بتمكين خدمة الخلفية لإرسال بيانات مستوى بطارية الجهاز وموقعه ونشاطه (إذا كان مدعومًا) إلى Home Assistant.</string> <string id="SettingsWidgetStart">(عنصر واجهة المستخدم فقط) ابدأ التطبيق تلقائيًا من عنصر واجهة المستخدم دون انتظار النقر.</string>
<string id="SettingsBatteryLevelRefreshRate">معدل التحديث (بالدقائق) الذي يجب أن تكرر به الخدمة الخلفية إرسال البيانات.</string> <string id="SettingsEnableBatteryLevel">قم بتمكين خدمة الخلفية لإرسال مستوى بطارية الجهاز والموقع و (إذا كان مدعومًا) بيانات النشاط إلى مساعد المنزل.</string>
<string id="WebhookId">(للقراءة فقط) معرف Webhook الذي أنشأه الجهاز لتحديثات الخدمة في الخلفية. قد تحتاج إلى هذا من أجل تصحيح الأخطاء.</string> <string id="SettingsBatteryLevelRefreshRate">معدل التحديث (في الدقائق) التي يجب أن تكرر خدمة الخلفية إرسال البيانات.</string>
<string id="SettingsUserHttpHeader">قام المستخدم بتزويد المستخدم HTTP</string>
<string id="SettingsUserHttpHeaderDescription">تتطلب بعض عمليات تثبيت المساعدين المنزلي مواصفات رأس HTTP مخصص من أجل العمل.</string>
<string id="SettingsUserHttpHeaderName">قام المستخدم بتزويد HTTP Header: الاسم</string>
<string id="SettingsUserHttpHeaderValue">قام المستخدم بتزويد HTTP Header: Value</string>
<string id="SettingsClearWebhookId">أعد الاتصال بمساعد المنزل (Clear WebHook ID ، انظر دليل استكشاف الأخطاء وإصلاحها).</string>
<string id="SettingsWebhookId">(اقرأ فقط) معرف WebHook الذي تم إنشاؤه بواسطة الجهاز لتحديثات خدمة الخلفية. قد تطلب هذا لتصحيح الأخطاء.</string>
</strings> </strings>

View File

@@ -9,64 +9,76 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
<!-- <!--
Generated by Google Translate: English to Bulgarian Generated by Google Translate: English to Bulgarian
Генерирано от Google Translate от английски Генериран от Google Translate от английски
--> -->
<strings> <strings>
<string id="ApiFlood">Извикванията на API са твърде бързи. Моля, забавете вашите заявки.</string> <string id="ApiFlood">API се обажда твърде бързо. Моля, забавете заявките си.</string>
<string id="ApiUrlNotFound">URL не е намерен. Потенциална грешка в URL адреса на API в настройките.</string> <string id="ApiUrlNotFound">URL адрес не е намерен. Потенциална грешка в URL адреса на API в настройките.</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">Наличен</string> <string id="Available" scope="glance">На разположение</string>
<string id="Cached" scope="glance">Кеширано</string> <string id="Cached" scope="glance">Кеширан</string>
<string id="Checking" scope="glance">Проверка...</string> <string id="Checking" scope="glance">Проверка ...</string>
<string id="ConfigUrlNotFound">URL не е намерен. Потенциална грешка в URL адреса на конфигурацията в настройките.</string> <string id="ConfigUrlNotFound">URL адрес не е намерен. Потенциална грешка в URL адрес на конфигурация в настройките.</string>
<string id="Confirm">разбира се</string> <string id="Confirm">Сигурно?</string>
<string id="Empty">празна</string> <string id="Empty">Празен</string>
<string id="Executed" scope="glance">Потвърдено</string> <string id="Executed" scope="glance">Потвърдено</string>
<string id="GlanceMenu" scope="glance">Меню</string> <string id="GlanceMenu" scope="glance">Меню</string>
<string id="Memory" scope="glance">памет</string> <string id="Memory" scope="glance">Памет</string>
<string id="NoAPIKey" scope="glance">Няма API ключ в настройките на приложението.</string> <string id="NoAPIKey" scope="glance">Няма ключ за API в настройките на приложението.</string>
<string id="NoApiUrl" scope="glance">Няма URL адрес на API в настройките на приложението.</string> <string id="NoApiUrl" scope="glance">Няма URL адрес на API в настройките на приложението.</string>
<string id="NoConfigUrl" scope="glance">Няма конфигурационен URL адрес в настройките на приложението.</string> <string id="NoConfigUrl" scope="glance">Няма URL адрес на конфигурация в настройките на приложението.</string>
<string id="NoInternet">Няма интернет връзка.</string> <string id="NoInternet">Няма интернет връзка.</string>
<string id="NoJson">Няма върнат JSON от HTTP заявка.</string> <string id="NoJson">Нито един JSON се върна от HTTP заявка.</string>
<string id="NoPhone" scope="glance">Няма телефонна връзка.</string> <string id="NoPhone" scope="glance">Няма телефонна връзка.</string>
<string id="NoResponse">Няма отговор, проверете интернет връзката</string> <string id="NoPhoneNoCache" scope="glance">Без телефонна връзка, без кеширано меню.</string>
<string id="PinInputLocked">Въвеждането на PIN е заключено за</string> <string id="NoResponse">Без отговор, проверете интернет връзката</string>
<string id="TimedOut">Заявка изтече</string>
<string id="PinInputLocked">ПИН вход, заключен за</string>
<string id="PotentialError">Потенциална грешка</string> <string id="PotentialError">Потенциална грешка</string>
<string id="Seconds">секунди</string> <string id="Seconds">секунди</string>
<string id="TemplateError">Грешка в шаблона</string> <string id="TemplateError">Грешка в шаблона</string>
<string id="TrailingSlashErr">URL адресът на API не трябва да има наклонена черта '/' в края.</string> <string id="TrailingSlashErr">URL адресът на API не трябва да има закъснение '/'.</string>
<string id="Unavailable" scope="glance">Недостъпен</string> <string id="Unavailable" scope="glance">Недостъпни</string>
<string id="Unconfigured" scope="glance">Неконфигуриран</string> <string id="Unconfigured" scope="glance">Неуверен</string>
<string id="UnhandledHttpErr">HTTP заявката върна код на грешка =</string> <string id="UnhandledHttpErr">HTTP заявка Върната код за грешка =</string>
<string id="WebhookFailed">Неуспешно регистриране на Webhook</string> <string id="WebhookFailed">Не успя да регистрира WebHook</string>
<string id="WrongPin">Грешен ПИН</string> <string id="WrongPin">Грешен щифт</string>
<!-- За GUI на настройките низовете трябва да са в реда, в който се използват. --> <string id="WifiLteNotAvailable">Няма налични Wi-Fi или LTE</string>
<string id="SettingsSelect">Изберете...</string> <string id="WifiLtePrompt">Изпълнете над Wi-Fi/LTE?</string>
<string id="SettingsApiKey">API ключ за HomeAssistant.</string> <string id="WifiLteExecutionTitle">Изпращане до домашен асистент.</string>
<string id="SettingsApiKeyPrompt">Токен за дълготраен достъп.</string> <string id="WifiLteExecutionDataError">Няма получени данни.</string>
<string id="SettingsApiUrl">URL адрес за API на HomeAssistant.</string> <!-- За GUI на настройките, низовете трябва да са в реда, в който се използват. -->
<string id="SettingsConfigUrl">URL за конфигурация на менюто (JSON).</string> <string id="SettingsSelect">Изберете ...</string>
<string id="SettingsApiKey">Ключ на API за домашно.</string>
<string id="SettingsApiKeyPrompt">Дълготраен маркер за достъп.</string>
<string id="SettingsApiUrl">URL за домашен API.</string>
<string id="SettingsConfigUrl">URL за конфигуриране на менюто (JSON).</string>
<string id="SettingsCacheConfig">Трябва ли приложението да кешира конфигурацията на менюто?</string> <string id="SettingsCacheConfig">Трябва ли приложението да кешира конфигурацията на менюто?</string>
<string id="SettingsClearCache">Трябва ли приложението да изчисти съществуващия кеш при следващото стартиране?</string> <string id="SettingsClearCache">Трябва ли приложението да изчисти съществуващия кеш следващия път, когато е стартиран?</string>
<string id="SettingsWifiLteExecutionEnable">Активиране на изпълнение на команди над Wi-Fi/LTE.</string>
<string id="SettingsVibration">Трябва ли приложението да предоставя обратна връзка чрез вибрации?</string> <string id="SettingsVibration">Трябва ли приложението да предоставя обратна връзка чрез вибрации?</string>
<string id="SettingsAppTimeout">Изчакване в секунди. Излезте от приложението след този период на неактивност, за да запазите батерията на устройството.</string> <string id="SettingsAppTimeout">Време за изчакване за секунди. Излезте от приложението след този период на бездействие, за да запазите батерията на устройството.</string>
<string id="SettingsPollDelay">Допълнително забавяне на анкетата (в секунди). Добавя забавяне между актуализацията на състоянието на всички елементи от менюто.</string> <string id="SettingsPollDelay">Допълнително забавяне на анкетата (за секунди). Добавя забавяне между актуализацията на състоянието на всички елементи от менюто.</string>
<string id="SettingsConfirmTimeout">След това време (в секунди) диалоговият прозорец за потвърждение за действие се затваря автоматично и действието се отменя. Задайте 0, за да деактивирате изчакването.</string> <string id="SettingsConfirmTimeout">След това време (за секунди) диалоговият прозорец за потвърждение за действие автоматично се затваря и действието се отменя. Задайте 0, за да деактивирате изчакване.</string>
<string id="SettingsPin">4-цифрен ПИН, който да се използва за всички действия, които изискват потвърждение (0000-9999).</string> <string id="SettingsPin">4-цифрен ПИН, който ще се използва за всички действия, които го изискват (0000-9999).</string>
<string id="SettingsPinError">Моля, конфигурирайте валиден 4-цифрен цифров PIN между 0000 и 9999 в настройките на приложението.</string> <string id="SettingsPinError">Моля, конфигурирайте валиден 4-цифрен цифров ПИН между 0000 и 9999 в настройките на приложението.</string>
<string id="SettingsTextAlign">Ляво (изключено) или дясно (включено) подравняване на менюто.</string> <string id="SettingsTextAlign">Наляво (изключено) или вдясно (включено) изравняване на менюто.</string>
<string id="LeftToRight">Отляво надясно</string> <string id="SettingsLeftToRight">Отляво надясно</string>
<string id="RightToLeft">От дясно на ляво</string> <string id="SettingsRightToLeft">Отдясно наляво</string>
<string id="SettingsWidgetStart">(Само за джаджа) Автоматично стартирайте приложението от джаджата, без да чакате докосване.</string> <string id="SettingsWidgetStart">(Само при джаджа) Автоматично стартирайте приложението от джаджата, без да чакате докосване.</string>
<string id="SettingsEnableBatteryLevel">Активирайте услугата на заден план, за да изпраща данни за нивото на батерията на устройството, местоположението и (ако се поддържа) за дейността до Home Assistant.</string> <string id="SettingsEnableBatteryLevel">Активирайте фоновата услуга за изпращане на нивото на батерията на устройството, местоположението и (ако се поддържа) данни за активност на домашен асистент.</string>
<string id="SettingsBatteryLevelRefreshRate">Честотата на опресняване (в минути), с която фоновата услуга трябва да повтори изпращането на данни.</string> <string id="SettingsBatteryLevelRefreshRate">Скоростта на опресняване (за минути), при която фоновата услуга трябва да повтори изпращането на данни.</string>
<string id="WebhookId">(Само за четене) Идентификаторът на Webhook, създаден от устройството за актуализации на фонови услуги. Може да ви е необходимо това за отстраняване на грешки.</string> <string id="SettingsUserHttpHeader">Потребител, доставен HTTP заглавка</string>
<string id="SettingsUserHttpHeaderDescription">Някои инсталации за домашен асистент изискват спецификация на персонализиран HTTP заглавка, за да функционират.</string>
<string id="SettingsUserHttpHeaderName">Потребител, доставен http-header: Име</string>
<string id="SettingsUserHttpHeaderValue">Потребител, доставен http-header: стойност</string>
<string id="SettingsClearWebhookId">Свържете се отново с домашния асистент (Clear Webhook ID, вижте Ръководство за отстраняване на неизправности).</string>
<string id="SettingsWebhookId">(Само прочетете) Идентификационният номер на WebHook, създаден от устройството за актуализации на фоновите услуги. Може да се наложи това за отстраняване на грешки.</string>
</strings> </strings>

View File

@@ -9,64 +9,76 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
<!-- <!--
Generated by Google Translate: English to Czech Generated by Google Translate: English to Czech
Generováno překladem Google z angličtiny Generováno překladem Google z angličtiny
--> -->
<strings> <strings>
<string id="ApiFlood">Příliš rychlá volání API. Zpomalte prosím své požadavky.</string> <string id="ApiFlood">API volá příliš rychlé. Prosím, zpomalte své požadavky.</string>
<string id="ApiUrlNotFound">Adresa URL nenalezena. Potenciální chyba adresy URL rozhraní API v nastavení.</string> <string id="ApiUrlNotFound">URL nebyla nalezena. Potenciální chyba URL API v nastavení.</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">Dostupné</string> <string id="Available" scope="glance">Dostupné</string>
<string id="Cached" scope="glance">Uloženo do mezipaměti</string> <string id="Cached" scope="glance">V mezipaměti</string>
<string id="Checking" scope="glance">Kontrola...</string> <string id="Checking" scope="glance">Kontrola ...</string>
<string id="ConfigUrlNotFound">Adresa URL nenalezena. Potenciální chyba konfigurační adresy URL v nastavení.</string> <string id="ConfigUrlNotFound">URL nebyla nalezena. Potenciální chyba URL konfigurace v nastavení.</string>
<string id="Confirm">Určitě?</string> <string id="Confirm">Určitě?</string>
<string id="Empty">Prázdný</string> <string id="Empty">Prázdný</string>
<string id="Executed" scope="glance">Potvrzeno</string> <string id="Executed" scope="glance">Potvrzeno</string>
<string id="GlanceMenu" scope="glance">Menu</string> <string id="GlanceMenu" scope="glance">Menu</string>
<string id="Memory" scope="glance">Paměť</string> <string id="Memory" scope="glance">Paměť</string>
<string id="NoAPIKey" scope="glance">V nastavení aplikace není žádný klíč API.</string> <string id="NoAPIKey" scope="glance">Žádný klíč API v nastavení aplikace.</string>
<string id="NoApiUrl" scope="glance">V nastavení aplikace není žádná adresa URL API.</string> <string id="NoApiUrl" scope="glance">Žádná URL API v nastavení aplikace.</string>
<string id="NoConfigUrl" scope="glance">V nastavení aplikace není žádná konfigurační URL.</string> <string id="NoConfigUrl" scope="glance">V nastavení aplikace není žádná konfigurační adresa URL.</string>
<string id="NoInternet">Žádné připojení k internetu.</string> <string id="NoInternet">Žádné připojení k internetu.</string>
<string id="NoJson">Z požadavku HTTP se nevrátil žádný JSON.</string> <string id="NoJson">Žádný JSON se nevrátil z požadavku HTTP.</string>
<string id="NoPhone" scope="glance">Žádné telefonní spojení.</string> <string id="NoPhone" scope="glance">Žádné telefonní připojení.</string>
<string id="NoResponse">Žádná odpověď, zkontrolujte připojení k internetu</string> <string id="NoPhoneNoCache" scope="glance">Žádné připojení telefonu, žádné menu v mezipaměti.</string>
<string id="PinInputLocked">Vstup PIN uzamčen pro</string> <string id="NoResponse">Žádná odpověď, zkontrolovat připojení k internetu</string>
<string id="TimedOut">Požadavek načasovaný</string>
<string id="PinInputLocked">Vstup kolíku uzamčený pro</string>
<string id="PotentialError">Potenciální chyba</string> <string id="PotentialError">Potenciální chyba</string>
<string id="Seconds">sekundy</string> <string id="Seconds">sekundy</string>
<string id="TemplateError">Chyba šablony</string> <string id="TemplateError">Chyba šablony</string>
<string id="TrailingSlashErr">Adresa URL rozhraní API nesmí mít na konci lomítko „/“.</string> <string id="TrailingSlashErr">URL API nesmí mít koncové lomítko '/'.</string>
<string id="Unavailable" scope="glance">Není k dispozici</string> <string id="Unavailable" scope="glance">Nedostupné</string>
<string id="Unconfigured" scope="glance">Nenakonfigurováno</string> <string id="Unconfigured" scope="glance">Nekonfigurované</string>
<string id="UnhandledHttpErr">Požadavek HTTP vrátil kód chyby =</string> <string id="UnhandledHttpErr">HTTP požadavek vrátil chybový kód =</string>
<string id="WebhookFailed">Registrace Webhooku se nezdařila</string> <string id="WebhookFailed">Nepodařilo se zaregistrovat Webhook</string>
<string id="WrongPin">Chybný PIN</string> <string id="WrongPin">Špatný špendlík</string>
<!-- Pro nastavení GUI by řetězce měly být v pořadí, v jakém se používají. --> <string id="WifiLteNotAvailable">Není k dispozici žádné Wi-Fi nebo LTE</string>
<string id="WifiLtePrompt">Provést přes Wi-Fi/LTE?</string>
<string id="WifiLteExecutionTitle">Odeslání domácímu asistentovi.</string>
<string id="WifiLteExecutionDataError">Žádná data.</string>
<!-- Pro GUI nastavení by měly být řetězce v pořadí, které jsou použity. -->
<string id="SettingsSelect">Vybrat...</string> <string id="SettingsSelect">Vybrat...</string>
<string id="SettingsApiKey">Klíč API pro HomeAssistant.</string> <string id="SettingsApiKey">Klíč API pro domácí.</string>
<string id="SettingsApiKeyPrompt">Přístupový token s dlouhou životností.</string> <string id="SettingsApiKeyPrompt">Dlouhodobý přístupový token.</string>
<string id="SettingsApiUrl">URL pro HomeAssistant API.</string> <string id="SettingsApiUrl">URL pro domácí API.</string>
<string id="SettingsConfigUrl">Adresa URL pro konfiguraci nabídky (JSON).</string> <string id="SettingsConfigUrl">URL pro konfiguraci nabídky (JSON).</string>
<string id="SettingsCacheConfig">Má aplikace uložit konfiguraci nabídky do mezipaměti?</string> <string id="SettingsCacheConfig">Měla by aplikace ukládat konfiguraci nabídky?</string>
<string id="SettingsClearCache">Měla by aplikace při příštím spuštění vymazat stávající mezipaměť?</string> <string id="SettingsClearCache">Měla by aplikace vymazat stávající mezipaměť příště, až bude spuštěna?</string>
<string id="SettingsWifiLteExecutionEnable">Povolit provádění příkazů přes Wi-Fi/LTE.</string>
<string id="SettingsVibration">Měla by aplikace poskytovat zpětnou vazbu prostřednictvím vibrací?</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="SettingsAppTimeout">Timeout během několika sekund. Po tomto období nečinnosti uložte aplikaci k uložení baterie 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="SettingsPollDelay">Další zpoždění hlasování (v sekundách). Přidá zpoždění 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="SettingsConfirmTimeout">Po této době (v sekundách) je potvrzovací dialog pro akci automaticky uzavřen a akce je zrušena. Nastavit na 0 pro deaktivaci časového limitu.</string>
<string id="SettingsPin">4místný PIN pro všechny akce, které vyžadují potvrzení (0000-9999).</string> <string id="SettingsPin">4místný pin, který se má použít pro všechny akce, které to vyžadují (0000-9999).</string>
<string id="SettingsPinError">Nakonfigurujte v nastavení aplikace platný čtyřmístný číselný kód PIN mezi 0000 a 9999.</string> <string id="SettingsPinError">Nakonfigurujte prosím platný čtyřmístný číselný pin mezi 0000 a 9999 v nastavení aplikace.</string>
<string id="SettingsTextAlign">Zarovnání nabídky vlevo (vypnuto) nebo vpravo (zapnuto).</string> <string id="SettingsTextAlign">Vlevo (vypnuto) nebo vpravo (ON) zarovnání nabídky.</string>
<string id="LeftToRight">Zleva doprava</string> <string id="SettingsLeftToRight">Zleva doprava</string>
<string id="RightToLeft">Zprava doleva</string> <string id="SettingsRightToLeft">Vpravo doleva</string>
<string id="SettingsWidgetStart">(Pouze widget) Automaticky spusťte aplikaci z widgetu bez čekání na klepnutí.</string> <string id="SettingsWidgetStart">(Pouze widget) automaticky spusťte aplikaci z widgetu bez čekání na klepnutí.</string>
<string id="SettingsEnableBatteryLevel">Povolte službu na pozadí pro odesílání údajů o stavu baterie, poloze a (pokud je podporováno) o aktivitě zařízení Home Assistant.</string> <string id="SettingsEnableBatteryLevel">Umožněte službě pozadí odeslat úroveň baterie, umístění baterie zařízení a (pokud je podporována) údaje o aktivitě domácímu asistentovi.</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="SettingsBatteryLevelRefreshRate">Obnovení frekvence (v minutách), při kterém by měla služba na pozadí 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> <string id="SettingsUserHttpHeader">Uživatel dodaný záhlaví HTTP</string>
<string id="SettingsUserHttpHeaderDescription">Některá instalace domácího asistenta vyžadují specifikaci vlastní záhlaví HTTP, aby fungovaly.</string>
<string id="SettingsUserHttpHeaderName">Uživatel dodaný HTTP-HEADER: Jméno</string>
<string id="SettingsUserHttpHeaderValue">Uživatel dodaný HTTP-HEADER: Hodnota</string>
<string id="SettingsClearWebhookId">Znovu se připojte k domácímu asistentovi (Clear Webhook ID, viz příručka pro odstraňování problémů).</string>
<string id="SettingsWebhookId">(Pouze číst) ID Webhook vytvořené zařízením pro aktualizace služby na pozadí. Možná to budete potřebovat pro ladění.</string>
</strings> </strings>

View File

@@ -9,7 +9,7 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
@@ -19,54 +19,66 @@
--> -->
<strings> <strings>
<string id="ApiFlood">API-kald for hurtigt. Sænk venligst dine anmodninger.</string> <string id="ApiFlood">API ringer for hurtig. Sænk venligst dine anmodninger.</string>
<string id="ApiUrlNotFound">URL ikke fundet. Potentiel API URL-fejl i indstillinger.</string> <string id="ApiUrlNotFound">URL ikke fundet. Potentiel API -URL -fejl i indstillinger.</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">Tilgængelig</string> <string id="Available" scope="glance">Tilgængelig</string>
<string id="Cached" scope="glance">Cachelagret</string> <string id="Cached" scope="glance">Cache</string>
<string id="Checking" scope="glance">Tjekker...</string> <string id="Checking" scope="glance">Kontrol ...</string>
<string id="ConfigUrlNotFound">URL ikke fundet. Potentiel konfigurations-URL-fejl i indstillinger.</string> <string id="ConfigUrlNotFound">URL ikke fundet. Potentiel konfigurations -URL -fejl i indstillinger.</string>
<string id="Confirm">Sikker?</string> <string id="Confirm">Sikker?</string>
<string id="Empty">Tom</string> <string id="Empty">Tom</string>
<string id="Executed" scope="glance">Bekræftet</string> <string id="Executed" scope="glance">Bekræftet</string>
<string id="GlanceMenu" scope="glance">Menu</string> <string id="GlanceMenu" scope="glance">Menu</string>
<string id="Memory" scope="glance">Hukommelse</string> <string id="Memory" scope="glance">Hukommelse</string>
<string id="NoAPIKey" scope="glance">Ingen API-nøgle i applikationsindstillingerne.</string> <string id="NoAPIKey" scope="glance">Ingen API -nøgle i applikationsindstillingerne.</string>
<string id="NoApiUrl" scope="glance">Ingen API-URL i applikationsindstillingerne.</string> <string id="NoApiUrl" scope="glance">Ingen API -URL i applikationsindstillingerne.</string>
<string id="NoConfigUrl" scope="glance">Ingen konfigurations-URL i applikationsindstillingerne.</string> <string id="NoConfigUrl" scope="glance">Ingen konfigurations -URL i applikationsindstillingerne.</string>
<string id="NoInternet">Ingen internetforbindelse.</string> <string id="NoInternet">Ingen internetforbindelse.</string>
<string id="NoJson">Ingen JSON returneret fra HTTP-anmodning.</string> <string id="NoJson">Ingen JSON vendte tilbage fra HTTP -anmodning.</string>
<string id="NoPhone" scope="glance">Ingen telefonforbindelse.</string> <string id="NoPhone" scope="glance">Ingen telefonforbindelse.</string>
<string id="NoPhoneNoCache" scope="glance">Ingen telefonforbindelse, ingen cache -menu.</string>
<string id="NoResponse">Intet svar, tjek internetforbindelse</string> <string id="NoResponse">Intet svar, tjek internetforbindelse</string>
<string id="PinInputLocked">PIN-indtastning låst for</string> <string id="TimedOut">Anmod om tidsbestemt ud</string>
<string id="PinInputLocked">Pin -indgang låst til</string>
<string id="PotentialError">Potentiel fejl</string> <string id="PotentialError">Potentiel fejl</string>
<string id="Seconds">sekunder</string> <string id="Seconds">sekunder</string>
<string id="TemplateError">Skabelonfejl</string> <string id="TemplateError">Skabelonfejl</string>
<string id="TrailingSlashErr">API-URL må ikke have en efterfølgende skråstreg '/'.</string> <string id="TrailingSlashErr">API -URL må ikke have en bageste skråstreg '/'.</string>
<string id="Unavailable" scope="glance">Ikke tilgængelig</string> <string id="Unavailable" scope="glance">Utilgængelig</string>
<string id="Unconfigured" scope="glance">Ukonfigureret</string> <string id="Unconfigured" scope="glance">Ukonfigureret</string>
<string id="UnhandledHttpErr">HTTP-anmodning returnerede fejlkode =</string> <string id="UnhandledHttpErr">HTTP -anmodning returneret fejlkode =</string>
<string id="WebhookFailed">Kunne ikke registrere Webhook</string> <string id="WebhookFailed">Kunne ikke registrere webhook</string>
<string id="WrongPin">Forkert pinkode</string> <string id="WrongPin">Forkert pin</string>
<string id="WifiLteNotAvailable">Ingen Wi-Fi eller LTE tilgængelig</string>
<string id="WifiLtePrompt">Udfør over Wi-Fi/LTE?</string>
<string id="WifiLteExecutionTitle">Sender til hjemmeassistent.</string>
<string id="WifiLteExecutionDataError">Ingen data modtaget.</string>
<!-- For indstillingerne GUI skal strenge være i den rækkefølge, de bruges. --> <!-- For indstillingerne GUI skal strenge være i den rækkefølge, de bruges. -->
<string id="SettingsSelect">Vælge...</string> <string id="SettingsSelect">Vælge...</string>
<string id="SettingsApiKey">API-nøgle til HomeAssistant.</string> <string id="SettingsApiKey">API -nøgle til homeassistant.</string>
<string id="SettingsApiKeyPrompt">Adgangstoken med lang levetid.</string> <string id="SettingsApiKeyPrompt">Langvarig adgangstoken.</string>
<string id="SettingsApiUrl">URL til HomeAssistant API.</string> <string id="SettingsApiUrl">URL til homeassistant API.</string>
<string id="SettingsConfigUrl">URL til menukonfiguration (JSON).</string> <string id="SettingsConfigUrl">URL til menukonfiguration (JSON).</string>
<string id="SettingsCacheConfig">Skal applikationen cache menukonfigurationen?</string> <string id="SettingsCacheConfig">Skal applikationscache menuen Konfiguration?</string>
<string id="SettingsClearCache">Skal applikationen rydde den eksisterende cache næste gang den startes?</string> <string id="SettingsClearCache">Bør applikationen rydde den eksisterende cache næste gang den startes?</string>
<string id="SettingsVibration">Skal applikationen give feedback via vibrationer?</string> <string id="SettingsWifiLteExecutionEnable">Aktivér udførelse af kommandoer over Wi-Fi/LTE.</string>
<string id="SettingsAppTimeout">Timeout i sekunder. Afslut applikationen efter denne periode med inaktivitet for at spare på enhedens batteri.</string> <string id="SettingsVibration">Bør applikationen give feedback via vibrationer?</string>
<string id="SettingsPollDelay">Yderligere afstemningsforsinkelse (i sekunder). Tilføjer en forsinkelse mellem statusopdatering af alle menupunkter.</string> <string id="SettingsAppTimeout">Timeout på få sekunder. Afslut applikationen efter denne periode med inaktivitet for at gemme enhedsbatteriet.</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="SettingsPollDelay">Yderligere afstemningsforsinkelse (på få sekunder). Tilføjer en forsinkelse mellem statusopdateringen af alle menupunkter.</string>
<string id="SettingsPin">4-cifret PIN-kode, der skal bruges til alle handlinger, der kræver bekræftelse (0000-9999).</string> <string id="SettingsConfirmTimeout">Efter denne tid (på få sekunder) lukkes en bekræftelsesdialog for en handling automatisk, og handlingen annulleres. Indstil til 0 for at deaktivere timeout.</string>
<string id="SettingsPinError">Konfigurer venligst en gyldig 4-cifret numerisk PIN-kode mellem 0000 og 9999 i applikationsindstillingerne.</string> <string id="SettingsPin">4-cifret pin, der skal bruges til alle handlinger, der kræver det (0000-9999).</string>
<string id="SettingsTextAlign">Venstre (fra) eller Højre (til) menujustering.</string> <string id="SettingsPinError">Konfigurer venligst en gyldig 4-cifret numerisk pin mellem 0000 og 9999 i applikationsindstillingerne.</string>
<string id="LeftToRight">Venstre mod højre</string> <string id="SettingsTextAlign">Venstre (slukket) eller højre (på) menuindretning.</string>
<string id="RightToLeft">Højre til venstre</string> <string id="SettingsLeftToRight">Venstre til højre</string>
<string id="SettingsRightToLeft">Ret til venstre</string>
<string id="SettingsWidgetStart">(Kun widget) Start automatisk applikationen fra widgetten uden at vente på et tryk.</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="SettingsEnableBatteryLevel">Aktivér baggrundstjenesten til at sende enhedsbatteriniveauet, placering og (hvis understøttes) aktivitetsdata til hjemmeassistent.</string>
<string id="SettingsBatteryLevelRefreshRate">Opdateringshastigheden (i minutter), hvormed baggrundstjenesten skal gentage afsendelse af data.</string> <string id="SettingsBatteryLevelRefreshRate">Opdateringshastigheden (på få minutter), hvor baggrundstjenesten skal gentage afsendelsesdata.</string>
<string id="WebhookId">(Skrivebeskyttet) Webhook-id'et oprettet af enheden til baggrundstjenesteopdateringer. Du kan kræve dette til fejlretning.</string> <string id="SettingsUserHttpHeader">Bruger leveret HTTP -header</string>
<string id="SettingsUserHttpHeaderDescription">Nogle hjemmeassistentinstallationer kræver specifikation af en brugerdefineret HTTP -header for at fungere.</string>
<string id="SettingsUserHttpHeaderName">Bruger leveret http-header: navn</string>
<string id="SettingsUserHttpHeaderValue">Bruger leveret http-header: værdi</string>
<string id="SettingsClearWebhookId">Tilslut igen til hjemmeassistent (Clear WebHook ID, se Guide til fejlfinding).</string>
<string id="SettingsWebhookId">(Læs kun) Webhook -ID oprettet af enheden til opdateringer af baggrundstjeneste. Du kræver muligvis dette til fejlsøgning.</string>
</strings> </strings>

View File

@@ -16,35 +16,65 @@
<!-- <!--
Corrections for the German language Corrections for the German language
Korrekturen für die deutsche Sprache Korrekturen für die deutsche Sprache
Contributors:
Someone0nEarth
tarekbecker
moesterheld
tispokes
--> -->
<strings> <strings>
<string id="UnhandledHttpErr">Die HTTP-Anfrage gab folgenden Fehlercode zurück = </string> <string id="ApiFlood">Zu viele API-Aufrufe in kurzer Zeit. Bitte verlangsame deine Anfragen.</string>
<string id="ApiUrlNotFound">URL nicht gefunden. Möglicher Fehler in der API-URL in den Einstellungen.</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="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="Cached" scope="glance">gecacht</string>
<string id="Checking" scope="glance">Prüfe...</string>
<string id="ConfigUrlNotFound">URL nicht gefunden. Möglicherweise falsche Konfigurations-URL in den Einstellungen.</string>
<string id="GlanceMenu" scope="glance">Menü</string> <string id="GlanceMenu" scope="glance">Menü</string>
<string id="Memory" scope="glance">Speicher</string> <string id="Memory" scope="glance">Speicher</string>
<string id="NoAPIKey" scope="glance">Kein API-Schlüssel in den App-Einstellungen hinterlegt.</string>
<string id="NoApiUrl" scope="glance">Keine API-URL in den App-Einstellungen hinterlegt.</string>
<string id="NoConfigUrl" scope="glance">Keine Menükonfigurations-URL (JSON) in den App-Einstellungen hinterlegt.</string>
<string id="NoJson">Keine JSON-Datei aus der HTTP-Anfrage zurückbekommen.</string>
<string id="NoPhoneNoCache" scope="glance">Keine Telefonverbindung und kein gecachtes Menü.</string>
<string id="NoResponse">Keine Antwort, bitte Internetverbindung prüfen.</string>
<string id="TimedOut">Anfragezeit überschritten.</string>
<string id="PinInputLocked">PIN-Eingabe gesperrt für</string>
<string id="PotentialError">Möglicher Fehler</string>
<string id="TemplateError">Template konnte nicht gerendert werden</string>
<string id="TrailingSlashErr">API-URL darf nicht mit einem Schrägstrich '/' enden.</string>
<string id="UnhandledHttpErr">Die HTTP-Anfrage gab folgenden Fehlercode zurück = </string>
<string id="WebhookFailed">Webhook-Registrierung fehlgeschlagen.</string>
<string id="WrongPin">Falsche PIN.</string>
<string id="WifiLteNotAvailable">Kein WLAN oder LTE verfügbar.</string>
<string id="WifiLtePrompt">Über WLAN/LTE ausführen?</string>
<string id="WifiLteExecutionTitle">Sende an Home Assistant.</string>
<string id="WifiLteExecutionDataError">Keine Daten empfangen.</string>
<!-- Für die Einstellungs-GUI --> <!-- Für die Einstellungs-GUI: Reihenfolge entspricht der Nutzung -->
<string id="SettingsSelect">Auswählen...</string>
<string id="SettingsApiKey">API-Schlüssel für HomeAssistant.</string>
<string id="SettingsApiKeyPrompt">Langzeit-Zugangstoken.</string>
<string id="SettingsApiUrl">URL der HomeAssistant-API.</string> <string id="SettingsApiUrl">URL der HomeAssistant-API.</string>
<string id="SettingsConfigUrl">URL der Menükonfiguration (JSON).</string> <string id="SettingsConfigUrl">URL für die Menükonfiguration (JSON).</string>
<string id="SettingsCacheConfig">Soll die Anwendung die Menükonfiguration cachen?</string> <string id="SettingsCacheConfig">Soll die App die Menükonfiguration cachen?</string>
<string id="SettingsClearCache">Soll die Anwendung beim nächsten Start den vorhandenen Cache löschen?</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 <string id="SettingsWifiLteExecutionEnable">Befehlsausführung über WLAN/LTE aktivieren.</string>
des Geräts zu schonen.</string> <string id="SettingsVibration">Soll die App Rückmeldung per Vibration geben?</string>
<string id="SettingsConfirmTimeout">Nach dieser Zeit (in Sekunden) wird der Bestätigungsdialog einer Aktion geschlossen und die <string id="SettingsAppTimeout">Timeout in Sekunden. Beendet die App nach dieser Inaktivitätszeit, um Akku zu sparen.</string>
Aktion abgebrochen. Auf 0 setzen, um den Timeout zu deaktivieren.</string> <string id="SettingsPollDelay">Zusätzliche Abfrageverzögerung (in Sekunden). Fügt zwischen den Status-Updates der Menüeinträge eine Pause ein.</string>
<string id="SettingsPin">4-stellige PIN für alle Actions mit 'confirm': true (0000-9999).</string> <string id="SettingsConfirmTimeout">Nach dieser Zeit (in Sekunden) wird ein Bestätigungsdialog automatisch geschlossen und die Aktion abgebrochen. Mit 0 deaktivieren.</string>
<string id="SettingsPin">4-stellige PIN für alle Aktionen, die diese erfordern (0000-9999).</string>
<string id="SettingsPinError">Bitte eine gültige 4-stellige numerische PIN in den App Einstellungen eingeben (0000-9999).</string> <string id="SettingsPinError">Bitte eine gültige 4-stellige numerische PIN in den App Einstellungen eingeben (0000-9999).</string>
<string id="SettingsWidgetStart">(Nur Widget) Anwendung automatisch über das Widget starten ohne drauftippen zu müssen.</string> <string id="SettingsTextAlign">Menüausrichtung: Links (aus) oder Rechts (ein).</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 <string id="SettingsRightToLeft">Von rechts nach links</string>
an HomeAssistant gesendet wird.</string> <string id="SettingsWidgetStart">(Nur Widget) App automatisch aus dem Widget starten, ohne auf Tippen zu warten.</string>
<string id="WebhookId">(Schreibgeschützt) Die von der Uhr erstellte Webhook-ID für Aktualisierungen des Ladezustands der Batterie. <string id="SettingsEnableBatteryLevel">Hintergrunddienst aktivieren, um Akkustand, Standort und (falls unterstützt) Aktivitätsdaten an Home Assistant zu senden.</string>
Möglicherweise wird dies zum Debuggen benötigt.</string> <string id="SettingsBatteryLevelRefreshRate">Intervall (in Minuten), in dem der Hintergrunddienst die Daten erneut senden soll.</string>
<string id="SettingsUserHttpHeader">Zusätzlicher HTTP-Header</string>
<string id="SettingsUserHttpHeaderDescription">Einige Home Assistant-Installationen erfordern die Angabe eines benutzerdefinierten HTTP-Headers, um zu funktionieren.</string>
<string id="SettingsUserHttpHeaderName">Zusätzlicher HTTP-Header: Name</string>
<string id="SettingsUserHttpHeaderValue">Zusätzlicher HTTP-Header: Value</string>
<string id="SettingsWebhookId">(Nur lesen) Die vom Gerät erstellte Webhook-ID für Hintergrund-Updates. Kann zum Debuggen benötigt werden.</string>
</strings> </strings>

View File

@@ -9,18 +9,18 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
<!-- <!--
Generated by Google Translate: English to German Generated by Google Translate: English to German
Generiert von Google Translate aus dem Englischen Generiert von Google übersetzt aus Englisch
--> -->
<strings> <strings>
<string id="ApiFlood">API-Aufrufe zu schnell. Bitte verlangsamen Sie Ihre Anfragen.</string> <string id="ApiFlood">Zu viele API-Aufrufe in kurzer Zeit. Bitte verlangsame deine Anfragen.</string>
<string id="ApiUrlNotFound">URL nicht gefunden. Möglicher API-URL-Fehler in den Einstellungen.</string> <string id="ApiUrlNotFound">URL nicht gefunden. Möglicher Fehler in der API-URL in den Einstellungen.</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">OK</string> <string id="Available" scope="glance">OK</string>
<string id="Cached" scope="glance">gecacht</string> <string id="Cached" scope="glance">gecacht</string>
@@ -31,46 +31,54 @@
<string id="Executed" scope="glance">Bestätigt</string> <string id="Executed" scope="glance">Bestätigt</string>
<string id="GlanceMenu" scope="glance">Menü</string> <string id="GlanceMenu" scope="glance">Menü</string>
<string id="Memory" scope="glance">Speicher</string> <string id="Memory" scope="glance">Speicher</string>
<string id="NoAPIKey" scope="glance">Kein API-Schlüssel in den Anwendungseinstellungen.</string> <string id="NoAPIKey" scope="glance">Kein API-Schlüssel in den App-Einstellungen hinterlegt.</string>
<string id="NoApiUrl" scope="glance">Keine API-URL in den Anwendungseinstellungen.</string> <string id="NoApiUrl" scope="glance">Keine API-URL in den App-Einstellungen hinterlegt.</string>
<string id="NoConfigUrl" scope="glance">Keine Konfigurations-URL in den Anwendungseinstellungen.</string> <string id="NoConfigUrl" scope="glance">Keine Menükonfigurations-URL (JSON) in den App-Einstellungen hinterlegt.</string>
<string id="NoInternet">Keine Internetverbindung.</string> <string id="NoInternet">Keine Internetverbindung.</string>
<string id="NoJson">Von der HTTP-Anforderung wurde kein JSON zurückgegeben.</string> <string id="NoJson">Keine JSON-Datei aus der HTTP-Anfrage zurückbekommen.</string>
<string id="NoPhone" scope="glance">Keine Telefonverbindung.</string> <string id="NoPhone" scope="glance">Keine Telefonverbindung.</string>
<string id="NoResponse">Keine Antwort, überprüfen Sie die Internetverbindung</string> <string id="NoPhoneNoCache" scope="glance">Keine Telefonverbindung und kein gecachtes Menü.</string>
<string id="NoResponse">Keine Antwort, bitte Internetverbindung prüfen.</string>
<string id="TimedOut">Anfragezeit überschritten.</string>
<string id="PinInputLocked">PIN-Eingabe gesperrt für</string> <string id="PinInputLocked">PIN-Eingabe gesperrt für</string>
<string id="PotentialError">Möglicher Fehler</string> <string id="PotentialError">Möglicher Fehler</string>
<string id="Seconds">Sekunden</string> <string id="Seconds">Sekunden</string>
<string id="TemplateError">Template konnte nicht gerendert werden</string> <string id="TemplateError">Template konnte nicht gerendert werden</string>
<string id="TrailingSlashErr">Die API-URL darf keinen Schrägstrich „/“ am Ende haben.</string> <string id="TrailingSlashErr">API-URL darf nicht mit einem Schrägstrich '/' enden.</string>
<string id="Unavailable" scope="glance">Nicht verfügbar</string> <string id="Unavailable" scope="glance">Nicht verfügbar</string>
<string id="Unconfigured" scope="glance">Nicht konfiguriert</string> <string id="Unconfigured" scope="glance">Nicht konfiguriert</string>
<string id="UnhandledHttpErr">Die HTTP-Anfrage gab folgenden Fehlercode zurück = </string> <string id="UnhandledHttpErr">Die HTTP-Anfrage gab folgenden Fehlercode zurück = </string>
<string id="WebhookFailed">Webhook konnte nicht registriert werden</string> <string id="WebhookFailed">Webhook-Registrierung fehlgeschlagen.</string>
<string id="WrongPin">Falsche PIN</string> <string id="WrongPin">Falsche PIN.</string>
<!-- Für die GUI mit den Einstellungen sollten die Zeichenfolgen in der Reihenfolge angegeben werden, in der sie verwendet werden. --> <string id="WifiLteNotAvailable">Kein WLAN oder LTE verfügbar.</string>
<string id="SettingsSelect">Wählen...</string> <string id="WifiLtePrompt">Über WLAN/LTE ausführen?</string>
<string id="WifiLteExecutionTitle">Sende an Home Assistant.</string>
<string id="WifiLteExecutionDataError">Keine Daten empfangen.</string>
<!-- Für die Einstellungs -GUI sollten Zeichenfolgen in der Reihenfolge sein, in der sie verwendet werden. -->
<string id="SettingsSelect">Auswählen...</string>
<string id="SettingsApiKey">API-Schlüssel für HomeAssistant.</string> <string id="SettingsApiKey">API-Schlüssel für HomeAssistant.</string>
<string id="SettingsApiKeyPrompt">Langlebiger Zugriffstoken.</string> <string id="SettingsApiKeyPrompt">Langzeit-Zugangstoken.</string>
<string id="SettingsApiUrl">URL der HomeAssistant-API.</string> <string id="SettingsApiUrl">URL der HomeAssistant-API.</string>
<string id="SettingsConfigUrl">URL der Menükonfiguration (JSON).</string> <string id="SettingsConfigUrl">URL für die Menükonfiguration (JSON).</string>
<string id="SettingsCacheConfig">Soll die Anwendung die Menükonfiguration cachen?</string> <string id="SettingsCacheConfig">Soll die App die Menükonfiguration cachen?</string>
<string id="SettingsClearCache">Soll die Anwendung beim nächsten Start den vorhandenen Cache löschen?</string> <string id="SettingsClearCache">Soll die Anwendung beim nächsten Start den vorhandenen Cache löschen?</string>
<string id="SettingsVibration">Soll die Anwendung eine Rückmeldung über Vibrationen geben?</string> <string id="SettingsWifiLteExecutionEnable">Befehlsausführung über WLAN/LTE aktivieren.</string>
<string id="SettingsAppTimeout">Die App wird nach Ablauf der Zeit (in Sekunden) bei Inaktivität beendet, um den Akku <string id="SettingsVibration">Soll die App Rückmeldung per Vibration geben?</string>
des Geräts zu schonen.</string> <string id="SettingsAppTimeout">Timeout in Sekunden. Beendet die App nach dieser Inaktivitätszeit, um Akku zu sparen.</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="SettingsPollDelay">Zusätzliche Abfrageverzögerung (in Sekunden). Fügt zwischen den Status-Updates der Menüeinträge eine Pause ein.</string>
<string id="SettingsConfirmTimeout">Nach dieser Zeit (in Sekunden) wird der Bestätigungsdialog einer Aktion geschlossen und die <string id="SettingsConfirmTimeout">Nach dieser Zeit (in Sekunden) wird ein Bestätigungsdialog automatisch geschlossen und die Aktion abgebrochen. Mit 0 deaktivieren.</string>
Aktion abgebrochen. Auf 0 setzen, um den Timeout zu deaktivieren.</string> <string id="SettingsPin">4-stellige PIN für alle Aktionen, die diese erfordern (0000-9999).</string>
<string id="SettingsPin">4-stellige PIN für alle Actions mit 'confirm': true (0000-9999).</string>
<string id="SettingsPinError">Bitte eine gültige 4-stellige numerische PIN in den App Einstellungen eingeben (0000-9999).</string> <string id="SettingsPinError">Bitte eine gültige 4-stellige numerische PIN in den App Einstellungen eingeben (0000-9999).</string>
<string id="SettingsTextAlign">Menüausrichtung links (aus) oder rechts (ein).</string> <string id="SettingsTextAlign">Menüausrichtung: Links (aus) oder Rechts (ein).</string>
<string id="LeftToRight">Von links nach rechts</string> <string id="SettingsLeftToRight">Von links nach rechts</string>
<string id="RightToLeft">Von rechts nach links</string> <string id="SettingsRightToLeft">Von rechts nach links</string>
<string id="SettingsWidgetStart">(Nur Widget) Anwendung automatisch über das Widget starten ohne drauftippen zu müssen.</string> <string id="SettingsWidgetStart">(Nur Widget) App automatisch aus dem Widget starten, ohne auf Tippen zu warten.</string>
<string id="SettingsEnableBatteryLevel">Hintergrunddienst aktivieren, um den Ladezustand der Batterie an HomeAssistant zu senden.</string> <string id="SettingsEnableBatteryLevel">Hintergrunddienst aktivieren, um Akkustand, Standort und (falls unterstützt) Aktivitätsdaten an Home Assistant zu senden.</string>
<string id="SettingsBatteryLevelRefreshRate">Die Aktualisierungsrate (in Minuten) mit der der Ladezustand der Batterie <string id="SettingsBatteryLevelRefreshRate">Intervall (in Minuten), in dem der Hintergrunddienst die Daten erneut senden soll.</string>
an HomeAssistant gesendet wird.</string> <string id="SettingsUserHttpHeader">Zusätzlicher HTTP-Header</string>
<string id="WebhookId">(Schreibgeschützt) Die von der Uhr erstellte Webhook-ID für Aktualisierungen des Ladezustands der Batterie. <string id="SettingsUserHttpHeaderDescription">Einige Home Assistant-Installationen erfordern die Angabe eines benutzerdefinierten HTTP-Headers, um zu funktionieren.</string>
Möglicherweise wird dies zum Debuggen benötigt.</string> <string id="SettingsUserHttpHeaderName">Zusätzlicher HTTP-Header: Name</string>
<string id="SettingsUserHttpHeaderValue">Zusätzlicher HTTP-Header: Value</string>
<string id="SettingsClearWebhookId">Verbinden Sie eine Verbindung zum Home Assistant (Clear Webhook ID, siehe Fehlerbehebungshandbuch).</string>
<string id="SettingsWebhookId">(Nur lesen) Die vom Gerät erstellte Webhook-ID für Hintergrund-Updates. Kann zum Debuggen benötigt werden.</string>
</strings> </strings>

View File

@@ -9,64 +9,76 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
<!-- <!--
Generated by Google Translate: English to Dutch Generated by Google Translate: English to Dutch
Gemaakt door Google Translate uit het Engels Gegenereerd door Google Translate uit het Engels
--> -->
<strings> <strings>
<string id="ApiFlood">API-aanroepen te snel. Vertraag uw verzoeken.</string> <string id="ApiFlood">API roept te snel. Vertraag uw verzoeken.</string>
<string id="ApiUrlNotFound">URL niet gevonden. Mogelijke API URL-fout in instellingen.</string> <string id="ApiUrlNotFound">Url niet gevonden. Potentiële API -URL -fout in instellingen.</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">Beschikbaar</string> <string id="Available" scope="glance">Beschikbaar</string>
<string id="Cached" scope="glance">Gecached</string> <string id="Cached" scope="glance">In de war</string>
<string id="Checking" scope="glance">Controleren...</string> <string id="Checking" scope="glance">Controleren ...</string>
<string id="ConfigUrlNotFound">URL niet gevonden. Mogelijke configuratie-URL-fout in instellingen.</string> <string id="ConfigUrlNotFound">Url niet gevonden. Potentiële configuratie -URL -fout in instellingen.</string>
<string id="Confirm">Zeker?</string> <string id="Confirm">Zeker?</string>
<string id="Empty">Leeg</string> <string id="Empty">Leeg</string>
<string id="Executed" scope="glance">Bevestigd</string> <string id="Executed" scope="glance">Bevestigd</string>
<string id="GlanceMenu" scope="glance">Menu</string> <string id="GlanceMenu" scope="glance">Menu</string>
<string id="Memory" scope="glance">Geheugen</string> <string id="Memory" scope="glance">Geheugen</string>
<string id="NoAPIKey" scope="glance">Geen API-sleutel in de applicatie-instellingen.</string> <string id="NoAPIKey" scope="glance">Geen API -toets in de toepassingsinstellingen.</string>
<string id="NoApiUrl" scope="glance">Geen API-URL in de applicatie-instellingen.</string> <string id="NoApiUrl" scope="glance">Geen API -URL in de toepassingsinstellingen.</string>
<string id="NoConfigUrl" scope="glance">Geen configuratie-URL in de applicatie-instellingen.</string> <string id="NoConfigUrl" scope="glance">Geen configuratie -URL in de toepassingsinstellingen.</string>
<string id="NoInternet">Geen internetverbinding.</string> <string id="NoInternet">Geen internetverbinding.</string>
<string id="NoJson">Er is geen JSON geretourneerd vanuit de HTTP-aanvraag.</string> <string id="NoJson">Geen JSON keerde terug van het HTTP -verzoek.</string>
<string id="NoPhone" scope="glance">Geen telefoonverbinding.</string> <string id="NoPhone" scope="glance">Geen telefoonverbinding.</string>
<string id="NoResponse">Geen reactie, controleer internetverbinding</string> <string id="NoPhoneNoCache" scope="glance">Geen telefoonverbinding, geen menu in de cache.</string>
<string id="PinInputLocked">PIN-invoer vergrendeld voor</string> <string id="NoResponse">Geen antwoord, controleer internetverbinding</string>
<string id="PotentialError">Mogelijke fout</string> <string id="TimedOut">Verzoek getimed uit</string>
<string id="PinInputLocked">Pin -ingang vergrendeld voor</string>
<string id="PotentialError">Potentiële fout</string>
<string id="Seconds">seconden</string> <string id="Seconds">seconden</string>
<string id="TemplateError">Sjabloonfout</string> <string id="TemplateError">Sjabloonfout</string>
<string id="TrailingSlashErr">De API-URL mag geen afsluitende slash ('/') bevatten.</string> <string id="TrailingSlashErr">API -URL mag geen achterblijvende schuine streep '/' hebben.</string>
<string id="Unavailable" scope="glance">Niet beschikbaar</string> <string id="Unavailable" scope="glance">Niet beschikbaar</string>
<string id="Unconfigured" scope="glance">Niet geconfigureerd</string> <string id="Unconfigured" scope="glance">Niet geconfigureerd</string>
<string id="UnhandledHttpErr">HTTP-aanvraag retourneerde foutcode =</string> <string id="UnhandledHttpErr">HTTP -verzoek geretourneerde foutcode =</string>
<string id="WebhookFailed">Webhook registreren mislukt</string> <string id="WebhookFailed">Kon WebHook niet registreren</string>
<string id="WrongPin">Verkeerde pincode</string> <string id="WrongPin">Verkeerde pin</string>
<!-- Voor de instellingen van de GUI moeten de strings in de volgorde staan waarin ze worden gebruikt. --> <string id="WifiLteNotAvailable">Geen wifi of LTE beschikbaar</string>
<string id="SettingsSelect">Selecteer...</string> <string id="WifiLtePrompt">Uitvoeren via Wi-Fi/LTE?</string>
<string id="SettingsApiKey">API-sleutel voor HomeAssistant.</string> <string id="WifiLteExecutionTitle">Verzenden naar Home Assistant.</string>
<string id="SettingsApiKeyPrompt">Langlevende toegangstoken.</string> <string id="WifiLteExecutionDataError">Geen gegevens ontvangen.</string>
<string id="SettingsApiUrl">URL voor HomeAssistant API.</string> <!-- Voor de instellingen GUI moeten strings in de volgorde zijn die ze worden gebruikt. -->
<string id="SettingsSelect">Selecteer ...</string>
<string id="SettingsApiKey">API -sleutel voor homeassistent.</string>
<string id="SettingsApiKeyPrompt">Langleven Access Token.</string>
<string id="SettingsApiUrl">URL voor homeassistante API.</string>
<string id="SettingsConfigUrl">URL voor menuconfiguratie (JSON).</string> <string id="SettingsConfigUrl">URL voor menuconfiguratie (JSON).</string>
<string id="SettingsCacheConfig">Moet de applicatie de menuconfiguratie cachen?</string> <string id="SettingsCacheConfig">Moet de toepassingscache de menu -configuratie?</string>
<string id="SettingsClearCache">Moet de applicatie de bestaande cache wissen wanneer deze de volgende keer wordt gestart?</string> <string id="SettingsClearCache">Moet de toepassing de bestaande cache wissen de volgende keer dat deze wordt gestart?</string>
<string id="SettingsWifiLteExecutionEnable">Schakel opdrachten uit via Wi-Fi/LTE.</string>
<string id="SettingsVibration">Moet de applicatie feedback geven via trillingen?</string> <string id="SettingsVibration">Moet de applicatie feedback geven via trillingen?</string>
<string id="SettingsAppTimeout">Time-out in seconden. Sluit de applicatie na deze periode van inactiviteit om de batterij van het apparaat te sparen.</string> <string id="SettingsAppTimeout">Time -out in seconden. Verlaat de toepassing na deze periode van inactiviteit om de apparaatbatterij op te slaan.</string>
<string id="SettingsPollDelay">Extra pollvertraging (in seconden). Voegt een vertraging toe tussen de statusupdate van alle menu-items.</string> <string id="SettingsPollDelay">Aanvullende peilvertraging (in seconden). Voegt een vertraging toe tussen de statusupdate van alle menu -items.</string>
<string id="SettingsConfirmTimeout">Na deze tijd (in seconden) wordt een bevestigingsdialoog voor een actie automatisch gesloten en wordt de actie geannuleerd. Stel in op 0 om de time-out uit te schakelen.</string> <string id="SettingsConfirmTimeout">Na deze tijd (in seconden) wordt een bevestigingsdialoogvenster voor een actie automatisch gesloten en wordt de actie geannuleerd. Ingesteld op 0 om de time -out uit te schakelen.</string>
<string id="SettingsPin">4-cijferige pincode die gebruikt moet worden voor alle handelingen die bevestiging vereisen (0000-9999).</string> <string id="SettingsPin">4-cijferige pin die moet worden gebruikt voor alle acties die dit vereisen (0000-9999).</string>
<string id="SettingsPinError">Configureer een geldige 4-cijferige pincode tussen 0000 en 9999 in de applicatie-instellingen.</string> <string id="SettingsPinError">Configureer een geldige 4-cijferige numerieke pin tussen 0000 en 9999 in de toepassingsinstellingen.</string>
<string id="SettingsTextAlign">Menu-uitlijning links (uit) of rechts (aan).</string> <string id="SettingsTextAlign">Links (uit) of rechts (AAN) menu -uitlijning.</string>
<string id="LeftToRight">Van links naar rechts</string> <string id="SettingsLeftToRight">Van links naar rechts</string>
<string id="RightToLeft">Van rechts naar links</string> <string id="SettingsRightToLeft">Van rechts naar links</string>
<string id="SettingsWidgetStart">(Alleen widget) Start de applicatie automatisch vanuit de widget zonder te wachten op een tik.</string> <string id="SettingsWidgetStart">(Alleen widget) Start de toepassing 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="SettingsEnableBatteryLevel">Schakel de achtergrondservice in om het batterijdniveau van het apparaat, de locatie en (indien ondersteunde) activiteitsgegevens naar Home Assistant te verzenden.</string>
<string id="SettingsBatteryLevelRefreshRate">De vernieuwingsfrequentie (in minuten) waarmee de achtergrondservice het verzenden van gegevens moet herhalen.</string> <string id="SettingsBatteryLevelRefreshRate">De verversingssnelheid (in minuten) waarbij de achtergrondservice het verzenden van gegevens moet herhalen.</string>
<string id="WebhookId">(Alleen-lezen) De webhook-ID die door het apparaat is gemaakt voor achtergrondservice-updates. U hebt deze mogelijk nodig voor foutopsporing.</string> <string id="SettingsUserHttpHeader">Gebruiker heeft de HTTP -header geleverd</string>
<string id="SettingsUserHttpHeaderDescription">Sommige installaties voor thuisassistent vereisen de specificatie van een aangepaste HTTP -header om te functioneren.</string>
<string id="SettingsUserHttpHeaderName">Gebruiker geleverd http-header: naam</string>
<string id="SettingsUserHttpHeaderValue">Gebruiker geleverd http-header: waarde</string>
<string id="SettingsClearWebhookId">Verbinding maken met Home Assistant (Clear WebHook ID, zie Problemen oplossende gids).</string>
<string id="SettingsWebhookId">(Alleen lezen) De webhook -ID die door het apparaat is gemaakt voor updates van de achtergrondservice. Misschien heeft u dit nodig voor foutopsporing.</string>
</strings> </strings>

View File

@@ -9,64 +9,76 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
<!-- <!--
Generated by Google Translate: English to Estonian Generated by Google Translate: English to Estonian
Loodud Google'i tõlke abil inglise keelest Google'i loodud tõlke inglise keelest
--> -->
<strings> <strings>
<string id="ApiFlood">API-kutsed liiga kiired. Palun aeglustage taotluste esitamist.</string> <string id="ApiFlood">API nimetab liiga kiireks. Palun aeglustage oma taotlusi.</string>
<string id="ApiUrlNotFound">URL-i ei leitud. Võimalik API URL-i viga seadetes.</string> <string id="ApiUrlNotFound">Url ei leitud. Võimalik API URL viga sätetes.</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">Saadaval</string> <string id="Available" scope="glance">Saadav</string>
<string id="Cached" scope="glance">Vahemällu salvestatud</string> <string id="Cached" scope="glance">Vahemällu salvestatud</string>
<string id="Checking" scope="glance">Kontrollimine...</string> <string id="Checking" scope="glance">Kontroll ...</string>
<string id="ConfigUrlNotFound">URL-i ei leitud. Võimalik konfiguratsiooni URL-i viga seadetes.</string> <string id="ConfigUrlNotFound">Url ei leitud. Võimalik konfiguratsiooni URL viga sätetes.</string>
<string id="Confirm">Muidugi?</string> <string id="Confirm">Kindel?</string>
<string id="Empty">Tühi</string> <string id="Empty">Tühjendama</string>
<string id="Executed" scope="glance">Kinnitatud</string> <string id="Executed" scope="glance">Kinnitatud</string>
<string id="GlanceMenu" scope="glance">Menüü</string> <string id="GlanceMenu" scope="glance">Menüü</string>
<string id="Memory" scope="glance">Mälu</string> <string id="Memory" scope="glance">Mälu</string>
<string id="NoAPIKey" scope="glance">Rakenduse seadetes pole API-võtit.</string> <string id="NoAPIKey" scope="glance">Rakenduse seadetes pole API -klahvi.</string>
<string id="NoApiUrl" scope="glance">Rakenduse seadetes pole API URL-i.</string> <string id="NoApiUrl" scope="glance">Rakenduse seadetes pole API URL -i.</string>
<string id="NoConfigUrl" scope="glance">Rakenduse seadetes pole konfiguratsiooni URL-i.</string> <string id="NoConfigUrl" scope="glance">Rakenduse sätetes pole konfiguratsiooni URL -i.</string>
<string id="NoInternet">Interneti-ühendus puudub.</string> <string id="NoInternet">Interneti -ühendust pole.</string>
<string id="NoJson">HTTP-päringust ei tagastatud ühtegi JSON-i.</string> <string id="NoJson">Ükski JSON ei tulnud http päringult tagasi.</string>
<string id="NoPhone" scope="glance">Telefoniühendus puudub.</string> <string id="NoPhone" scope="glance">Telefoniühendust pole.</string>
<string id="NoResponse">Ei reageeri, kontrollige Interneti-ühendust</string> <string id="NoPhoneNoCache" scope="glance">Pole telefoniühendust ega vahemällu salvestatud menüüd.</string>
<string id="PinInputLocked">PIN-i sisestus on lukustatud</string> <string id="NoResponse">Vastust pole, kontrollige Interneti -ühendust</string>
<string id="PotentialError">Võimalik viga</string> <string id="TimedOut">Taotlus on ajastatud</string>
<string id="Seconds">sekundit</string> <string id="PinInputLocked">PIN -i sisend lukustatud</string>
<string id="PotentialError">Potentsiaalne viga</string>
<string id="Seconds">sekundid</string>
<string id="TemplateError">Malli viga</string> <string id="TemplateError">Malli viga</string>
<string id="TrailingSlashErr">API URL-i lõpus ei tohi olla kaldkriipsu „/”.</string> <string id="TrailingSlashErr">API URL -l ei tohi olla kaldkriipsuga '/'.</string>
<string id="Unavailable" scope="glance">Pole saadaval</string> <string id="Unavailable" scope="glance">Kättesaamatu</string>
<string id="Unconfigured" scope="glance">Konfigureerimata</string> <string id="Unconfigured" scope="glance">Konfigureerimata</string>
<string id="UnhandledHttpErr">HTTP päring tagastas veakoodi =</string> <string id="UnhandledHttpErr">Http päringu tagastatud veakood =</string>
<string id="WebhookFailed">Webhaoki registreerimine ebaõnnestus</string> <string id="WebhookFailed">WebHooki registreerimine ei õnnestunud</string>
<string id="WrongPin">Vale PIN-kood</string> <string id="WrongPin">Vale tihvt</string>
<!-- Seadete GUI jaoks peavad stringid olema nende kasutamise järjekorras. --> <string id="WifiLteNotAvailable">Wi-Fi ega LTE pole saadaval</string>
<string id="SettingsSelect">Vali...</string> <string id="WifiLtePrompt">Täita üle wi-fi/lte?</string>
<string id="SettingsApiKey">API-võti HomeAssistantile.</string> <string id="WifiLteExecutionTitle">Koduassistendile saatmine.</string>
<string id="SettingsApiKeyPrompt">Pikaealine juurdepääsuluba.</string> <string id="WifiLteExecutionDataError">Andmeid pole laekunud.</string>
<string id="SettingsApiUrl">HomeAssistant API URL.</string> <!-- Seadete GUI jaoks peaksid keelpillid olema kasutatud järjekorras. -->
<string id="SettingsConfigUrl">URL menüü konfigureerimiseks (JSON).</string> <string id="SettingsSelect">Valige ...</string>
<string id="SettingsCacheConfig">Kas rakendus peaks menüü konfiguratsiooni vahemällu salvestama?</string> <string id="SettingsApiKey">Homeassistant API võti.</string>
<string id="SettingsClearCache">Kas rakendus peaks järgmisel käivitamisel olemasoleva vahemälu tühjendama?</string> <string id="SettingsApiKeyPrompt">Pikaajaline juurdepääsuluba.</string>
<string id="SettingsVibration">Kas rakendus peaks andma tagasisidet vibratsiooni kaudu?</string> <string id="SettingsApiUrl">URL homeassistantse API jaoks.</string>
<string id="SettingsAppTimeout">Aegumine sekundites. Seadme aku säästmiseks sulgege rakendus pärast seda tegevusetusperioodi.</string> <string id="SettingsConfigUrl">URL menüü konfiguratsiooni jaoks (JSON).</string>
<string id="SettingsPollDelay">Küsitluse täiendav viivitus (sekundites). Lisab viivituse kõigi menüüelementide olekuvärskenduse vahele.</string> <string id="SettingsCacheConfig">Kas rakenduse vahemälu peaks menüü konfiguratsiooni vahemälu vahemälu vahemälu vahemälu vahemälu vahemälu vahemälu vahemälu</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="SettingsClearCache">Kas rakendus peaks olemasoleva vahemälu järgmine kord alustama?</string>
<string id="SettingsPin">4-kohaline PIN-kood, mida kasutatakse kõigi kinnitust vajavate toimingute jaoks (0000-9999).</string> <string id="SettingsWifiLteExecutionEnable">Luba käskude täitmine Wi-Fi/LTE kaudu.</string>
<string id="SettingsPinError">Seadistage rakenduse seadetes kehtiv 4-kohaline PIN-kood vahemikus 0000 kuni 9999.</string> <string id="SettingsVibration">Kas rakendus peaks vibratsiooni kaudu tagasisidet andma?</string>
<string id="SettingsTextAlign">Vasak (väljas) või parem (sees) menüü joondamine.</string> <string id="SettingsAppTimeout">Aegumine sekunditega. Pärast seda tegevusetuse perioodi seade aku salvestamiseks väljuge rakendusest.</string>
<string id="LeftToRight">Vasakult paremale</string> <string id="SettingsPollDelay">Täiendav küsitluse viivitus (sekundites). Lisab viivituse kõigi menüüelementide olekuvärskenduse vahel.</string>
<string id="RightToLeft">Paremalt vasakule</string> <string id="SettingsConfirmTimeout">Pärast seda aega (sekundites) suletakse toimingu kinnitusdialoog automaatselt ja toiming tühistatakse. Määrake aegumistähtaeg 0 -le.</string>
<string id="SettingsWidgetStart">(Ainult vidin) Käivitage rakendus automaatselt vidinast ilma puudutust ootamata.</string> <string id="SettingsPin">4-kohaline tihvt, mida kasutatakse kõigi seda vajavate toimingute jaoks (0000-9999).</string>
<string id="SettingsEnableBatteryLevel">Lubage taustateenus, et saata Home Assistantile seadme aku tase, asukoht ja (kui see on toetatud) tegevusandmed.</string> <string id="SettingsPinError">Konfigureerige rakenduse seadetes kehtiv 4-kohaline numbriline nööpnõel vahemikus 0000 kuni 9999.</string>
<string id="SettingsBatteryLevelRefreshRate">Värskendussagedus (minutites), millega taustateenus peaks andmete saatmist kordama.</string> <string id="SettingsTextAlign">Vasak (välja lülitatud) või parem (ON) menüü joondamine.</string>
<string id="WebhookId">(Ainult lugemiseks) Seadme loodud veebihaagi ID taustateenuste värskenduste jaoks. Võib-olla vajate seda silumiseks.</string> <string id="SettingsLeftToRight">Vasakult paremale</string>
<string id="SettingsRightToLeft">Paremale vasakule</string>
<string id="SettingsWidgetStart">(Ainult vidin) käivitage rakendus vidinast automaatselt ilma kraani ootamata.</string>
<string id="SettingsEnableBatteryLevel">Luba taustteenus seadme aku taseme, asukoha ja (kui see on toetatud) tegevusandmete saatmine koduassistendile.</string>
<string id="SettingsBatteryLevelRefreshRate">Värskendusmäär (minutites), kus taustteenus peaks andmete saatmist korrata.</string>
<string id="SettingsUserHttpHeader">Kasutaja tarnitud HTTP päis</string>
<string id="SettingsUserHttpHeaderDescription">Mõned koduassistendi paigaldused vajavad funktsioneerimiseks kohandatud HTTP päise täpsustamist.</string>
<string id="SettingsUserHttpHeaderName">Kasutaja tarnitud HTTP-pea: nimi</string>
<string id="SettingsUserHttpHeaderValue">Kasutaja tarnitud HTTP-pea: väärtus</string>
<string id="SettingsClearWebhookId">Ühendage uuesti koduassistendiga (selge Webhooki ID, vt tõrkeotsingu juhend).</string>
<string id="SettingsWebhookId">(Loe ainult) WebHooki ID, mille seade on loonud taustteenuse värskenduste jaoks. Võite seda silumiseks nõuda.</string>
</strings> </strings>

View File

@@ -9,64 +9,76 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
<!-- <!--
Generated by Google Translate: English to Finnish Generated by Google Translate: English to Finnish
Luonut Google Translate englannista Google -käännös englannista
--> -->
<strings> <strings>
<string id="ApiFlood">API-kutsut liian nopeita. Hidasta pyyntöjäsi.</string> <string id="ApiFlood">API kutsuu liian nopeasti. Hidasta pyyntöjäsi.</string>
<string id="ApiUrlNotFound">URL-osoitetta ei löydy. Mahdollinen API URL -virhe asetuksissa.</string> <string id="ApiUrlNotFound">URL -osoitetta ei löydy. Mahdollinen API -URL -URL -virhe asetuksissa.</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">Saatavilla</string> <string id="Available" scope="glance">Käytettävissä oleva</string>
<string id="Cached" scope="glance">Välimuistissa</string> <string id="Cached" scope="glance">Välimuisti</string>
<string id="Checking" scope="glance">Tarkistetaan...</string> <string id="Checking" scope="glance">Tarkista ...</string>
<string id="ConfigUrlNotFound">URL-osoitetta ei löydy. Mahdollinen konfigurointi-URL-virhe asetuksissa.</string> <string id="ConfigUrlNotFound">URL -osoitetta ei löydy. Mahdollinen määritys URL -URL -virhe asetuksissa.</string>
<string id="Confirm">Varma?</string> <string id="Confirm">Varma?</string>
<string id="Empty">Tyhjä</string> <string id="Empty">Tyhjä</string>
<string id="Executed" scope="glance">Vahvistettu</string> <string id="Executed" scope="glance">Vahvistettu</string>
<string id="GlanceMenu" scope="glance">Valikko</string> <string id="GlanceMenu" scope="glance">Valikko</string>
<string id="Memory" scope="glance">Muisti</string> <string id="Memory" scope="glance">Muisti</string>
<string id="NoAPIKey" scope="glance">Sovelluksen asetuksissa ei ole API-avainta.</string> <string id="NoAPIKey" scope="glance">Ei sovellusliittymää avainta sovellusasetuksissa.</string>
<string id="NoApiUrl" scope="glance">Sovellusasetuksissa ei ole API URL-osoitetta.</string> <string id="NoApiUrl" scope="glance">Ei sovellus -URL -osoitetta sovellusasetuksissa.</string>
<string id="NoConfigUrl" scope="glance">Sovelluksen asetuksissa ei ole konfigurointi-URL-osoitetta.</string> <string id="NoConfigUrl" scope="glance">Ei määritys -URL -osoitetta sovellusasetuksissa.</string>
<string id="NoInternet">Ei Internet-yhteyttä.</string> <string id="NoInternet">Ei Internet -yhteyttä.</string>
<string id="NoJson">HTTP-pyynnöstä ei palautettu JSON-tiedostoja.</string> <string id="NoJson">Yksikään JSON ei palautettu HTTP -pyynnöstä.</string>
<string id="NoPhone" scope="glance">Ei puhelinyhteyttä.</string> <string id="NoPhone" scope="glance">Ei puhelinyhteyttä.</string>
<string id="NoResponse">Ei vastausta, tarkista Internet-yhteys</string> <string id="NoPhoneNoCache" scope="glance">Ei puhelinyhteyttä, ei välimuistivalikkoa.</string>
<string id="PinInputLocked">PIN-koodin syöttö lukittu</string> <string id="NoResponse">Ei vastausta, tarkista Internet -yhteys</string>
<string id="TimedOut">Pyyntö ajoitettu</string>
<string id="PinInputLocked">PIN -syöttö lukittuna</string>
<string id="PotentialError">Mahdollinen virhe</string> <string id="PotentialError">Mahdollinen virhe</string>
<string id="Seconds">sekuntia</string> <string id="Seconds">sekunti</string>
<string id="TemplateError">Mallivirhe</string> <string id="TemplateError">Mallivirhe</string>
<string id="TrailingSlashErr">API-URL-osoitteessa ei saa olla perässä olevaa kauttaviivaa '/'.</string> <string id="TrailingSlashErr">API -URL -osoite ei saa olla jäljellä oleva viiva '/'.</string>
<string id="Unavailable" scope="glance">Ei saatavilla</string> <string id="Unavailable" scope="glance">Ei käytettävissä</string>
<string id="Unconfigured" scope="glance">Määrittämätön</string> <string id="Unconfigured" scope="glance">Määrittelemätön</string>
<string id="UnhandledHttpErr">HTTP-pyyntö palautti virhekoodin =</string> <string id="UnhandledHttpErr">HTTP -pyyntö palautti virhekoodin =</string>
<string id="WebhookFailed">Webhookin rekisteröinti epäonnistui</string> <string id="WebhookFailed">Webhookin rekisteröinti epäonnistui</string>
<string id="WrongPin">Väärä PIN</string> <string id="WrongPin">Vika</string>
<!-- Asetuskäyttöliittymässä merkkijonojen tulee olla käyttöjärjestyksessä. --> <string id="WifiLteNotAvailable">Ei Wi-Fi: tä tai LTE: tä käytettävissä</string>
<string id="SettingsSelect">Valitse...</string> <string id="WifiLtePrompt">Suorita Wi-Fi/LTE: n kautta?</string>
<string id="SettingsApiKey">API-avain HomeAssistantille.</string> <string id="WifiLteExecutionTitle">Lähetetään koti -avustajalle.</string>
<string id="SettingsApiKeyPrompt">Pitkäikäinen pääsytunnus.</string> <string id="WifiLteExecutionDataError">Tietoja ei vastaanotettu.</string>
<string id="SettingsApiUrl">HomeAssistant API:n URL-osoite.</string> <!-- Asetusten käyttöliittymän osalta jousien tulisi olla siinä järjestyksessä, jossa niitä käytetään. -->
<string id="SettingsConfigUrl">URL-osoite valikon määrityksiä varten (JSON).</string> <string id="SettingsSelect">Valitse ...</string>
<string id="SettingsCacheConfig">Pitäisikö sovelluksen tallentaa valikon asetukset välimuistiin?</string> <string id="SettingsApiKey">API -avain homeSistentille.</string>
<string id="SettingsClearCache">Pitäisikö sovelluksen tyhjentää olemassa oleva välimuisti, kun se käynnistetään seuraavan kerran?</string> <string id="SettingsApiKeyPrompt">Pitkäikäinen pääsymerkki.</string>
<string id="SettingsVibration">Pitäisikö sovelluksen antaa palautetta tärinän kautta?</string> <string id="SettingsApiUrl">URL -osoite Homeasistent -sovellusliittymälle.</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="SettingsConfigUrl">Valikkokokoonpanon URL (JSON).</string>
<string id="SettingsPollDelay">Ylimääräinen kyselyn viive (sekunneissa). Lisää viiveen kaikkien valikkokohtien tilapäivitysten välille.</string> <string id="SettingsCacheConfig">Pitäisikö sovelluksen välimuistiin valikon kokoonpano?</string>
<string id="SettingsConfirmTimeout">Tämän ajan kuluttua (sekunneissa) toiminnon vahvistusikkuna suljetaan automaattisesti ja toiminto peruutetaan. Aseta arvoksi 0, jos haluat poistaa aikakatkaisun käytöstä.</string> <string id="SettingsClearCache">Pitäisikö sovelluksen tyhjentää olemassa oleva välimuisti seuraavalla kerralla?</string>
<string id="SettingsPin">4-numeroinen PIN-koodi, jota käytetään kaikkiin vahvistusta vaativiin toimiin (0000-9999).</string> <string id="SettingsWifiLteExecutionEnable">Ota komentojen suorittaminen käyttöön Wi-Fi/LTE: n kautta.</string>
<string id="SettingsPinError">Määritä kelvollinen 4-numeroinen numeerinen PIN-koodi väliltä 00009999 sovelluksen asetuksissa.</string> <string id="SettingsVibration">Pitäisikö sovelluksen antaa palautetta värähtelyjen kautta?</string>
<string id="SettingsTextAlign">Vasen (pois) tai oikea (päällä) valikon kohdistus.</string> <string id="SettingsAppTimeout">Aikakatkaisu sekunneissa. Poistu sovelluksesta tämän toimettomuuden jälkeen laitteen akun tallentamiseksi.</string>
<string id="LeftToRight">Vasemmalta oikealle</string> <string id="SettingsPollDelay">Lisäkyselyviive (sekunneissa). Lisää viive kaikkien valikkokohteiden tilapäivityksen välillä.</string>
<string id="RightToLeft">Oikealta vasemmalle</string> <string id="SettingsConfirmTimeout">Tämän ajan jälkeen (sekunneissa) toiminnan vahvistusvalintaikkuna suljetaan automaattisesti ja toiminto peruutetaan. Aseta arvoon 0 poistamaan aikakatkaisu käytöstä.</string>
<string id="SettingsPin">4-numeroinen PIN-koodi, jota käytetään kaikkiin sitä vaativiin toimiin (0000-9999).</string>
<string id="SettingsPinError">Määritä kelvollinen 4-numeroinen numeerinen PIN-arvo välillä 0000-9999 sovellusasetuksissa.</string>
<string id="SettingsTextAlign">Vasen (pois päältä) tai oikea (on) valikon kohdistus.</string>
<string id="SettingsLeftToRight">Vasemmalta oikealle</string>
<string id="SettingsRightToLeft">Vasemmalle</string>
<string id="SettingsWidgetStart">(Vain widget) Käynnistä sovellus automaattisesti widgetistä odottamatta napautusta.</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="SettingsEnableBatteryLevel">Ota taustapalvelu käyttöön laitteen akkutason, sijainnin ja (jos tuetun) aktiviteettitietojen lähettämiseksi kodin avustajalle.</string>
<string id="SettingsBatteryLevelRefreshRate">Virkistystaajuus (minuutteina), jolla taustapalvelun pitäisi toistaa tietojen lähettäminen.</string> <string id="SettingsBatteryLevelRefreshRate">Päivitysnopeus (muutamassa minuutissa), jossa taustapalvelun tulisi toistaa tietojen lähettäminen.</string>
<string id="WebhookId">(Vain luku) Laitteen luoma Webhook-tunnus taustapalvelupäivityksiä varten. Saatat tarvita tätä virheenkorjaukseen.</string> <string id="SettingsUserHttpHeader">Käyttäjä toimitti HTTP -otsikon</string>
<string id="SettingsUserHttpHeaderDescription">Jotkut kodin avustajaasennukset vaativat mukautetun HTTP -otsikon määrittelyn toiminnan varten.</string>
<string id="SettingsUserHttpHeaderName">Käyttäjä toimitti http-header: Nimi</string>
<string id="SettingsUserHttpHeaderValue">Käyttäjä toimitti HTTP-otsikon: arvo</string>
<string id="SettingsClearWebhookId">Ota yhteys kodin avustajaan (selkeä Webhook ID, katso vianetsintäopas).</string>
<string id="SettingsWebhookId">(Vain lue) laitteen luoma webhook -tunnus taustapalvelupäivityksiin. Saatat tarvita tätä virheenkorjausta varten.</string>
</strings> </strings>

View File

@@ -9,64 +9,76 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
<!-- <!--
Generated by Google Translate: English to French Generated by Google Translate: English to French
Généré par Google Translate depuis l'anglais Généré par Google Translate de l'anglais
--> -->
<strings> <strings>
<string id="ApiFlood">Appels API trop rapide. Veuillez signaler cette erreur avec les détails de l'appareil.</string> <string id="ApiFlood">Appels API trop rapide. Veuillez signaler cette erreur avec les détails de l'appareil.</string>
<string id="ApiUrlNotFound">URL introuvable. Erreur potentielle d'URL d'API dans les paramètres.</string> <string id="ApiUrlNotFound">URL introuvable. Erreur potentielle de l'URL de l'API dans les paramètres.</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">Disponible</string> <string id="Available" scope="glance">Disponible</string>
<string id="Cached" scope="glance">Mis en cache</string> <string id="Cached" scope="glance">Mis en cache</string>
<string id="Checking" scope="glance">Vérification...</string> <string id="Checking" scope="glance">Vérification...</string>
<string id="ConfigUrlNotFound">URL introuvable. Erreur potentielle d'URL de configuration dans les paramètres.</string> <string id="ConfigUrlNotFound">URL introuvable. Erreur d'URL de configuration potentielle dans les paramètres.</string>
<string id="Confirm">Bien sûr?</string> <string id="Confirm">Bien sûr?</string>
<string id="Empty">Vide</string> <string id="Empty">Vide</string>
<string id="Executed" scope="glance">Confirmé</string> <string id="Executed" scope="glance">Confirmé</string>
<string id="GlanceMenu" scope="glance">Menu</string> <string id="GlanceMenu" scope="glance">Menu</string>
<string id="Memory" scope="glance">Mémoire</string> <string id="Memory" scope="glance">Mémoire</string>
<string id="NoAPIKey" scope="glance">Aucune clé API dans les paramètres de l'application.</string> <string id="NoAPIKey" scope="glance">Aucune clé API dans les paramètres de l'application.</string>
<string id="NoApiUrl" scope="glance">Aucune URL API dans les paramètres de l'application.</string> <string id="NoApiUrl" scope="glance">Aucune URL de l'API dans les paramètres de l'application.</string>
<string id="NoConfigUrl" scope="glance">Aucune URL de configuration dans les paramètres de l'application.</string> <string id="NoConfigUrl" scope="glance">Aucune URL de configuration dans les paramètres de l'application.</string>
<string id="NoInternet">Pas de connexion Internet.</string> <string id="NoInternet">Pas de connexion Internet.</string>
<string id="NoJson">Aucun JSON renvoyé par la requête HTTP.</string> <string id="NoJson">Aucun JSON n'est retourné de la demande HTTP.</string>
<string id="NoPhone" scope="glance">Pas de connexion téléphonique.</string> <string id="NoPhone" scope="glance">Aucune connexion par téléphone.</string>
<string id="NoPhoneNoCache" scope="glance">Pas de connexion par téléphone, pas de menu mis en cache.</string>
<string id="NoResponse">Aucune réponse, vérifiez la connexion Internet</string> <string id="NoResponse">Aucune réponse, vérifiez la connexion Internet</string>
<string id="PinInputLocked">Entrée du code PIN verrouillée pour</string> <string id="TimedOut">Demande de chronométrage</string>
<string id="PinInputLocked">Entrée de broche verrouillée pour</string>
<string id="PotentialError">Erreur potentielle</string> <string id="PotentialError">Erreur potentielle</string>
<string id="Seconds">secondes</string> <string id="Seconds">secondes</string>
<string id="TemplateError">Erreur de modèle</string> <string id="TemplateError">Erreur de modèle</string>
<string id="TrailingSlashErr">L'URL de l'API ne doit pas avoir de barre oblique finale « / ».</string> <string id="TrailingSlashErr">L'URL de l'API ne doit pas avoir une barre oblique de fuite '/'.</string>
<string id="Unavailable" scope="glance">Indisponible</string> <string id="Unavailable" scope="glance">Indisponible</string>
<string id="Unconfigured" scope="glance">Non configuré</string> <string id="Unconfigured" scope="glance">Non configuré</string>
<string id="UnhandledHttpErr">La requête HTTP a renvo le code d'erreur =</string> <string id="UnhandledHttpErr">La demande http renvoie le code d'erreur =</string>
<string id="WebhookFailed">Échec de l'enregistrement du Webhook</string> <string id="WebhookFailed">Échec de l'enregistrement de WebHook</string>
<string id="WrongPin">Code PIN incorrect</string> <string id="WrongPin">Mauvaise épingle</string>
<!-- Pour l'interface graphique des paramètres, les chaînes doivent être dans l'ordre dans lequel elles sont utilisées. --> <string id="WifiLteNotAvailable">Pas de Wi-Fi ou LTE disponible</string>
<string id="WifiLtePrompt">Exécuter sur Wi-Fi / LTE?</string>
<string id="WifiLteExecutionTitle">Envoi à l'assistant à domicile.</string>
<string id="WifiLteExecutionDataError">Aucune donnée reçue.</string>
<!-- Pour l'interface graphique des paramètres, les cordes doivent être dans l'ordre où elles sont utilisées. -->
<string id="SettingsSelect">Sélectionner...</string> <string id="SettingsSelect">Sélectionner...</string>
<string id="SettingsApiKey">Clé API pour HomeAssistant.</string> <string id="SettingsApiKey">Clé API pour HomeSSistant.</string>
<string id="SettingsApiKeyPrompt">Jeton d'accès longue durée.</string> <string id="SettingsApiKeyPrompt">Jeton d'accès à longue durée de vie.</string>
<string id="SettingsApiUrl">URL pour l'API HomeAssistant.</string> <string id="SettingsApiUrl">URL pour API HomeSSistant.</string>
<string id="SettingsConfigUrl">URL pour la configuration du menu (JSON).</string> <string id="SettingsConfigUrl">URL pour la configuration du menu (JSON).</string>
<string id="SettingsCacheConfig">L'application doit-elle mettre en cache la configuration du menu ?</string> <string id="SettingsCacheConfig">L'application devrait-elle mettre en cache la configuration du menu?</string>
<string id="SettingsClearCache">L'application doit-elle vider le cache existant lors de son prochain démarrage ?</string> <string id="SettingsClearCache">L'application devrait-elle effacer le cache existant la prochaine fois qu'il sera démarré?</string>
<string id="SettingsVibration">L'application doit-elle fournir un retour via des vibrations ?</string> <string id="SettingsWifiLteExecutionEnable">Activer l'exécution des commandes sur Wi-Fi / LTE.</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="SettingsVibration">L'application devrait-elle fournir des commentaires via des vibrations?</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 du menu.</string> <string id="SettingsAppTimeout">Timeout en quelques secondes. Quittez l'application après cette période d'inactivité pour enregistrer la batterie de l'appareil.</string>
<string id="SettingsConfirmTimeout">Après ce délai (en secondes), une boîte de dialogue de confirmation d'une action est automatiquement fermée et l'action est annulée. Réglez sur 0 pour désactiver le délai d'attente.</string> <string id="SettingsPollDelay">Délai supplémentaire du scrutin (en secondes). Ajoute un délai entre la mise à jour d'état de tous les éléments de menu.</string>
<string id="SettingsPin">Code PIN à 4 chiffres à utiliser pour toutes les actions nécessitant une confirmation (0000-9999).</string> <string id="SettingsConfirmTimeout">Après ce temps (en quelques secondes), une boîte de dialogue de confirmation pour une action est automatiquement fermée et l'action est annulée. Réglé sur 0 pour désactiver le délai d'attente.</string>
<string id="SettingsPinError">Veuillez configurer un code PIN numérique valide à 4 chiffres entre 0000 et 9999 dans les paramètres de l'application.</string> <string id="SettingsPin">PIN à 4 chiffres à utiliser pour toutes les actions qui l'exigent (0000-9999).</string>
<string id="SettingsTextAlign">Alignement du menu à gauche (désactivé) ou à droite (activé).</string> <string id="SettingsPinError">Veuillez configurer une broche numérique à 4 chiffres valide entre 0000 et 9999 dans les paramètres de l'application.</string>
<string id="LeftToRight">De gauche à droite</string> <string id="SettingsTextAlign">Alignement du menu gauche (off) ou droit (on).</string>
<string id="RightToLeft">De droite à gauche</string> <string id="SettingsLeftToRight">De gauche à droite</string>
<string id="SettingsWidgetStart">(Widget uniquement) Démarrez automatiquement l'application depuis le widget sans attendre un appui.</string> <string id="SettingsRightToLeft">De la droite à gauche</string>
<string id="SettingsEnableBatteryLevel">Activez le service d'arrière-plan pour envoyer le niveau de batterie de l'appareil, l'emplacement et (si pris en charge) les données d'activité à Home Assistant.</string> <string id="SettingsWidgetStart">(Widget uniquement) Démarrez automatiquement l'application à partir du widget sans attendre un robinet.</string>
<string id="SettingsBatteryLevelRefreshRate">La fréquence de rafraîchissement (en minutes) à laquelle le service d'arrière-plan doit répéter l'envoi de données.</string> <string id="SettingsEnableBatteryLevel">Activez le service d'arrière-plan pour envoyer le niveau de la batterie de l'appareil, l'emplacement et (le cas échéant) les données d'activité à l'assistant à domicile.</string>
<string id="WebhookId">(Lecture seule) L'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> <string id="SettingsBatteryLevelRefreshRate">Le taux de rafraîchissement (en minutes) auquel le service d'arrière-plan doit répéter l'envoi de données.</string>
<string id="SettingsUserHttpHeader">En-tête HTTP fourni par l'utilisateur</string>
<string id="SettingsUserHttpHeaderDescription">Certaines installations d'assistant à domicile nécessitent la spécification d'un en-tête HTTP personnalisé pour fonctionner.</string>
<string id="SettingsUserHttpHeaderName">Utilisateur fourni HTTP-Header: Nom</string>
<string id="SettingsUserHttpHeaderValue">Utilisateur HTTP-Header: Valeur</string>
<string id="SettingsClearWebhookId">Reconnectez-vous à Home Assistant (Clear WebHook ID, voir Guide de dépannage).</string>
<string id="SettingsWebhookId">(Lire uniquement) L'ID Webhook créé par l'appareil pour les mises à jour du service d'arrière-plan. Vous pourriez en avoir besoin pour le débogage.</string>
</strings> </strings>

View File

@@ -9,64 +9,76 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
<!-- <!--
Generated by Google Translate: English to Greek Generated by Google Translate: English to Greek
Δημιουργήθηκε από τη Μετάφραση Google από τα Αγγλικά Δημιουργήθηκε από το Google Translate από τα Αγγλικά
--> -->
<strings> <strings>
<string id="ApiFlood">Κλήσεις API πολύ γρήγορες. Παρακαλώ επιβραδύνετε τα αιτήματά σας.</string> <string id="ApiFlood">Το API καλεί πολύ γρήγορα. Παρακαλούμε επιβραδύνετε τα αιτήματά σας.</string>
<string id="ApiUrlNotFound">Η διεύθυνση URL δεν βρέθηκε. Πιθανό σφάλμα διεύθυνσης URL API στις ρυθμίσεις.</string> <string id="ApiUrlNotFound">Η διεύθυνση URL δεν βρέθηκε. Πιθανό σφάλμα URL API στις ρυθμίσεις.</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">Διαθέσιμος</string> <string id="Available" scope="glance">Διαθέσιμος</string>
<string id="Cached" scope="glance">Αποθηκευμένο στην κρυφή μνήμη</string> <string id="Cached" scope="glance">Αποθηκευμένος</string>
<string id="Checking" scope="glance">Ελεγχος...</string> <string id="Checking" scope="glance">Ελεγχος...</string>
<string id="ConfigUrlNotFound">Η διεύθυνση URL δεν βρέθηκε. Πιθανό σφάλμα διεύθυνσης URL διαμόρφωσης στις ρυθμίσεις.</string> <string id="ConfigUrlNotFound">Η διεύθυνση URL δεν βρέθηκε. Πιθανό σφάλμα URL διαμόρφωσης στις ρυθμίσεις.</string>
<string id="Confirm">Σίγουρος;</string> <string id="Confirm">Σίγουρος;</string>
<string id="Empty">Αδειάζω</string> <string id="Empty">Αδειάζω</string>
<string id="Executed" scope="glance">Επιβεβαιωμένος</string> <string id="Executed" scope="glance">Επιβεβαιωμένος</string>
<string id="GlanceMenu" scope="glance">Μενού</string> <string id="GlanceMenu" scope="glance">Μενού</string>
<string id="Memory" scope="glance">Μνήμη</string> <string id="Memory" scope="glance">Μνήμη</string>
<string id="NoAPIKey" scope="glance">Δεν υπάρχει κλειδί API στις ρυθμίσεις της εφαρμογής.</string> <string id="NoAPIKey" scope="glance">Δεν υπάρχει κλειδί API στις ρυθμίσεις εφαρμογής.</string>
<string id="NoApiUrl" scope="glance">Δεν υπάρχει URL API στις ρυθμίσεις της εφαρμογής.</string> <string id="NoApiUrl" scope="glance">Δεν υπάρχει διεύθυνση URL API στις ρυθμίσεις εφαρμογής.</string>
<string id="NoConfigUrl" scope="glance">Δεν υπάρχει διεύθυνση URL διαμόρφωσης στις ρυθμίσεις της εφαρμογής.</string> <string id="NoConfigUrl" scope="glance">Χωρίς διευθύνσεις διαμόρφωσης στις ρυθμίσεις εφαρμογής.</string>
<string id="NoInternet">Δεν υπάρχει σύνδεση στο Διαδίκτυο.</string> <string id="NoInternet">Χωρίς σύνδεση στο Διαδίκτυο.</string>
<string id="NoJson">Δεν επιστράφηκε JSON από αίτημα HTTP.</string> <string id="NoJson">Κανένα JSON επέστρεψε από το αίτημα HTTP.</string>
<string id="NoPhone" scope="glance">Δεν υπάρχει σύνδεση τηλεφώνου.</string> <string id="NoPhone" scope="glance">Χωρίς σύνδεση τηλεφώνου.</string>
<string id="NoResponse">Καμία απάντηση, ελέγξτε τη σύνδεση στο Διαδίκτυο</string> <string id="NoPhoneNoCache" scope="glance">Δεν υπάρχει σύνδεση τηλεφώνου, χωρίς προσωρινό μενού.</string>
<string id="PinInputLocked">Η είσοδος PIN κλειδώθηκε για</string> <string id="NoResponse">Χωρίς απάντηση, ελέγξτε τη σύνδεση στο Διαδίκτυο</string>
<string id="TimedOut">Αίτημα χρονομέτρου</string>
<string id="PinInputLocked">Είσοδος PIN κλειδωμένη για</string>
<string id="PotentialError">Πιθανό σφάλμα</string> <string id="PotentialError">Πιθανό σφάλμα</string>
<string id="Seconds">δευτερόλεπτα</string> <string id="Seconds">δευτερόλεπτα</string>
<string id="TemplateError">Σφάλμα προτύπου</string> <string id="TemplateError">Σφάλμα προτύπου</string>
<string id="TrailingSlashErr">Η διεύθυνση URL του API δεν πρέπει να έχει τελική κάθετο '/'.</string> <string id="TrailingSlashErr">Το URL API δεν πρέπει να έχει μια κλίση "/'.</string>
<string id="Unavailable" scope="glance">Δυσεύρετος</string> <string id="Unavailable" scope="glance">Δυσεύρετος</string>
<string id="Unconfigured" scope="glance">Μη διαμορφωμένο</string> <string id="Unconfigured" scope="glance">Αδιευκρίνιστος</string>
<string id="UnhandledHttpErr">Το αίτημα HTTP επέστρεψε κωδικό σφάλματος =</string> <string id="UnhandledHttpErr">Αίτηση HTTP Επιστρέφεται κωδικός σφάλματος =</string>
<string id="WebhookFailed">Η εγγραφή του Webhook απέτυχε</string> <string id="WebhookFailed">Αποτυχία εγγραφής webhook</string>
<string id="WrongPin">Λάθος PIN</string> <string id="WrongPin">Λάθος καρφίτσα</string>
<!-- Για τις ρυθμίσεις GUI, οι συμβολοσειρές πρέπει να είναι με τη σειρά που χρησιμοποιούνται. --> <string id="WifiLteNotAvailable">Χωρίς Wi-Fi ή LTE διαθέσιμο</string>
<string id="WifiLtePrompt">Εκτέλεση μέσω Wi-Fi/LTE;</string>
<string id="WifiLteExecutionTitle">Αποστολή στον βοηθό στο σπίτι.</string>
<string id="WifiLteExecutionDataError">Δεν λαμβάνονται δεδομένα.</string>
<!-- Για τις ρυθμίσεις GUI, οι χορδές πρέπει να είναι με τη σειρά που χρησιμοποιούνται. -->
<string id="SettingsSelect">Επιλέγω...</string> <string id="SettingsSelect">Επιλέγω...</string>
<string id="SettingsApiKey">Κλειδί API για το HomeAssistant.</string> <string id="SettingsApiKey">API κλειδί για το Homeassistant.</string>
<string id="SettingsApiKeyPrompt">Διακριτικό πρόσβασης μακράς διαρκείας.</string> <string id="SettingsApiKeyPrompt">Διακριτικό πρόσβαση σε μακροχρόνια διάρκεια.</string>
<string id="SettingsApiUrl">URL για το HomeAssistant API.</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="SettingsCacheConfig">Πρέπει η προσωρινή μνήμη εφαρμογής τη διαμόρφωση μενού;</string>
<string id="SettingsClearCache">Πρέπει η εφαρμογή να διαγράψει την υπάρχουσα προσωρινή μνήμη την επόμενη φορά που θα ξεκινήσει;</string> <string id="SettingsClearCache">Πρέπει η εφαρμογή να διαγράψει την υπάρχουσα μνήμη cache την επόμενη φορά που θα ξεκινήσει;</string>
<string id="SettingsWifiLteExecutionEnable">Ενεργοποιήστε τις εντολές εκτέλεσης μέσω Wi-Fi/LTE.</string>
<string id="SettingsVibration">Πρέπει η εφαρμογή να παρέχει ανατροφοδότηση μέσω δονήσεων;</string> <string id="SettingsVibration">Πρέπει η εφαρμογή να παρέχει ανατροφοδότηση μέσω δονήσεων;</string>
<string id="SettingsAppTimeout">Timeout σε δευτερόλεπτα. Κλείστε την εφαρμογή μετά από αυτήν την περίοδο αδράνειας για να εξοικονομήσετε την μπαταρία της συσκευής.</string> <string id="SettingsAppTimeout">Χρονικό όριο σε δευτερόλεπτα. Βγείτε από την εφαρμογή μετά από αυτήν την περίοδο αδράνειας για να αποθηκεύσετε τη μπαταρία της συσκευής.</string>
<string id="SettingsPollDelay">Πρόσθετη καθυστέρηση δημοσκόπησης (σε δευτερόλεπτα). Προσθέτει μια καθυστέρηση μεταξύ της ενημέρωσης κατάστασης όλων των στοιχείων μενού.</string> <string id="SettingsPollDelay">Πρόσθετη καθυστέρηση δημοσκόπησης (σε δευτερόλεπτα). Προσθέτει μια καθυστέρηση μεταξύ της ενημέρωσης κατάστασης όλων των στοιχείων μενού.</string>
<string id="SettingsConfirmTimeout">Μετά από αυτό το χρονικό διάστημα (σε δευτερόλεπτα), ένα παράθυρο διαλόγου επιβεβαίωσης για μια ενέργεια κλείνει αυτόματα και η ενέργεια ακυρώνεται. Ορίστε στο 0 για να απενεργοποιήσετε το χρονικό όριο.</string> <string id="SettingsConfirmTimeout">Μετά από αυτό το χρονικό διάστημα (σε δευτερόλεπτα), ένα παράθυρο διαλόγου επιβεβαίωσης για μια ενέργεια κλείνει αυτόματα και η ενέργεια ακυρώνεται. Ρυθμίστε στο 0 για να απενεργοποιήσετε το χρονικό όριο.</string>
<string id="SettingsPin">4-ψήφιο PIN που θα χρησιμοποιηθεί για όλες τις ενέργειες που απαιτούν επιβεβαίωση (0000-9999).</string> <string id="SettingsPin">4-ψηφία PIN που πρέπει να χρησιμοποιηθεί για όλες τις ενέργειες που το απαιτούν (0000-9999).</string>
<string id="SettingsPinError">Διαμορφώστε ένα έγκυρο τετραψήφιο αριθμητικό PIN μεταξύ 0000 και 9999 στις ρυθμίσεις της εφαρμογής.</string> <string id="SettingsPinError">Διαμορφώστε έναν έγκυρο τετραψήφιο αριθμητικό πείρο μεταξύ 0000 και 9999 στις ρυθμίσεις εφαρμογής.</string>
<string id="SettingsTextAlign">Αριστερά (απενεργοποίηση) ή Δεξιά (ενεργό) Ευθυγράμμιση μενού.</string> <string id="SettingsTextAlign">Αριστερά (απενεργοποίηση) ή δεξιά (ON) Ευθυγράμμιση μενού.</string>
<string id="LeftToRight">Από αριστερά προς τα δεξιά</string> <string id="SettingsLeftToRight">Από αριστερά προς τα δεξιά</string>
<string id="RightToLeft">Δεξιά προς Αριστερά</string> <string id="SettingsRightToLeft">Δεξιά προς τα αριστερά</string>
<string id="SettingsWidgetStart">(Μόνο widget) Αυτόματη εκκίνηση της εφαρμογής από το widget χωρίς να περιμένετε ένα πάτημα.</string> <string id="SettingsWidgetStart">(Μόνο widget) Ξεκινήστε αυτόματα την εφαρμογή από το widget χωρίς να περιμένετε μια βρύση.</string>
<string id="SettingsEnableBatteryLevel">Ενεργοποιήστε την υπηρεσία παρασκηνίου για αποστολή του επιπέδου μπαταρίας της συσκευής, της τοποθεσίας και (εάν υποστηρίζονται) δεδομένα δραστηριότητας στον Βοηθό σπιτιού.</string> <string id="SettingsEnableBatteryLevel">Ενεργοποιήστε την υπηρεσία φόντου για την αποστολή της στάθμης της μπαταρίας της συσκευής, της θέσης και της (αν υποστηριχθεί) δεδομένων δραστηριότητας στον βοηθό στο σπίτι.</string>
<string id="SettingsBatteryLevelRefreshRate">Ο ρυθμός ανανέωσης (σε λεπτά) με τον οποίο η υπηρεσία παρασκηνίου θα πρέπει να επαναλαμβάνει την αποστολή δεδομένων.</string> <string id="SettingsBatteryLevelRefreshRate">Ο ρυθμός ανανέωσης (σε λεπτά) κατά τον οποίο η υπηρεσία φόντου πρέπει να επαναλαμβάνει τα δεδομένα αποστολής.</string>
<string id="WebhookId">(Μόνο για ανάγνωση) Το αναγνωριστικό Webhook που δημιουργήθηκε από τη συσκευή για ενημερώσεις υπηρεσίας παρασκηνίου. Μπορεί να το χρειάζεστε για τον εντοπισμό σφαλμάτων.</string> <string id="SettingsUserHttpHeader">Παρέχεται η κεφαλίδα HTTP που παρέχεται από τον χρήστη</string>
<string id="SettingsUserHttpHeaderDescription">Ορισμένες εγκαταστάσεις βοηθού στο σπίτι απαιτούν την προδιαγραφή μιας προσαρμοσμένης κεφαλίδας HTTP για να λειτουργήσουν.</string>
<string id="SettingsUserHttpHeaderName">Παρέχεται ο χρήστης HTTP-Header: Όνομα</string>
<string id="SettingsUserHttpHeaderValue">Παρέχεται ο χρήστης HTTP-Header: Αξία</string>
<string id="SettingsClearWebhookId">Επανασυνδέστε τον βοηθό στο σπίτι (Clear Webhook ID, δείτε τον οδηγό αντιμετώπισης προβλημάτων).</string>
<string id="SettingsWebhookId">(Μόνο διαβάστε) Το αναγνωριστικό WebHook που δημιουργήθηκε από τη συσκευή για ενημερώσεις υπηρεσιών φόντου. Μπορεί να το χρειαστείτε για εντοπισμό σφαλμάτων.</string>
</strings> </strings>

View File

@@ -9,7 +9,7 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
@@ -19,54 +19,66 @@
--> -->
<strings> <strings>
<string id="ApiFlood">קריאות API מהירות מדי. נא להאט את הבקשות שלך.</string> <string id="ApiFlood">API קוראת מהירה מדי. אנא האט את בקשותיך.</string>
<string id="ApiUrlNotFound">כתובת האתר לא נמצאה. שגיאה פוטנציאלית של כתובת ה-API בהגדרות.</string> <string id="ApiUrlNotFound">כתובת אתר לא נמצאה. שגיאת כתובת URL פוטנציאלית בהגדרות.</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">זָמִין</string> <string id="Available" scope="glance">זָמִין</string>
<string id="Cached" scope="glance">שמור במטמון</string> <string id="Cached" scope="glance">מטמון</string>
<string id="Checking" scope="glance">בודק...</string> <string id="Checking" scope="glance">בודק ...</string>
<string id="ConfigUrlNotFound">כתובת האתר לא נמצאה. שגיאת כתובת אתר פוטנציאלית של תצורה בהגדרות.</string> <string id="ConfigUrlNotFound">כתובת אתר לא נמצאה. שגיאת כתובת אתר תצורה פוטנציאלית בהגדרות.</string>
<string id="Confirm">בַּטוּחַ?</string> <string id="Confirm">בַּטוּחַ?</string>
<string id="Empty">רֵיק</string> <string id="Empty">רֵיק</string>
<string id="Executed" scope="glance">מְאוּשָׁר</string> <string id="Executed" scope="glance">מְאוּשָׁר</string>
<string id="GlanceMenu" scope="glance">תַפרִיט</string> <string id="GlanceMenu" scope="glance">תַפרִיט</string>
<string id="Memory" scope="glance">זֵכֶר</string> <string id="Memory" scope="glance">זֵכֶר</string>
<string id="NoAPIKey" scope="glance">אין מפתח API בהגדרות האפליקציה.</string> <string id="NoAPIKey" scope="glance">אין מפתח API בהגדרות היישום.</string>
<string id="NoApiUrl" scope="glance">אין כתובת API בהגדרות האפליקציה.</string> <string id="NoApiUrl" scope="glance">אין כתובת URL בהגדרות היישום.</string>
<string id="NoConfigUrl" scope="glance">אין כתובת אתר תצורה בהגדרות האפליקציה.</string> <string id="NoConfigUrl" scope="glance">אין כתובת אתר תצורה בהגדרות היישום.</string>
<string id="NoInternet">אין חיבור לאינטרנט.</string> <string id="NoInternet">אין חיבור לאינטרנט.</string>
<string id="NoJson">לא הוחזר JSON מבקשת HTTP.</string> <string id="NoJson">אף JSON לא חזר מבקשת HTTP.</string>
<string id="NoPhone" scope="glance">אין חיבור לטלפון.</string> <string id="NoPhone" scope="glance">אין חיבור טלפון.</string>
<string id="NoResponse">אין תגובה, בדוק חיבור לאינטרנט</string> <string id="NoPhoneNoCache" scope="glance">אין חיבור טלפון, אין תפריט במטמון.</string>
<string id="PinInputLocked">קלט PIN ננעל עבור</string> <string id="NoResponse">אין תגובה, בדוק את חיבור האינטרנט</string>
<string id="TimedOut">בקש מתוזמן</string>
<string id="PinInputLocked">קלט סיכה נעול עבור</string>
<string id="PotentialError">שגיאה פוטנציאלית</string> <string id="PotentialError">שגיאה פוטנציאלית</string>
<string id="Seconds">שניות</string> <string id="Seconds">שניות</string>
<string id="TemplateError">שגיאת תבנית</string> <string id="TemplateError">שגיאת תבנית</string>
<string id="TrailingSlashErr">כתובת ה-API לא חייבת לכלול לוכסן עוקב '/'.</string> <string id="TrailingSlashErr">כתובת API אסור שיהיה לו סלאש נגרר '/'.</string>
<string id="Unavailable" scope="glance">לא זמין</string> <string id="Unavailable" scope="glance">לא זמין</string>
<string id="Unconfigured" scope="glance">לא מוגדר</string> <string id="Unconfigured" scope="glance">לא מוגדר</string>
<string id="UnhandledHttpErr">בקשת HTTP החזירה קוד שגיאה =</string> <string id="UnhandledHttpErr">בקשת HTTP קוד שגיאה שהוחזר =</string>
<string id="WebhookFailed">רישום Webhook נכשל</string> <string id="WebhookFailed">נכשל ברישום WebHook</string>
<string id="WrongPin">PIN שגוי</string> <string id="WrongPin">סיכה שגויה</string>
<!-- עבור ה-GUI של ההגדרות, המחרוזות צריכות להיות בסדר שבו נעשה שימוש. --> <string id="WifiLteNotAvailable">אין Wi-Fi או LTE זמינים</string>
<string id="WifiLtePrompt">להורג באמצעות Wi-Fi/LTE?</string>
<string id="WifiLteExecutionTitle">שולח לעוזר הבית.</string>
<string id="WifiLteExecutionDataError">לא התקבלו נתונים.</string>
<!-- עבור ה- GUI של הגדרות, המיתרים צריכים להיות בסדר שהם משתמשים בהם. -->
<string id="SettingsSelect">לִבחוֹר...</string> <string id="SettingsSelect">לִבחוֹר...</string>
<string id="SettingsApiKey">מפתח API עבור HomeAssistant.</string> <string id="SettingsApiKey">מפתח API עבור HomeAssistant.</string>
<string id="SettingsApiKeyPrompt">אסימון גישה ארוך-חיים.</string> <string id="SettingsApiKeyPrompt">אסימון גישה ארוכת שנים.</string>
<string id="SettingsApiUrl">כתובת URL עבור HomeAssistant API.</string> <string id="SettingsApiUrl">כתובת URL לממשק API עמדתי.</string>
<string id="SettingsConfigUrl">כתובת URL לתצורת תפריט (JSON).</string> <string id="SettingsConfigUrl">כתובת אתר לתצורת תפריט (JSON).</string>
<string id="SettingsCacheConfig">האם האפליקציה צריכה לשמור את תצורת התפריט במטמון?</string> <string id="SettingsCacheConfig">האם על היישום למנוע את תצורת התפריט?</string>
<string id="SettingsClearCache">האם היישום צריך לנקות את המטמון הקיים בפעם הבאה שהוא יופעל?</string> <string id="SettingsClearCache">האם על היישום לנקות את המטמון הקיים בפעם הבאה שהוא מתחיל?</string>
<string id="SettingsVibration">האם האפליקציה צריכה לספק משוב באמצעות רעידות?</string> <string id="SettingsWifiLteExecutionEnable">אפשר לבצע פקודות דרך Wi-Fi/LTE.</string>
<string id="SettingsAppTimeout">פסק זמן בשניות. צא מהאפליקציה לאחר תקופה זו של חוסר פעילות כדי לחסוך בסוללת המכשיר.</string> <string id="SettingsVibration">האם על היישום לספק משוב באמצעות תנודות?</string>
<string id="SettingsPollDelay">עיכוב נוסף בסקר (בשניות). מוסיף עיכוב בין עדכון המצב של כל פריטי התפריט.</string> <string id="SettingsAppTimeout">פסק זמן בשניות. צא מהיישום לאחר תקופת חוסר פעילות זו כדי לחסוך את סוללת ההתקן.</string>
<string id="SettingsConfirmTimeout">לאחר זמן זה (בשניות), תיבת דו-שיח לאישור פעולה נסגרת אוטומטית והפעולה מבוטלת. הגדר ל-0 כדי לבטל את הזמן הקצוב.</string> <string id="SettingsPollDelay">עיכוב נוסף בסקר (תוך שניות). מוסיף עיכוב בין עדכון הסטטוס של כל פריטי התפריט.</string>
<string id="SettingsPin">PIN בן 4 ספרות שישמש עבור כל הפעולות הדורשות אישור (0000-9999).</string> <string id="SettingsConfirmTimeout">לאחר זמן זה (תוך שניות), דיאלוג אישור לפעולה נסגר אוטומטית והפעולה מבוטלת. מוגדר ל 0 כדי להשבית את פסק הזמן.</string>
<string id="SettingsPinError">נא להגדיר PIN מספרי תקף בן 4 ספרות בין 0000 ל-9999 בהגדרות האפליקציה.</string> <string id="SettingsPin">סיכה עם 4 ספרות שישמשו לכל הפעולות הדורשות אותה (0000-9999).</string>
<string id="SettingsTextAlign">יישור תפריט שמאלה (כבוי) או ימינה (מופעל).</string> <string id="SettingsPinError">אנא קבע את התצורה של סיכה מספרית תקפה בת 4 ספרות בין 0000 ל- 9999 בהגדרות היישום.</string>
<string id="LeftToRight">משמאל לימין</string> <string id="SettingsTextAlign">יישור תפריט משמאל (כבוי) או ימין (ON).</string>
<string id="RightToLeft">מימין לשמאל</string> <string id="SettingsLeftToRight">משמאל לימין</string>
<string id="SettingsWidgetStart">(יישומון בלבד) הפעל אוטומטית את האפליקציה מהווידג'ט מבלי לחכות להקשה.</string> <string id="SettingsRightToLeft">ימין לשמאל</string>
<string id="SettingsEnableBatteryLevel">אפשר את שירות הרקע כדי לשלוח את נתוני רמת הסוללה של המכשיר, המיקום (אם נתמכים) ל-Home Assistant.</string> <string id="SettingsWidgetStart">(ווידג'ט בלבד) הפעל אוטומטית את היישום מהווידג'ט מבלי לחכות לברז.</string>
<string id="SettingsBatteryLevelRefreshRate">קצב הרענון (בדקות) שבו שירות הרקע צריך לחזור על שליחת נתונים.</string> <string id="SettingsEnableBatteryLevel">אפשר לשירות הרקע לשלוח את רמת סוללת המכשיר, מיקום ו (אם נתמך) נתוני פעילות לעוזר הבית.</string>
<string id="WebhookId">(לקריאה בלבד) מזהה ה-Webhook שנוצר על ידי המכשיר עבור עדכוני שירות ברקע. ייתכן שתדרוש זאת לצורך איתור באגים.</string> <string id="SettingsBatteryLevelRefreshRate">קצב הרענון (בדקות) בו שירות הרקע צריך לחזור על שליחת נתונים.</string>
<string id="SettingsUserHttpHeader">כותרת HTTP סיפקה למשתמש</string>
<string id="SettingsUserHttpHeaderDescription">כמה התקנות עוזרות ביתיות דורשות מפרט של כותרת HTTP מותאמת אישית כדי לתפקד.</string>
<string id="SettingsUserHttpHeaderName">המשתמש סיפק HTTP-HEADER: שם</string>
<string id="SettingsUserHttpHeaderValue">המשתמש סיפק HTTP-HEADER: ערך</string>
<string id="SettingsClearWebhookId">התחבר מחדש לעוזר הבית (נקה מזהה WebHook, ראה מדריך לפתרון בעיות).</string>
<string id="SettingsWebhookId">(קרא בלבד) מזהה WebHook שנוצר על ידי המכשיר לעדכוני שירות רקע. אתה עשוי לדרוש זאת לצורך ניפוי באגים.</string>
</strings> </strings>

View File

@@ -9,64 +9,76 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
<!-- <!--
Generated by Google Translate: English to Croatian Generated by Google Translate: English to Croatian
Generirano Google prevoditeljem s engleskog Generirao Google Translate s engleskog jezika
--> -->
<strings> <strings>
<string id="ApiFlood">API pozivi su prebrzi. Molimo usporite svoje zahtjeve.</string> <string id="ApiFlood">API naziva prebrzo. Usporite svoje zahtjeve.</string>
<string id="ApiUrlNotFound">URL nije pronađen. Potencijalna pogreška API URL-a u postavkama.</string> <string id="ApiUrlNotFound">URL nije pronađen. Pogreška u URL -u API -ja u postavkama.</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">na raspolaganju</string> <string id="Available" scope="glance">Dostupan</string>
<string id="Cached" scope="glance">Spremljeno u predmemoriju</string> <string id="Cached" scope="glance">Predmemoran</string>
<string id="Checking" scope="glance">Provjera...</string> <string id="Checking" scope="glance">Provjera ...</string>
<string id="ConfigUrlNotFound">URL nije pronađen. Potencijalna pogreška URL-a konfiguracije u postavkama.</string> <string id="ConfigUrlNotFound">URL nije pronađen. Pogreška URL -a za konfiguraciju u postavkama.</string>
<string id="Confirm">Naravno?</string> <string id="Confirm">Naravno?</string>
<string id="Empty">Prazan</string> <string id="Empty">Prazan</string>
<string id="Executed" scope="glance">Potvrđeno</string> <string id="Executed" scope="glance">Potvrđen</string>
<string id="GlanceMenu" scope="glance">Jelovnik</string> <string id="GlanceMenu" scope="glance">Jelovnik</string>
<string id="Memory" scope="glance">Memorija</string> <string id="Memory" scope="glance">Memorija</string>
<string id="NoAPIKey" scope="glance">Nema API ključa u postavkama aplikacije.</string> <string id="NoAPIKey" scope="glance">Nema API ključa u postavkama aplikacije.</string>
<string id="NoApiUrl" scope="glance">Nema API URL-a u postavkama aplikacije.</string> <string id="NoApiUrl" scope="glance">Nema URL -a API -ja u postavkama aplikacije.</string>
<string id="NoConfigUrl" scope="glance">Nema konfiguracijskog URL-a u postavkama aplikacije.</string> <string id="NoConfigUrl" scope="glance">Nema URL -a konfiguracije u postavkama aplikacije.</string>
<string id="NoInternet">Nema internetske veze.</string> <string id="NoInternet">Nema internetske veze.</string>
<string id="NoJson">HTTP zahtjev nije vratio JSON.</string> <string id="NoJson">Nijedan JSON nije se vratio s HTTP zahtjeva.</string>
<string id="NoPhone" scope="glance">Nema telefonske veze.</string> <string id="NoPhone" scope="glance">Nema telefonske veze.</string>
<string id="NoPhoneNoCache" scope="glance">Nema telefonske veze, nema predmemoriranog izbornika.</string>
<string id="NoResponse">Nema odgovora, provjerite internetsku vezu</string> <string id="NoResponse">Nema odgovora, provjerite internetsku vezu</string>
<string id="PinInputLocked">Unos PIN-a zaključan za</string> <string id="TimedOut">Zatražite tempirano</string>
<string id="PinInputLocked">Pin ulaz zaključan za</string>
<string id="PotentialError">Potencijalna pogreška</string> <string id="PotentialError">Potencijalna pogreška</string>
<string id="Seconds">sekundi</string> <string id="Seconds">sekundi</string>
<string id="TemplateError">Pogreška predloška</string> <string id="TemplateError">Greška predloška</string>
<string id="TrailingSlashErr">API URL ne smije imati kosu crtu '/' na kraju.</string> <string id="TrailingSlashErr">URL API -ja ne smije imati zaostalu kosu '/'.</string>
<string id="Unavailable" scope="glance">Nedostupan</string> <string id="Unavailable" scope="glance">Nedostupan</string>
<string id="Unconfigured" scope="glance">Nekonfigurirano</string> <string id="Unconfigured" scope="glance">Nekonfiguriran</string>
<string id="UnhandledHttpErr">HTTP zahtjev vratio je kod greške =</string> <string id="UnhandledHttpErr">HTTP zahtjev vraćen kod pogreške =</string>
<string id="WebhookFailed">Registracija Webhooka nije uspjela</string> <string id="WebhookFailed">Nije uspjelo registrirati webhook</string>
<string id="WrongPin">Pogrešan PIN</string> <string id="WrongPin">Pogrešan pin</string>
<!-- Za GUI postavki, nizovi trebaju biti redoslijedom kojim se koriste. --> <string id="WifiLteNotAvailable">Nije dostupno Wi-Fi ili LTE</string>
<string id="SettingsSelect">Odaberite...</string> <string id="WifiLtePrompt">Izvršite preko Wi-Fi/LTE?</string>
<string id="SettingsApiKey">API ključ za HomeAssistant.</string> <string id="WifiLteExecutionTitle">Slanje kod kuće pomoćnika.</string>
<string id="WifiLteExecutionDataError">Nema primljenih podataka.</string>
<!-- Za postavke GUI, žice bi trebale biti u redoslijedu koji se koriste. -->
<string id="SettingsSelect">Odaberite ...</string>
<string id="SettingsApiKey">Ključ API -ja za HomeAssistant.</string>
<string id="SettingsApiKeyPrompt">Dugotrajni pristupni token.</string> <string id="SettingsApiKeyPrompt">Dugotrajni pristupni token.</string>
<string id="SettingsApiUrl">URL za HomeAssistant API.</string> <string id="SettingsApiUrl">URL za homeassistant API.</string>
<string id="SettingsConfigUrl">URL za konfiguraciju izbornika (JSON).</string> <string id="SettingsConfigUrl">URL za konfiguraciju izbornika (JSON).</string>
<string id="SettingsCacheConfig">Treba li aplikacija spremiti konfiguraciju izbornika u predmemoriju?</string> <string id="SettingsCacheConfig">Treba li aplikacija predmemorirati konfiguraciju izbornika?</string>
<string id="SettingsClearCache">Treba li aplikacija prilikom sljedećeg pokretanja očistiti postojeću predmemoriju?</string> <string id="SettingsClearCache">Treba li aplikacija očistiti postojeću predmemoriju sljedeći put kad se pokrene?</string>
<string id="SettingsVibration">Treba li aplikacija dati povratnu informaciju putem vibracija?</string> <string id="SettingsWifiLteExecutionEnable">Omogući izvršavanje naredbi preko Wi-Fi/LTE.</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="SettingsVibration">Treba li aplikacija davati povratne informacije putem vibracija?</string>
<string id="SettingsPollDelay">Dodatna odgoda ankete (u sekundama). Dodaje odgodu između ažuriranja statusa svih stavki izbornika.</string> <string id="SettingsAppTimeout">Timeout u sekundi. Izađite iz aplikacije nakon ovog razdoblja neaktivnosti kako biste uštedjeli bateriju uređaja.</string>
<string id="SettingsConfirmTimeout">Nakon tog vremena (u sekundama), dijaloški okvir za potvrdu radnje automatski se zatvara i radnja se poništava. Postavite na 0 da onemogućite vremensko ograničenje.</string> <string id="SettingsPollDelay">Dodatno kašnjenje ankete (u sekundi). Dodaje kašnjenje između ažuriranja statusa svih stavki izbornika.</string>
<string id="SettingsPin">4-znamenkasti PIN koji se koristi za sve radnje koje zahtijevaju potvrdu (0000-9999).</string> <string id="SettingsConfirmTimeout">Nakon tog vremena (u sekundi), dijaloški okvir za potvrdu za radnju automatski se zatvara i radnja se otkazuje. Postavite na 0 da onemogućite vremensko ograničenje.</string>
<string id="SettingsPinError">Molimo konfigurirajte važeći 4-znamenkasti numerički PIN između 0000 i 9999 u postavkama aplikacije.</string> <string id="SettingsPin">Četveroznamenkasti pin koji će se koristiti za sve radnje koje zahtijevaju (0000-9999).</string>
<string id="SettingsTextAlign">Lijevo (isključeno) ili desno (uključeno) poravnanje izbornika.</string> <string id="SettingsPinError">Konfigurirajte valjani četveroznamenkasti numerički pin između 0000 i 9999 u postavkama aplikacije.</string>
<string id="LeftToRight">Slijeva na desno</string> <string id="SettingsTextAlign">Lijevo (isključeno) ili desno (ON) Poravnavanje izbornika.</string>
<string id="RightToLeft">Zdesna na lijevo</string> <string id="SettingsLeftToRight">Slijeva na desno</string>
<string id="SettingsRightToLeft">Desno lijevo</string>
<string id="SettingsWidgetStart">(Samo widget) Automatski pokrenite aplikaciju iz widgeta bez čekanja na dodir.</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="SettingsEnableBatteryLevel">Omogućite pozadinsku uslugu da pošalje podatke o bateriji uređaja, lokaciji i (ako su podržani) podatke o aktivnostima kod kuće.</string>
<string id="SettingsBatteryLevelRefreshRate">Brzina osvježavanja (u minutama) kojom bi pozadinska usluga trebala ponoviti slanje podataka.</string> <string id="SettingsBatteryLevelRefreshRate">Brzina osvježavanja (u minutama) u kojoj 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> <string id="SettingsUserHttpHeader">Korisnik isporučen HTTP zaglavlje</string>
<string id="SettingsUserHttpHeaderDescription">Neke instalacije kod kuće zahtijevaju specifikaciju prilagođenog HTTP zaglavlja kako bi funkcionirale.</string>
<string id="SettingsUserHttpHeaderName">Korisnik isporučen HTTP-Header: Ime</string>
<string id="SettingsUserHttpHeaderValue">Korisnik isporučen http-glava: Vrijednost</string>
<string id="SettingsClearWebhookId">Ponovno se povežite s kućnim pomoćnikom (Clear Webhook ID, pogledajte vodič za rješavanje problema).</string>
<string id="SettingsWebhookId">(Samo pročitajte) ID Webhooka stvorio je uređaj za ažuriranja pozadine. Možda će vam to trebati za uklanjanje pogrešaka.</string>
</strings> </strings>

View File

@@ -9,64 +9,76 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
<!-- <!--
Generated by Google Translate: English to Hungarian Generated by Google Translate: English to Hungarian
A Google Fordító generálta angoll A Google által generálta az angol nyelvről
--> -->
<strings> <strings>
<string id="ApiFlood">Az API-hívások túl gyorsak. Kérjük, lassítsa a kérések teljesítését.</string> <string id="ApiFlood">Az API túl gyorsan hív. Kérjük, lassítsa le kéréseit.</string>
<string id="ApiUrlNotFound">Az URL nem található. Lehetséges API URL hiba a beállításokban.</string> <string id="ApiUrlNotFound">URL nem található. Potenciális API URL -hiba a beállításokban.</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">Elérhető</string> <string id="Available" scope="glance">Elérhető</string>
<string id="Cached" scope="glance">Gyorsítótárban</string> <string id="Cached" scope="glance">Gyorsítótárazott</string>
<string id="Checking" scope="glance">Ellenőrzés...</string> <string id="Checking" scope="glance">Ellenőrzés ...</string>
<string id="ConfigUrlNotFound">Az URL nem található. Lehetséges konfigurációs URL hiba a beállításokban.</string> <string id="ConfigUrlNotFound">URL nem található. Potenciális konfigurációs URL -hiba a beállításokban.</string>
<string id="Confirm">Persze?</string> <string id="Confirm">Persze?</string>
<string id="Empty">Üres</string> <string id="Empty">Üres</string>
<string id="Executed" scope="glance">Megerősített</string> <string id="Executed" scope="glance">Megerősített</string>
<string id="GlanceMenu" scope="glance">Menü</string> <string id="GlanceMenu" scope="glance">Menü</string>
<string id="Memory" scope="glance">Memória</string> <string id="Memory" scope="glance">Emlékezet</string>
<string id="NoAPIKey" scope="glance">Nincs API kulcs az alkalmazás beállításaiban.</string> <string id="NoAPIKey" scope="glance">Nincs API -kulcs az alkalmazásbeállításokban.</string>
<string id="NoApiUrl" scope="glance">Nincs API URL az alkalmazás beállításai között.</string> <string id="NoApiUrl" scope="glance">Nincs API URL az alkalmazás beállításaiban.</string>
<string id="NoConfigUrl" scope="glance">Nincs konfigurációs URL az alkalmazás beállításai között.</string> <string id="NoConfigUrl" scope="glance">Nincs konfigurációs URL az alkalmazásbeállításokban.</string>
<string id="NoInternet">Nincs internet kapcsolat.</string> <string id="NoInternet">Nincs internetkapcsolat.</string>
<string id="NoJson">A HTTP-kérésből nem érkezett vissza JSON.</string> <string id="NoJson">A HTTP kérésből nem tért vissza JSON.</string>
<string id="NoPhone" scope="glance">Nincs telefonkapcsolat.</string> <string id="NoPhone" scope="glance">Nincs telefonkapcsolat.</string>
<string id="NoPhoneNoCache" scope="glance">Nincs telefonkapcsolat, nincs gyorsítótárazott menü.</string>
<string id="NoResponse">Nincs válasz, ellenőrizze az internetkapcsolatot</string> <string id="NoResponse">Nincs válasz, ellenőrizze az internetkapcsolatot</string>
<string id="PinInputLocked">A PIN-kód bevitele zárolva van</string> <string id="TimedOut">A kérés időzítve</string>
<string id="PotentialError">Lehetséges hiba</string> <string id="PinInputLocked">Pin -bemenetet zárva</string>
<string id="Seconds">másodpercig</string> <string id="PotentialError">Potenciális hiba</string>
<string id="TemplateError">Sablon hiba</string> <string id="Seconds">másodpercek</string>
<string id="TrailingSlashErr">Az API URL-címében nem szerepelhet perjel '/'.</string> <string id="TemplateError">Sablonhiba</string>
<string id="Unavailable" scope="glance">Nem elérhető</string> <string id="TrailingSlashErr">Az API URL -nek nem szabad végső perjelet kell tennie '/'.</string>
<string id="Unconfigured" scope="glance">Nincs konfigurálva</string> <string id="Unavailable" scope="glance">Nem érhető el</string>
<string id="UnhandledHttpErr">A HTTP-kérés = hibakódot adott vissza</string> <string id="Unconfigured" scope="glance">Nem konfigurálatlan</string>
<string id="WebhookFailed">Nem sikerült regisztrálni a Webhook-ot</string> <string id="UnhandledHttpErr">Http kérés visszaküldött hibakód =</string>
<string id="WrongPin">Hibás PIN</string> <string id="WebhookFailed">Nem sikerült regisztrálni a WebHook -ot</string>
<!-- A beállítások GUI-ban a karakterláncoknak a használatuk sorrendjében kell lenniük. --> <string id="WrongPin">Rossz csap</string>
<string id="SettingsSelect">Válassz...</string> <string id="WifiLteNotAvailable">Nincs elérhető Wi-Fi vagy LTE</string>
<string id="SettingsApiKey">API-kulcs a HomeAssistant számára.</string> <string id="WifiLtePrompt">Végrehajtás a Wi-Fi/LTE-n keresztül?</string>
<string id="SettingsApiKeyPrompt">Hosszú életű hozzáférési token.</string> <string id="WifiLteExecutionTitle">Küldés otthoni asszisztensnek.</string>
<string id="SettingsApiUrl">A HomeAssistant API URL-je.</string> <string id="WifiLteExecutionDataError">Nincs adat.</string>
<!-- A beállítások GUI -jához a karakterláncoknak a használt sorrendben kell lenniük. -->
<string id="SettingsSelect">Válassza ki ...</string>
<string id="SettingsApiKey">API kulcs a homeaSsistant -hoz.</string>
<string id="SettingsApiKeyPrompt">Hosszú élettartamú hozzáférési jogkivonó.</string>
<string id="SettingsApiUrl">URL a Homeassistant API -hoz.</string>
<string id="SettingsConfigUrl">URL a menükonfigurációhoz (JSON).</string> <string id="SettingsConfigUrl">URL a menükonfigurációhoz (JSON).</string>
<string id="SettingsCacheConfig">Az alkalmazásnak gyorsítótárba kell helyeznie a menü konfigurációt?</string> <string id="SettingsCacheConfig">Az alkalmazásnak gyorsítótáraznia kell a menükonfigurációt?</string>
<string id="SettingsClearCache">Törölje az alkalmazásnak a meglévő gyorsítótárat a következő indításakor?</string> <string id="SettingsClearCache">Az alkalmazásnak törölnie kell -e a meglévő gyorsítótárat a következő indításkor?</string>
<string id="SettingsVibration">Az alkalmazásnak rezgésekkel kell visszajelzést adnia?</string> <string id="SettingsWifiLteExecutionEnable">Engedélyezze a parancsok végrehajtási végrehajtását a Wi-Fi/LTE-n keresztül.</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="SettingsVibration">Az alkalmazásnak visszacsatolást kell adnia a rezgések révé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="SettingsAppTimeout">Időtúllépés másodpercek alatt. Az eszköz akkumulátorának mentése érdekében kilépjen az alkalmazásból az inaktivitás után.</string>
<string id="SettingsConfirmTimeout">Ezen idő eltelvel (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="SettingsPollDelay">További közvélemény -kutatási késleltetés (másodpercek alatt). Hozzáad egy késleltetést az összes menüelem állapotfrissítése között.</string>
<string id="SettingsPin">4 számjegyű PIN-kód, amelyet minden megerősítést igénylő művelethez kell használni (0000-9999).</string> <string id="SettingsConfirmTimeout">Ezen idő után (másodpercben) egy akció megerősítő párbeszédpanelje automatikusan bezáródik, és a műveletet töröljük. Állítsa 0 -ra az időtúllépés letiltásához.</string>
<string id="SettingsPinError">Adjon meg egy érvényes, 4 számjegyű PIN-kódot 0000 és 9999 között az alkalmazás beállításaiban.</string> <string id="SettingsPin">4 számjegyű PIN-kódot, amelyet minden szükséges művelethez használni kell (0000-9999).</string>
<string id="SettingsTextAlign">Balra (ki) vagy Jobbra (be) Menüigazítás.</string> <string id="SettingsPinError">Kérjük, konfiguráljon egy érvényes négyjegyű numerikus csapot 0000 és 9999 között az alkalmazás beállításaiban.</string>
<string id="LeftToRight">Balról jobbra</string> <string id="SettingsTextAlign">Balra (ki) vagy jobb (be (be) menü igazítás.</string>
<string id="RightToLeft">Jobbról balra</string> <string id="SettingsLeftToRight">Balról jobbra</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="SettingsRightToLeft">Jobbról balra</string>
<string id="SettingsEnableBatteryLevel">Engedélyezze a háttérszolgáltatást, hogy elküldje az eszköz akkumulátorának töltöttségi szintjét, helyét és (ha támogatott) tevékenységi adatait a Home Assistantnek.</string> <string id="SettingsWidgetStart">(Csak widget) automatikusan indítsa el az alkalmazást a widgetről, anélkül, hogy megérintené a csapot.</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="SettingsEnableBatteryLevel">Engedélyezze, hogy a háttérszolgáltatás az eszköz akkumulátorának szintjét, helyét és (ha támogatott) tevékenységi adatait elküldje az otthoni asszisztensnek.</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> <string id="SettingsBatteryLevelRefreshRate">A háttérszolgáltatásnak a küldési adatokkal kell megismételnie a frissítési arányt (percekben).</string>
<string id="SettingsUserHttpHeader">A felhasználó szállított HTTP fejléc</string>
<string id="SettingsUserHttpHeaderDescription">Néhány otthoni asszisztens telepítéshez a működéshez egyéni HTTP fejléc meghatározására van szükség.</string>
<string id="SettingsUserHttpHeaderName">A felhasználó szállított HTTP-fejléc: Név</string>
<string id="SettingsUserHttpHeaderValue">A felhasználó szállított HTTP-fejléc: Érték</string>
<string id="SettingsClearWebhookId">Csatlakozzon újra az otthoni asszisztenshez (törölje a WebHook azonosítóját, lásd a hibaelhárítási útmutatót).</string>
<string id="SettingsWebhookId">(Csak olvassa el) Az eszköz által létrehozott webhook azonosító a háttérszolgáltatás frissítéseihez. Lehet, hogy ezt a hibakereséshez szükség lehet.</string>
</strings> </strings>

View File

@@ -9,64 +9,76 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
<!-- <!--
Generated by Google Translate: English to Indonesian Generated by Google Translate: English to Indonesian
Dihasilkan oleh Google Translate dari bahasa Inggris Dihasilkan oleh google translate dari bahasa Inggris
--> -->
<strings> <strings>
<string id="ApiFlood">Panggilan API terlalu cepat. Harap perlambat permintaan Anda.</string> <string id="ApiFlood">API memanggil terlalu cepat. Harap memperlambat permintaan Anda.</string>
<string id="ApiUrlNotFound">URL tidak ditemukan. Kemungkinan kesalahan URL API dalam pengaturan.</string> <string id="ApiUrlNotFound">URL tidak ditemukan. Potensi API URL Kesalahan dalam Pengaturan.</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">Tersedia</string> <string id="Available" scope="glance">Tersedia</string>
<string id="Cached" scope="glance">Disimpan dalam cache</string> <string id="Cached" scope="glance">Di -cache</string>
<string id="Checking" scope="glance">Memeriksa...</string> <string id="Checking" scope="glance">Memeriksa ...</string>
<string id="ConfigUrlNotFound">URL tidak ditemukan. Kemungkinan kesalahan Konfigurasi URL dalam pengaturan.</string> <string id="ConfigUrlNotFound">URL tidak ditemukan. Potensi Konfigurasi URL Kesalahan dalam Pengaturan.</string>
<string id="Confirm">Tentu?</string> <string id="Confirm">Tentu?</string>
<string id="Empty">Kosong</string> <string id="Empty">Kosong</string>
<string id="Executed" scope="glance">Dikonfirmasi</string> <string id="Executed" scope="glance">Dikonfirmasi</string>
<string id="GlanceMenu" scope="glance">Menu</string> <string id="GlanceMenu" scope="glance">Menu</string>
<string id="Memory" scope="glance">Ingatan</string> <string id="Memory" scope="glance">Ingatan</string>
<string id="NoAPIKey" scope="glance">Tidak ada kunci API dalam pengaturan aplikasi.</string> <string id="NoAPIKey" scope="glance">Tidak ada kunci API di pengaturan aplikasi.</string>
<string id="NoApiUrl" scope="glance">Tidak ada URL API di pengaturan aplikasi.</string> <string id="NoApiUrl" scope="glance">Tidak ada URL API di pengaturan aplikasi.</string>
<string id="NoConfigUrl" scope="glance">Tidak ada URL konfigurasi dalam pengaturan aplikasi.</string> <string id="NoConfigUrl" scope="glance">Tidak ada URL konfigurasi di pengaturan aplikasi.</string>
<string id="NoInternet">Tidak ada koneksi internet.</string> <string id="NoInternet">Tidak ada koneksi internet.</string>
<string id="NoJson">Tidak ada JSON yang dikembalikan dari permintaan HTTP.</string> <string id="NoJson">Tidak ada JSON yang kembali dari permintaan HTTP.</string>
<string id="NoPhone" scope="glance">Tidak ada koneksi telepon.</string> <string id="NoPhone" scope="glance">Tidak ada koneksi telepon.</string>
<string id="NoResponse">Tidak ada Respon, periksa koneksi internet</string> <string id="NoPhoneNoCache" scope="glance">Tidak ada koneksi telepon, tidak ada menu yang di -cache.</string>
<string id="PinInputLocked">Input PIN terkunci untuk</string> <string id="NoResponse">Tidak ada tanggapan, periksa koneksi internet</string>
<string id="PotentialError">Potensi Kesalahan</string> <string id="TimedOut">Meminta waktu</string>
<string id="PinInputLocked">Input pin terkunci</string>
<string id="PotentialError">Kesalahan potensial</string>
<string id="Seconds">detik</string> <string id="Seconds">detik</string>
<string id="TemplateError">Kesalahan Template</string> <string id="TemplateError">Kesalahan template</string>
<string id="TrailingSlashErr">URL API tidak boleh memiliki garis miring '/' di akhir.</string> <string id="TrailingSlashErr">URL API tidak boleh memiliki tebasan trailing '/'.</string>
<string id="Unavailable" scope="glance">Tidak tersedia</string> <string id="Unavailable" scope="glance">Tidak tersedia</string>
<string id="Unconfigured" scope="glance">Tidak dikonfigurasi</string> <string id="Unconfigured" scope="glance">Tidak dikonfigurasikan</string>
<string id="UnhandledHttpErr">Permintaan HTTP mengembalikan kode kesalahan =</string> <string id="UnhandledHttpErr">Permintaan HTTP Kode kesalahan dikembalikan =</string>
<string id="WebhookFailed">Gagal mendaftarkan Webhook</string> <string id="WebhookFailed">Gagal Mendaftar Webhook</string>
<string id="WrongPin">PIN salah</string> <string id="WrongPin">Pin yang salah</string>
<!-- Untuk pengaturan GUI, string harus sesuai urutan penggunaannya. --> <string id="WifiLteNotAvailable">Tidak ada Wi-Fi atau LTE yang tersedia</string>
<string id="WifiLtePrompt">Jalankan melalui Wi-Fi/LTE?</string>
<string id="WifiLteExecutionTitle">Mengirim ke asisten rumah.</string>
<string id="WifiLteExecutionDataError">Tidak ada data yang diterima.</string>
<!-- Untuk pengaturan GUI, string harus sesuai urutan yang digunakan. -->
<string id="SettingsSelect">Memilih...</string> <string id="SettingsSelect">Memilih...</string>
<string id="SettingsApiKey">Kunci API untuk HomeAssistant.</string> <string id="SettingsApiKey">Kunci API untuk Homeassistant.</string>
<string id="SettingsApiKeyPrompt">Token Akses Jangka Panjang.</string> <string id="SettingsApiKeyPrompt">Token akses berumur panjang.</string>
<string id="SettingsApiUrl">URL untuk HomeAssistant API.</string> <string id="SettingsApiUrl">URL untuk API homeassistant.</string>
<string id="SettingsConfigUrl">URL untuk konfigurasi menu (JSON).</string> <string id="SettingsConfigUrl">URL untuk Konfigurasi Menu (JSON).</string>
<string id="SettingsCacheConfig">Haruskah aplikasi menyimpan konfigurasi menu dalam cache?</string> <string id="SettingsCacheConfig">Haruskah Aplikasi Menyimpan Konfigurasi Menu?</string>
<string id="SettingsClearCache">Haruskah aplikasi menghapus cache yang ada saat dijalankan berikutnya?</string> <string id="SettingsClearCache">Haruskah aplikasi menghapus cache yang ada lain kali dimulai?</string>
<string id="SettingsWifiLteExecutionEnable">Aktifkan Perintah yang Mengeksekusi melalui Wi-Fi/LTE.</string>
<string id="SettingsVibration">Haruskah aplikasi memberikan umpan balik melalui getaran?</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="SettingsAppTimeout">Batas waktu dalam hitungan detik. Keluar dari aplikasi setelah periode tidak aktif ini untuk menyimpan baterai perangkat.</string>
<string id="SettingsPollDelay">Penundaan polling tambahan (dalam detik). Menambahkan penundaan antara pembaruan status semua item menu.</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 akan ditutup secara otomatis dan tindakan tersebut dibatalkan. Atur ke 0 untuk menonaktifkan batas waktu.</string> <string id="SettingsConfirmTimeout">Setelah waktu ini (dalam hitungan detik), dialog konfirmasi untuk suatu tindakan ditutup secara otomatis dan tindakan dibatalkan. Diatur ke 0 untuk menonaktifkan batas waktu.</string>
<string id="SettingsPin">PIN 4 digit yang akan digunakan untuk semua tindakan yang memerlukan konfirmasi (0000-9999).</string> <string id="SettingsPin">PIN 4 digit untuk digunakan untuk semua tindakan yang memerlukannya (0000-9999).</string>
<string id="SettingsPinError">Harap konfigurasikan PIN numerik 4 digit yang valid antara 0000 dan 9999 dalam pengaturan aplikasi.</string> <string id="SettingsPinError">Harap konfigurasikan pin numerik 4 digit yang valid antara 0000 dan 9999 di pengaturan aplikasi.</string>
<string id="SettingsTextAlign">Penyelarasan Menu Kiri (nonaktif) atau Kanan (aktif).</string> <string id="SettingsTextAlign">Left (off) atau Alignment Menu Left (Off) atau Right (ON).</string>
<string id="LeftToRight">Kiri ke kanan</string> <string id="SettingsLeftToRight">Kiri ke kanan</string>
<string id="RightToLeft">Kanan ke Kiri</string> <string id="SettingsRightToLeft">Kanan ke kiri</string>
<string id="SettingsWidgetStart">(Hanya widget) Secara otomatis memulai aplikasi dari widget tanpa menunggu ketukan.</string> <string id="SettingsWidgetStart">(Hanya widget) secara otomatis memulai aplikasi dari widget tanpa menunggu keran.</string>
<string id="SettingsEnableBatteryLevel">Aktifkan layanan latar belakang untuk mengirim tingkat baterai perangkat, lokasi, dan (jika didukung) data aktivitas ke Home Assistant.</string> <string id="SettingsEnableBatteryLevel">Aktifkan layanan latar belakang untuk mengirim data baterai perangkat, lokasi, dan (jika didukung) data ke rumah asisten.</string>
<string id="SettingsBatteryLevelRefreshRate">Kecepatan penyegaran (dalam menit) di mana layanan latar belakang harus mengulang pengiriman data.</string> <string id="SettingsBatteryLevelRefreshRate">Tingkat refresh (dalam hitungan menit) di mana layanan latar belakang harus mengulang data pengiriman.</string>
<string id="WebhookId">(Hanya baca) ID Webhook yang dibuat oleh perangkat untuk pembaruan layanan latar belakang. Anda mungkin memerlukannya untuk debugging.</string> <string id="SettingsUserHttpHeader">Pengguna yang disediakan header http</string>
<string id="SettingsUserHttpHeaderDescription">Beberapa instalasi asisten rumah memerlukan spesifikasi header HTTP khusus untuk berfungsi.</string>
<string id="SettingsUserHttpHeaderName">Pengguna yang disediakan http-header: nama</string>
<string id="SettingsUserHttpHeaderValue">Pengguna yang disediakan http-header: nilai</string>
<string id="SettingsClearWebhookId">Terhubung kembali ke asisten rumah (Clear Webhook ID, lihat Panduan Pemecahan Masalah).</string>
<string id="SettingsWebhookId">(Baca saja) ID WebHook yang dibuat oleh perangkat untuk pembaruan layanan latar belakang. Anda mungkin memerlukan ini untuk debugging.</string>
</strings> </strings>

View File

@@ -9,7 +9,7 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
@@ -19,13 +19,13 @@
--> -->
<strings> <strings>
<string id="ApiFlood">Chiamate API troppo rapide. Rallenta le tue richieste.</string> <string id="ApiFlood">API chiama troppo rapidamente. Si prega di rallentare le tue richieste.</string>
<string id="ApiUrlNotFound">URL non trovato. Possibile errore URL API nelle impostazioni.</string> <string id="ApiUrlNotFound">URL non trovato. Potenziale errore URL API nelle impostazioni.</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">Disponibile</string> <string id="Available" scope="glance">Disponibile</string>
<string id="Cached" scope="glance">Memorizzato nella cache</string> <string id="Cached" scope="glance">Cache</string>
<string id="Checking" scope="glance">Controllo in corso...</string> <string id="Checking" scope="glance">Controllo ...</string>
<string id="ConfigUrlNotFound">URL non trovato. Possibile errore URL di configurazione nelle impostazioni.</string> <string id="ConfigUrlNotFound">URL non trovato. Errore URL di configurazione potenziale nelle impostazioni.</string>
<string id="Confirm">Sicuro?</string> <string id="Confirm">Sicuro?</string>
<string id="Empty">Vuoto</string> <string id="Empty">Vuoto</string>
<string id="Executed" scope="glance">Confermato</string> <string id="Executed" scope="glance">Confermato</string>
@@ -35,38 +35,50 @@
<string id="NoApiUrl" scope="glance">Nessun URL API nelle impostazioni dell'applicazione.</string> <string id="NoApiUrl" scope="glance">Nessun URL API nelle impostazioni dell'applicazione.</string>
<string id="NoConfigUrl" scope="glance">Nessun URL di configurazione nelle impostazioni dell'applicazione.</string> <string id="NoConfigUrl" scope="glance">Nessun URL di configurazione nelle impostazioni dell'applicazione.</string>
<string id="NoInternet">Nessuna connessione Internet.</string> <string id="NoInternet">Nessuna connessione Internet.</string>
<string id="NoJson">Nessun JSON restituito dalla richiesta HTTP.</string> <string id="NoJson">Nessun JSON è tornato dalla richiesta HTTP.</string>
<string id="NoPhone" scope="glance">Nessuna connessione telefonica.</string> <string id="NoPhone" scope="glance">Nessuna connessione telefonica.</string>
<string id="NoPhoneNoCache" scope="glance">Nessuna connessione telefonica, nessun menu memorizzato nella cache.</string>
<string id="NoResponse">Nessuna risposta, controlla la connessione Internet</string> <string id="NoResponse">Nessuna risposta, controlla la connessione Internet</string>
<string id="PinInputLocked">Inserimento PIN bloccato per</string> <string id="TimedOut">Richiesta scaduta</string>
<string id="PotentialError">Errore potenziale</string> <string id="PinInputLocked">Ingresso pin bloccato per</string>
<string id="Seconds">secondi</string> <string id="PotentialError">Potenziale errore</string>
<string id="Seconds">Secondi</string>
<string id="TemplateError">Errore modello</string> <string id="TemplateError">Errore modello</string>
<string id="TrailingSlashErr">L'URL dell'API non deve contenere la barra finale '/'.</string> <string id="TrailingSlashErr">API URL non deve avere una barra trailing '/'.</string>
<string id="Unavailable" scope="glance">Non disponibile</string> <string id="Unavailable" scope="glance">Non disponibile</string>
<string id="Unconfigured" scope="glance">Non configurato</string> <string id="Unconfigured" scope="glance">Non configurato</string>
<string id="UnhandledHttpErr">La richiesta HTTP ha restituito il codice di errore =</string> <string id="UnhandledHttpErr">Richiesta HTTP restituito Codice di errore =</string>
<string id="WebhookFailed">Impossibile registrare il webhook</string> <string id="WebhookFailed">Impossibile registrare Webhook</string>
<string id="WrongPin">PIN errato</string> <string id="WrongPin">Pin sbagliato</string>
<!-- Per l'interfaccia utente grafica delle impostazioni, le stringhe devono essere nell'ordine in cui vengono utilizzate. --> <string id="WifiLteNotAvailable">Nessun Wi-Fi o LTE disponibile</string>
<string id="WifiLtePrompt">Eseguire su Wi-Fi/LTE?</string>
<string id="WifiLteExecutionTitle">Invio all'assistente di casa.</string>
<string id="WifiLteExecutionDataError">Nessun dato ricevuto.</string>
<!-- Per le impostazioni della GUI, le stringhe dovrebbero essere nell'ordine in cui vengono utilizzate. -->
<string id="SettingsSelect">Selezionare...</string> <string id="SettingsSelect">Selezionare...</string>
<string id="SettingsApiKey">Chiave API per HomeAssistant.</string> <string id="SettingsApiKey">Chiave API per HomeAssistant.</string>
<string id="SettingsApiKeyPrompt">Token di accesso di lunga durata.</string> <string id="SettingsApiKeyPrompt">Token di accesso di lunga durata.</string>
<string id="SettingsApiUrl">URL per l'API HomeAssistant.</string> <string id="SettingsApiUrl">URL per API HomeAssistant.</string>
<string id="SettingsConfigUrl">URL per la configurazione del menu (JSON).</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="SettingsCacheConfig">L'applicazione dovrebbe memorizzare la cache della configurazione del menu?</string>
<string id="SettingsClearCache">La prossima volta che l'applicazione viene avviata, deve cancellare la cache esistente?</string> <string id="SettingsClearCache">L'applicazione dovrebbe cancellare la cache esistente la prossima volta che viene avviata?</string>
<string id="SettingsWifiLteExecutionEnable">Abilita l'esecuzione dei comandi su Wi-Fi/LTE.</string>
<string id="SettingsVibration">L'applicazione dovrebbe fornire feedback tramite vibrazioni?</string> <string id="SettingsVibration">L'applicazione dovrebbe fornire feedback tramite vibrazioni?</string>
<string id="SettingsAppTimeout">Timeout in secondi. Esci dall'applicazione dopo questo periodo di inattività per risparmiare la batteria del dispositivo.</string> <string id="SettingsAppTimeout">Timeout in secondi. Esci dall'applicazione dopo questo periodo di inattività per salvare la batteria del dispositivo.</string>
<string id="SettingsPollDelay">Ritardo di polling aggiuntivo (in secondi). Aggiunge un ritardo tra l'aggiornamento dello stato di tutte le voci di menu.</string> <string id="SettingsPollDelay">Ritardo del sondaggio aggiuntivo (in secondi). Aggiunge un ritardo tra l'aggiornamento dello stato di tutte le voci di menu.</string>
<string id="SettingsConfirmTimeout">Dopo questo tempo (in secondi), una finestra di dialogo di conferma per un'azione viene automaticamente chiusa e l'azione viene annullata. Impostare su 0 per disabilitare il timeout.</string> <string id="SettingsConfirmTimeout">Dopo questo periodo (in secondi), una finestra di dialogo di conferma per un'azione viene automaticamente chiusa e l'azione viene annullata. Impostare su 0 per disabilitare il timeout.</string>
<string id="SettingsPin">PIN a 4 cifre da utilizzare per tutte le azioni che richiedono conferma (0000-9999).</string> <string id="SettingsPin">Pin a 4 cifre da utilizzare per tutte le azioni che lo richiedono (0000-9999).</string>
<string id="SettingsPinError">Configurare un PIN numerico valido a 4 cifre compreso tra 0000 e 9999 nelle impostazioni dell'applicazione.</string> <string id="SettingsPinError">Configurare un pin numerico a 4 cifre valido tra 0000 e 9999 nelle impostazioni dell'applicazione.</string>
<string id="SettingsTextAlign">Allineamento del menu a sinistra (disattivato) o a destra (attivato).</string> <string id="SettingsTextAlign">Allineamento del menu a sinistra (OFF) o destro (ON).</string>
<string id="LeftToRight">Da sinistra a destra</string> <string id="SettingsLeftToRight">Da sinistra a destra</string>
<string id="RightToLeft">Da destra a sinistra</string> <string id="SettingsRightToLeft">Da destra a sinistra</string>
<string id="SettingsWidgetStart">(Solo widget) Avvia automaticamente l'applicazione dal widget senza attendere un tocco.</string> <string id="SettingsWidgetStart">(Solo widget) Avviare automaticamente l'applicazione dal widget senza aspettare un tocco.</string>
<string id="SettingsEnableBatteryLevel">Abilita il servizio in background per inviare i dati relativi al livello della batteria, alla posizione e (se supportati) all'attività del dispositivo a Home Assistant.</string> <string id="SettingsEnableBatteryLevel">Abilita il servizio di fondo per inviare i dati di attivi della batteria, posizione e (se supportati) ad Assistente Home Assistant.</string>
<string id="SettingsBatteryLevelRefreshRate">Frequenza di aggiornamento (in minuti) alla quale il servizio in background dovrebbe ripetere l'invio dei dati.</string> <string id="SettingsBatteryLevelRefreshRate">La frequenza di aggiornamento (in minuti) in cui il servizio di fondo deve ripetere l'invio di 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> <string id="SettingsUserHttpHeader">Intestazione HTTP fornita dall'utente</string>
<string id="SettingsUserHttpHeaderDescription">Alcune installazioni di assistenti domestici richiedono la specifica di un'intestazione HTTP personalizzata per funzionare.</string>
<string id="SettingsUserHttpHeaderName">Utente fornito HTTP-HEADER: nome</string>
<string id="SettingsUserHttpHeaderValue">Utente fornito HTTP-HEADER: valore</string>
<string id="SettingsClearWebhookId">Riconnettiti a Home Assistant (Clear Webhook ID, vedi Guida alla risoluzione dei problemi).</string>
<string id="SettingsWebhookId">(Solo lettura) L'ID WebHook creato dal dispositivo per gli aggiornamenti del servizio in background. Potresti richiederlo per il debug.</string>
</strings> </strings>

View File

@@ -9,64 +9,76 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
<!-- <!--
Generated by Google Translate: English to Japanese Generated by Google Translate: English to Japanese
Google翻訳によ英語から生成 Google翻訳によって英語から生成されました
--> -->
<strings> <strings>
<string id="ApiFlood">API 呼び出しが速すぎます。リクエストの速度を落としてください。</string> <string id="ApiFlood">API速すぎます。リクエストを遅くしてください。</string>
<string id="ApiUrlNotFound">URL が見つかりません。設定API URL エラーが発生する可能性があります</string> <string id="ApiUrlNotFound">URLが見つかりません。設定の潜在的なAPI URLエラー。</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">利用可能</string> <string id="Available" scope="glance">利用可能</string>
<string id="Cached" scope="glance">キャッシュ済み</string> <string id="Cached" scope="glance">キャッシュ</string>
<string id="Checking" scope="glance">チェック中...</string> <string id="Checking" scope="glance">チェック中...</string>
<string id="ConfigUrlNotFound">URL が見つかりません。設定構成 URL エラーが発生する可能性があります</string> <string id="ConfigUrlNotFound">URLが見つかりません。設定の潜在的な構成URLエラー。</string>
<string id="Confirm">もちろん?</string> <string id="Confirm">もちろん?</string>
<string id="Empty">空の</string> <string id="Empty">空の</string>
<string id="Executed" scope="glance">確認済み</string> <string id="Executed" scope="glance">確認済み</string>
<string id="GlanceMenu" scope="glance">メニュー</string> <string id="GlanceMenu" scope="glance">メニュー</string>
<string id="Memory" scope="glance">メモリ</string> <string id="Memory" scope="glance">メモリ</string>
<string id="NoAPIKey" scope="glance">アプリケーション設定に API キーありません。</string> <string id="NoAPIKey" scope="glance">アプリケーション設定にAPIキーありません。</string>
<string id="NoApiUrl" scope="glance">アプリケーション設定に API URLありません。</string> <string id="NoApiUrl" scope="glance">アプリケーション設定にAPI URLありません。</string>
<string id="NoConfigUrl" scope="glance">アプリケーション設定に構成 URLありません。</string> <string id="NoConfigUrl" scope="glance">アプリケーション設定に構成URLありません。</string>
<string id="NoInternet">インターネット接続できません。</string> <string id="NoInternet">インターネット接続はありません。</string>
<string id="NoJson">HTTP リクエストから JSON が返されません。</string> <string id="NoJson">JSONはHTTPリクエストから返されませんでした</string>
<string id="NoPhone" scope="glance">電話接続ありません。</string> <string id="NoPhone" scope="glance">電話接続ありません。</string>
<string id="NoResponse">応答なし。インターネット接続を確認してください</string> <string id="NoPhoneNoCache" scope="glance">電話接続、キャッシュメニューはありません。</string>
<string id="PinInputLocked">PIN入力がロックされました</string> <string id="NoResponse">応答なし、インターネット接続を確認してください</string>
<string id="TimedOut">リクエストがタイムアウトします</string>
<string id="PinInputLocked">PIN入力がロックされています</string>
<string id="PotentialError">潜在的なエラー</string> <string id="PotentialError">潜在的なエラー</string>
<string id="Seconds"></string> <string id="Seconds"></string>
<string id="TemplateError">テンプレートエラー</string> <string id="TemplateError">テンプレートエラー</string>
<string id="TrailingSlashErr">API URL の末尾にスラッシュ「/」を含めることはできません</string> <string id="TrailingSlashErr">API URLには、トレーリングスラッシュ '/'が必要です</string>
<string id="Unavailable" scope="glance">利用不可</string> <string id="Unavailable" scope="glance">利用できません</string>
<string id="Unconfigured" scope="glance">未設定</string> <string id="Unconfigured" scope="glance">構成されていない</string>
<string id="UnhandledHttpErr">HTTP リクエストがエラーコードを返しました =</string> <string id="UnhandledHttpErr">http要求はエラーコードを返しました=</string>
<string id="WebhookFailed">Webhook の登録に失敗しました</string> <string id="WebhookFailed">Webhookの登録に失敗しました</string>
<string id="WrongPin">PINが間違っています</string> <string id="WrongPin">間違ったピン</string>
<!-- 設定 GUI の場合、文字列は使用される順序に従う必要があります。 --> <string id="WifiLteNotAvailable">Wi-FiまたはLTEは利用できません</string>
<string id="WifiLtePrompt">wi-fi/lte経由で実行しますか</string>
<string id="WifiLteExecutionTitle">ホームアシスタントに送る。</string>
<string id="WifiLteExecutionDataError">受信したデータはありません。</string>
<!-- 設定GUIの場合、文字列は使用される順序である必要があります。 -->
<string id="SettingsSelect">選択...</string> <string id="SettingsSelect">選択...</string>
<string id="SettingsApiKey">HomeAssistantAPI キー。</string> <string id="SettingsApiKey">HomeassistantAPIキー。</string>
<string id="SettingsApiKeyPrompt">期有効アクセス トークン。</string> <string id="SettingsApiKeyPrompt">寿命のアクセストークン。</string>
<string id="SettingsApiUrl">HomeAssistant APIURL。</string> <string id="SettingsApiUrl">Homeassistant APIURL。</string>
<string id="SettingsConfigUrl">メニュー設定の URL (JSON)</string> <string id="SettingsConfigUrl">メニュー構成用のURLJSON</string>
<string id="SettingsCacheConfig">アプリケーションはメニュー構成をキャッシュする必要がありますか?</string> <string id="SettingsCacheConfig">アプリケーションはメニュー構成をキャッシュする必要がありますか</string>
<string id="SettingsClearCache">アプリケーションは次回起動時に既存のキャッシュをクリアする必要がありますか?</string> <string id="SettingsClearCache">次回開始時にアプリケーション既存のキャッシュをクリアする必要がありますか</string>
<string id="SettingsVibration">アプリケーションは振動によるフィードバックを提供する必要がありますか?</string> <string id="SettingsWifiLteExecutionEnable">Wi-Fi/LTEを介してコマンドを実行できるようにします。</string>
<string id="SettingsAppTimeout">タイムアウトは秒単位で行われます。デバイスのバッテリーを節約するために、この時間操作が行われなかったらアプリケーションを終了してください。</string> <string id="SettingsVibration">アプリケーションは振動を介してフィードバックを提供する必要がありますか?</string>
<string id="SettingsPollDelay">追加のポーリング遅延 (秒単位)。すべてのメニュー項目のステータス更新の間に遅延を追加します。</string> <string id="SettingsAppTimeout">数秒でタイムアウト。デバイスバッテリーを保存するために、この不活性期間の後にアプリケーションを終了します。</string>
<string id="SettingsConfirmTimeout">この時間 (秒単位) が経過すると、アクションの確認ダイアログが自動的に閉じられ、アクションがキャンセルされます。タイムアウトを無効にするには 0 に設定します。</string> <string id="SettingsPollDelay">追加の投票遅延(秒単位)。すべてのメニュー項目のステータス更新間に遅延を追加します。</string>
<string id="SettingsPin">確認が必要なすべてのアクションに使用する 4 桁の PIN (0000 9999)</string> <string id="SettingsConfirmTimeout">この時間の後、アクションの確認ダイアログが自動的に閉じられ、アクションがキャンセルされます。タイムアウトを無効にするために0に設定します</string>
<string id="SettingsPinError">アプリケーション設定で、0000 9999 の間の有効な 4 桁の数字 PIN を設定してください</string> <string id="SettingsPin">4桁のピンは、それを必要とするすべてのアクションに使用されます0000-9999</string>
<string id="SettingsTextAlign">メニューの配置を左 (オフ) または右 (オン) にします</string> <string id="SettingsPinError">アプリケーション設定で0000〜9999の間に有効な4桁の数値ピンを構成してください</string>
<string id="LeftToRight">左から右へ</string> <string id="SettingsTextAlign">左(オフ)または右(オン)メニューアライメント。</string>
<string id="RightToLeft">から左へ</string> <string id="SettingsLeftToRight">から</string>
<string id="SettingsWidgetStart">(ウィジェットのみ) タップを待たずにウィジェットからアプリケーションを自動的に起動します。</string> <string id="SettingsRightToLeft">右から左</string>
<string id="SettingsEnableBatteryLevel">バックグラウンド サービスを有効にして、デバイスのバッテリー レベル、位置情報、および (サポートされている場合) アクティビティ データを Home Assistant に送信します。</string> <string id="SettingsWidgetStart">(ウィジェットのみ)タップを待たずにウィジェットからアプリケーションを自動的に起動します。</string>
<string id="SettingsBatteryLevelRefreshRate">バックグラウンド サービスがデータの送信を繰り返す更新レート (分単位)</string> <string id="SettingsEnableBatteryLevel">バックグラウンドサービスがデバイスのバッテリーレベル、場所、および(サポートされている場合)アクティビティデータをホームアシスタントに送信できるようにします</string>
<string id="WebhookId">(読み取り専用) バックグラウンド サービス更新用にデバイスによって作成された Webhook ID。デバッグに必要になる場合があります</string> <string id="SettingsBatteryLevelRefreshRate">バックグラウンドサービスがデータの送信を繰り返す必要があるリフレッシュレート(数分単位)</string>
<string id="SettingsUserHttpHeader">ユーザーが提供したHTTPヘッダー</string>
<string id="SettingsUserHttpHeaderDescription">一部のホームアシスタントインストールでは、機能するためにカスタムHTTPヘッダーの仕様が必要です。</string>
<string id="SettingsUserHttpHeaderName">ユーザーが提供したhttp-headername</string>
<string id="SettingsUserHttpHeaderValue">ユーザーが提供したhttp-headervalue</string>
<string id="SettingsClearWebhookId">ホームアシスタントに再接続しますClear WebHook ID、トラブルシューティングガイドを参照</string>
<string id="SettingsWebhookId">読み取り専用バックグラウンドサービスの更新のためにデバイスによって作成されたWebHook ID。デバッグにこれが必要になる場合があります。</string>
</strings> </strings>

View File

@@ -9,64 +9,76 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
<!-- <!--
Generated by Google Translate: English to Korean Generated by Google Translate: English to Korean
영어에서 Google Translate로 생성됨 영어에서 Google Translate에 의해 생성됩니다
--> -->
<strings> <strings>
<string id="ApiFlood">API 호출이 너무 빠릅니다. 요청 속도를 늦춰주세요.</string> <string id="ApiFlood">API 너무 빠르게 전화합니다. 요청을 늦추십시오.</string>
<string id="ApiUrlNotFound">URL을 찾을 수 없습니다. 설정에 잠재적인 API URL 오류가 있습니다.</string> <string id="ApiUrlNotFound">URL을 찾을 수 없습니다. 설정에 잠재적 인 API URL 오류.</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">사용 가능</string> <string id="Available" scope="glance">사용 가능</string>
<string id="Cached" scope="glance">캐시</string> <string id="Cached" scope="glance">캐시</string>
<string id="Checking" scope="glance">확인 ...</string> <string id="Checking" scope="glance">확인 ...</string>
<string id="ConfigUrlNotFound">URL을 찾을 수 없습니다. 설정에서 잠재적 구성 URL 오류.</string> <string id="ConfigUrlNotFound">URL을 찾을 수 없습니다. 설정 잠재적 구성 URL 오류.</string>
<string id="Confirm">확신하는?</string> <string id="Confirm">확신하는?</string>
<string id="Empty">비어 있는</string> <string id="Empty">비어 있는</string>
<string id="Executed" scope="glance">확인</string> <string id="Executed" scope="glance">확인</string>
<string id="GlanceMenu" scope="glance">메뉴</string> <string id="GlanceMenu" scope="glance">메뉴</string>
<string id="Memory" scope="glance">메모리</string> <string id="Memory" scope="glance">메모리</string>
<string id="NoAPIKey" scope="glance">애플리케이션 설정에 API 키가 없습니다.</string> <string id="NoAPIKey" scope="glance">응용 프로그램 설정에 API 키가 없습니다.</string>
<string id="NoApiUrl" scope="glance">애플리케이션 설정에 API URL이 없습니다.</string> <string id="NoApiUrl" scope="glance">응용 프로그램 설정에 API URL이 없습니다.</string>
<string id="NoConfigUrl" scope="glance">애플리케이션 설정에 구성 URL이 없습니다.</string> <string id="NoConfigUrl" scope="glance">응용 프로그램 설정에 구성 URL이 없습니다.</string>
<string id="NoInternet">인터넷 연결되지 않았습니다.</string> <string id="NoInternet">인터넷 연결이 없습니다.</string>
<string id="NoJson">HTTP 요청에서 JSON이 반환되지 않았습니다.</string> <string id="NoJson">HTTP 요청에서 JSON이 반환되지 않았습니다.</string>
<string id="NoPhone" scope="glance">전화 연결되지 않았습니다.</string> <string id="NoPhone" scope="glance">전화 연결이 없습니다.</string>
<string id="NoResponse">응답 없음, 인터넷 연결을 확인하세요</string> <string id="NoPhoneNoCache" scope="glance">전화 연결이없고 캐시 메뉴가 없습니다.</string>
<string id="PinInputLocked">PIN 입력이 잠겼습니다</string> <string id="NoResponse">응답이없고 인터넷 연결을 확인하십시오</string>
<string id="TimedOut">요청 시간이 표시됩니다</string>
<string id="PinInputLocked">핀 입력이 잠겼습니다</string>
<string id="PotentialError">잠재적 오류</string> <string id="PotentialError">잠재적 오류</string>
<string id="Seconds"></string> <string id="Seconds"></string>
<string id="TemplateError">템플릿 오류</string> <string id="TemplateError">템플릿 오류</string>
<string id="TrailingSlashErr">API URL 끝에 슬래시(/)가 있어서는 안 됩니다.</string> <string id="TrailingSlashErr">API URL에는 후행 슬래시가 없어야합니다.</string>
<string id="Unavailable" scope="glance">없는</string> <string id="Unavailable" scope="glance">없는</string>
<string id="Unconfigured" scope="glance">구성되지 않</string> <string id="Unconfigured" scope="glance">구성되지 않</string>
<string id="UnhandledHttpErr">HTTP 요청 오류 코드를 반환했습니다 =</string> <string id="UnhandledHttpErr">HTTP 요청 반환 오류 코드 =</string>
<string id="WebhookFailed">Webhook 등록에 실패했습니다.</string> <string id="WebhookFailed">Webhook 등록하지 못했습니다</string>
<string id="WrongPin">잘못된 PIN</string> <string id="WrongPin">잘못된 </string>
<!-- 설정 GUI의 경우 문자열은 사용된 순서대로 있어야 합니다. --> <string id="WifiLteNotAvailable">Wi-Fi 또는 LTE를 사용할 수 없습니다</string>
<string id="WifiLtePrompt">Wi-Fi/LTE를 통해 실행 하시겠습니까?</string>
<string id="WifiLteExecutionTitle">홈 조수에게 보내기.</string>
<string id="WifiLteExecutionDataError">받은 데이터가 없습니다.</string>
<!-- 설정 GUI의 경우 문자열이 사용되는 순서대로해야합니다. -->
<string id="SettingsSelect">선택하다...</string> <string id="SettingsSelect">선택하다...</string>
<string id="SettingsApiKey">HomeAssistant의 API 키.</string> <string id="SettingsApiKey">HomeAssistant의 API 키.</string>
<string id="SettingsApiKeyPrompt">장기 액세스 토큰.</string> <string id="SettingsApiKeyPrompt">오래 지속 된 액세스 토큰.</string>
<string id="SettingsApiUrl">HomeAssistant API의 URL입니다.</string> <string id="SettingsApiUrl">Homeassistant API의 URL.</string>
<string id="SettingsConfigUrl">메뉴 구성을 위한 URL(JSON).</string> <string id="SettingsConfigUrl">메뉴 구성 (JSON) 용 URL.</string>
<string id="SettingsCacheConfig">애플리케이션이 메뉴 구성을 캐시해야 할까요?</string> <string id="SettingsCacheConfig">응용 프로그램이 메뉴 구성을 캐시해야합니까?</string>
<string id="SettingsClearCache">다음에 애플리케이션을 시작 때 기존 캐시를 지워야 합니까?</string> <string id="SettingsClearCache">다음에 시작 응용 프로그램이 기존 캐시를 지우려면?</string>
<string id="SettingsVibration">앱에서 진동을 통해 피드백을 제공해야 할까요?</string> <string id="SettingsWifiLteExecutionEnable">Wi-Fi/LTE를 통해 명령을 실행할 수 있습니다.</string>
<string id="SettingsAppTimeout">시간 초과(초). 이 기간 동안 활동이 없으면 애플리케이션을 종료하여 장치 배터리를 절약하세요.</string> <string id="SettingsVibration">응용 프로그램이 진동을 통해 피드백을 제공해야합니까?</string>
<string id="SettingsPollDelay">추가 폴 지연(초). 모든 메뉴 항목의 상태 업데이트 사이에 지연을 추가합니다.</string> <string id="SettingsAppTimeout">시간 초과 시간 초과. 장치 배터리를 저장하기 위해이 비활성 기간 후에 응용 프로그램을 종료하십시오.</string>
<string id="SettingsConfirmTimeout">이 시간(초) 이후에는 작업에 대한 확인 대화 상자가 자동으로 닫히고 작업이 취소됩니다. 시간 초과를 비활성화하려면 0으로 설정합니다.</string> <string id="SettingsPollDelay">추가 폴링 지연 (초). 모든 메뉴 항목의 상태 업데이트 사이에 지연이 추가됩니다.</string>
<string id="SettingsPin">확인이 필요한 모든 작업에 사용되는 4자리 PIN(0000-9999)</string> <string id="SettingsConfirmTimeout">이 시간 (초) 이후 (초) 조치에 대한 확인 대화 상자가 자동으로 닫히고 조치가 취소됩니다. 타임 아웃을 비활성화하려면 0으로 설정하십시오.</string>
<string id="SettingsPinError">애플리케이션 설정에서 0000~9999 사이의 유효한 4자리 숫자 PIN을 구성하세요.</string> <string id="SettingsPin">4 자리 핀이 필요한 모든 작업에 사용됩니다 (0000-9999).</string>
<string id="SettingsTextAlign">왼쪽(끄기) 또는 오른쪽(켜기) 메뉴 정렬.</string> <string id="SettingsPinError">응용 프로그램 설정에서 0000에서 9999 사이의 유효한 4 자리 숫자 핀을 구성하십시오.</string>
<string id="LeftToRight">왼쪽에서 오른쪽으로</string> <string id="SettingsTextAlign">왼쪽 (OFF) 또는 오른쪽 (ON) 메뉴 정렬.</string>
<string id="RightToLeft">오른쪽에서 왼쪽으로</string> <string id="SettingsLeftToRight">쪽에서 오른쪽</string>
<string id="SettingsWidgetStart">(위젯만 해당) 탭을 기다리지 않고 위젯에서 자동으로 애플리케이션을 시작합니다.</string> <string id="SettingsRightToLeft">오른쪽에서 왼쪽</string>
<string id="SettingsEnableBatteryLevel">백그라운드 서비스를 활성화하여 기기의 배터리 수준, 위치 및 (지원되는 경우) 활동 데이터를 Home Assistant로 전송합니다.</string> <string id="SettingsWidgetStart">(위젯 만) 탭을 기다리지 않고 위젯에서 응용 프로그램을 자동으로 시작합니다.</string>
<string id="SettingsBatteryLevelRefreshRate">백그라운드 서비스가 데이터 전송을 반복해야 하는 새로 고침 빈도(분)입니다.</string> <string id="SettingsEnableBatteryLevel">배경 서비스가 장치 배터리 레벨, 위치 및 (지원되는 경우) 활동 데이터를 홈 비서로 보낼 수 있도록합니다.</string>
<string id="WebhookId">(읽기 전용) 백그라운드 서비스 업데이트를 위해 디바이스에서 생성한 Webhook ID입니다. 디버깅에 필요할 수 있습니다.</string> <string id="SettingsBatteryLevelRefreshRate">백그라운드 서비스가 데이터 전송을 반복 해야하는 새로 고침 비율 (분).</string>
<string id="SettingsUserHttpHeader">사용자 제공 HTTP 헤더</string>
<string id="SettingsUserHttpHeaderDescription">일부 홈 어시스턴트 설치에는 기능을 위해 사용자 정의 HTTP 헤더의 사양이 필요합니다.</string>
<string id="SettingsUserHttpHeaderName">사용자 제공 http-header : name</string>
<string id="SettingsUserHttpHeaderValue">사용자 제공 http-header : value</string>
<string id="SettingsClearWebhookId">Home Assistant에 다시 연결하십시오 (Clear Webhook ID, 문제 해결 안내서 참조).</string>
<string id="SettingsWebhookId">(읽기 전용) 배경 서비스 업데이트를 위해 장치에서 만든 WebHook ID. 디버깅을 위해서는이 문제가 필요할 수 있습니다.</string>
</strings> </strings>

View File

@@ -9,64 +9,76 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
<!-- <!--
Generated by Google Translate: English to Latvian Generated by Google Translate: English to Latvian
Ģenerēja Google tulkotājs no angļu valodas Ģenerēts Google tulkojums no angļu valodas
--> -->
<strings> <strings>
<string id="ApiFlood">API izsaukumi ir pārāk ātri. Lūdzu, palēniniet pieprasījumu izpildi.</string> <string id="ApiFlood">API izsauc pārāk strauji. Lūdzu, palēniniet savus pieprasījumus.</string>
<string id="ApiUrlNotFound">URL nav atrasts. Iespējama API URL kļūda iestatījumos.</string> <string id="ApiUrlNotFound">URL nav atrasts. Potenciālā API URL kļūda iestatījumos.</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">Pieejams</string> <string id="Available" scope="glance">Pieejams</string>
<string id="Cached" scope="glance">Kešatmiņā saglabāts</string> <string id="Cached" scope="glance">Kešatmains</string>
<string id="Checking" scope="glance">Notiek pārbaude...</string> <string id="Checking" scope="glance">Pārbaude ...</string>
<string id="ConfigUrlNotFound">URL nav atrasts. Iespējama konfigurācijas URL kļūda iestatījumos.</string> <string id="ConfigUrlNotFound">URL nav atrasts. Potenciālā konfigurācijas URL kļūda iestatījumos.</string>
<string id="Confirm">Protams?</string> <string id="Confirm">Protams?</string>
<string id="Empty">Tukšs</string> <string id="Empty">Tukšs</string>
<string id="Executed" scope="glance">Apstiprināts</string> <string id="Executed" scope="glance">Apstiprināts</string>
<string id="GlanceMenu" scope="glance">Izvēlne</string> <string id="GlanceMenu" scope="glance">Ēdienkarte</string>
<string id="Memory" scope="glance">Atmiņa</string> <string id="Memory" scope="glance">Atmiņa</string>
<string id="NoAPIKey" scope="glance">Lietojumprogrammas iestatījumos nav API atslēgas.</string> <string id="NoAPIKey" scope="glance">Lietojumprogrammas iestatījumos nav API atslēgas.</string>
<string id="NoApiUrl" scope="glance">Lietojumprogrammas iestatījumos nav API URL.</string> <string id="NoApiUrl" scope="glance">Lietojumprogrammu iestatījumos nav API URL.</string>
<string id="NoConfigUrl" scope="glance">Lietojumprogrammas iestatījumos nav konfigurācijas URL.</string> <string id="NoConfigUrl" scope="glance">Lietojumprogrammas iestatījumos nav konfigurācijas URL.</string>
<string id="NoInternet">Nav interneta savienojuma.</string> <string id="NoInternet">Nav interneta savienojuma.</string>
<string id="NoJson">No HTTP pieprasījuma netika atgriezts neviens JSON fails.</string> <string id="NoJson">Neviens JSON neatgriezās no HTTP pieprasījuma.</string>
<string id="NoPhone" scope="glance">Nav tālruņa savienojuma.</string> <string id="NoPhone" scope="glance">Nav tālruņa savienojuma.</string>
<string id="NoPhoneNoCache" scope="glance">Nav tālruņa savienojuma, nav kešatmiņā saglabātas izvēlnes.</string>
<string id="NoResponse">Nav atbildes, pārbaudiet interneta savienojumu</string> <string id="NoResponse">Nav atbildes, pārbaudiet interneta savienojumu</string>
<string id="PinInputLocked">PIN ievade bloķēta</string> <string id="TimedOut">Pieprasīt laiku</string>
<string id="PotentialError">Iespējama kļūda</string> <string id="PinInputLocked">PIN ieeja bloķēta</string>
<string id="PotentialError">Iespējamā kļūda</string>
<string id="Seconds">sekundes</string> <string id="Seconds">sekundes</string>
<string id="TemplateError">Veidnes kļūda</string> <string id="TemplateError">Veidnes kļūda</string>
<string id="TrailingSlashErr">API URL beigās nedrīkst būt slīpsvītra “/”.</string> <string id="TrailingSlashErr">API URL nedrīkst būt slīpsvītra '/'.</string>
<string id="Unavailable" scope="glance">Nav pieejams</string> <string id="Unavailable" scope="glance">Nepieejams</string>
<string id="Unconfigured" scope="glance">Nav konfigurēts</string> <string id="Unconfigured" scope="glance">Nekonfigurēts</string>
<string id="UnhandledHttpErr">HTTP pieprasījums atgrieza kļūdas kodu =</string> <string id="UnhandledHttpErr">Http pieprasījums atgriezts kļūdas kods =</string>
<string id="WebhookFailed">Neizdevās reģistrēt Web aizķeri</string> <string id="WebhookFailed">Neizdevās reģistrēt WebHook</string>
<string id="WrongPin">Nepareizs PIN</string> <string id="WrongPin">Nepareiza tapa</string>
<!-- Iestatījumu GUI virknēm jābūt tādā secībā, kādā tās tiek izmantotas. --> <string id="WifiLteNotAvailable">Nav pieejams bezvadu internets vai LTE</string>
<string id="SettingsSelect">Izvēlieties...</string> <string id="WifiLtePrompt">Izpildīt pār wi-fi/lte?</string>
<string id="SettingsApiKey">API atslēga Home Assistant.</string> <string id="WifiLteExecutionTitle">Sūtot mājas palīgu.</string>
<string id="SettingsApiKeyPrompt">Ilgmūžīgs piekļuves marķieris.</string> <string id="WifiLteExecutionDataError">Dati nav saņemti.</string>
<string id="SettingsApiUrl">HomeAssistant API URL.</string> <!-- Iestatījumi GUI stīgām jābūt tādā secībā, kādā tās tiek izmantotas. -->
<string id="SettingsSelect">Atlasiet ...</string>
<string id="SettingsApiKey">API atslēga Homeassistant.</string>
<string id="SettingsApiKeyPrompt">Ilgstoša piekļuves marķieris.</string>
<string id="SettingsApiUrl">URL Homeassistant API.</string>
<string id="SettingsConfigUrl">URL izvēlnes konfigurācijai (JSON).</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="SettingsCacheConfig">Vai lietojumprogrammai vajadzētu kešatmiņā izvēlnes konfigurāciju?</string>
<string id="SettingsClearCache">Vai lietojumprogrammai nākamajā startēšanas reizē vajadzētu notīrīt esošo kešatmiņu?</string> <string id="SettingsClearCache">Vai lietojumprogrammai vajadzētu notīrīt esošo kešatmiņu nākamreiz, kad tā tiks sākta?</string>
<string id="SettingsVibration">Vai lietojumprogrammai ir jāsniedz atgriezeniskā saite, izmantojot vibrācijas?</string> <string id="SettingsWifiLteExecutionEnable">Iespējot izpildīt komandas, izmantojot Wi-Fi/LTE.</string>
<string id="SettingsAppTimeout">Taimauts sekundēs. Pēc šī neaktivitātes perioda izejiet no lietojumprogrammas, lai taupītu ierīces akumulatoru.</string> <string id="SettingsVibration">Vai lietojumprogrammai vajadzētu sniegt atgriezenisko saiti, izmantojot vibrācijas?</string>
<string id="SettingsPollDelay">Papildu aptaujas aizkave (sekundēs). Pievieno aizkavi starp visu izvēlnes vienumu statusa atjaunināšanu.</string> <string id="SettingsAppTimeout">Noildze sekundēs. Izejiet no lietojumprogrammas pēc šī bezdarbības perioda, lai saglabātu ierīces akumulatoru.</string>
<string id="SettingsConfirmTimeout">Pēc šī laika (sekundēs) tiek automātiski aizvērts darbības apstiprinājuma dialoglodziņš un darbība tiek atcelta. Iestatiet uz 0, lai atspējotu taimautu.</string> <string id="SettingsPollDelay">Papildu aptaujas kavēšanās (sekundēs). Pievieno kavēšanos starp visu izvēlnes vienumu statusa atjauninājumu.</string>
<string id="SettingsPin">4 ciparu PIN, kas jāizmanto visām darbībām, kurām nepieciešams apstiprinājums (0000-9999).</string> <string id="SettingsConfirmTimeout">Pēc šī laika (sekundēs) tiek automātiski slēgts apstiprinājuma dialogs darbībai un darbība tiek atcelta. Iestatiet uz 0, lai atspējotu noildzi.</string>
<string id="SettingsPinError">Lūdzu, konfigurējiet derīgu 4 ciparu ciparu PIN kodu no 0000 līdz 9999 lietojumprogrammas iestatījumos.</string> <string id="SettingsPin">4 ciparu tapa, kas jāizmanto visām darbībām, kurām to nepieciešama (0000-9999).</string>
<string id="SettingsTextAlign">Kreisā (izslēgta) vai labā (ieslēgta) izvēlnes izlīdzināšana.</string> <string id="SettingsPinError">Lūdzu, lietojumprogrammu iestatījumos konfigurējiet derīgu četrciparu skaitlisko tapu no 0000 līdz 9999.</string>
<string id="LeftToRight">No kreisās uz labo</string> <string id="SettingsTextAlign">Kreisais (izslēgts) vai labais (ieslēgts) izvēlnes izlīdzināšana.</string>
<string id="RightToLeft">No labās uz kreiso</string> <string id="SettingsLeftToRight">No kreisās uz labo pusi</string>
<string id="SettingsWidgetStart">(tikai logrīkam) Automātiski startējiet lietojumprogrammu no logrīka, negaidot pieskārienu.</string> <string id="SettingsRightToLeft">Pa labi uz kreiso pusi</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="SettingsWidgetStart">(Tikai logrīks) Automātiski sāk lietot lietojumprogrammu no logrīka, negaidot pieskārienu.</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="SettingsEnableBatteryLevel">Iespējojiet fona pakalpojumu, lai mājas asistentam nosūtītu ierīces akumulatora līmeni, atrašanās vietu un (ja tos atbalstītu) aktivitātes datus.</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> <string id="SettingsBatteryLevelRefreshRate">Atsvaidzināšanas ātrums (minūtēs), kurā fona pakalpojumam vajadzētu atkārtot datu nosūtīšanu.</string>
<string id="SettingsUserHttpHeader">Lietotājs piegādāja HTTP galveni</string>
<string id="SettingsUserHttpHeaderDescription">Dažām mājas palīga instalācijām ir nepieciešama pielāgota HTTP galvenes specifikācija, lai darbotos.</string>
<string id="SettingsUserHttpHeaderName">Lietotājs piegādāja HTTP galveni: Vārds</string>
<string id="SettingsUserHttpHeaderValue">Lietotājs piegādā HTTP galveni: vērtība</string>
<string id="SettingsClearWebhookId">Atkārtoti savienojiet mājas palīgu (Clear WebHook ID, skatīt problēmu novēršanas ceļvedis).</string>
<string id="SettingsWebhookId">(Tikai lasīt) WebHook ID, ko ierīce izveidoja fona pakalpojumu atjauninājumiem. Jūs to varētu pieprasīt atkļūdošanai.</string>
</strings> </strings>

View File

@@ -9,64 +9,76 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
<!-- <!--
Generated by Google Translate: English to Lithuanian Generated by Google Translate: English to Lithuanian
Sukurta Google Translate iš anglų kalbos Sugeneruota Google“ vertimo iš anglų kalbos
--> -->
<strings> <strings>
<string id="ApiFlood">API skambučiai per greiti. Sulėtinkite prašymų vykdymą.</string> <string id="ApiFlood">API skambina per greitai. Prašau sulėtinti savo užklausas.</string>
<string id="ApiUrlNotFound">URL nerastas. Galima API URL klaida nustatymuose.</string> <string id="ApiUrlNotFound">URL nerastas. Potenciali API URL klaida nustatymuose.</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">Galima</string> <string id="Available" scope="glance">Galimas</string>
<string id="Cached" scope="glance">Talpykloje</string> <string id="Cached" scope="glance">Talpykloje</string>
<string id="Checking" scope="glance">Tikrinama...</string> <string id="Checking" scope="glance">Tikrinimas ...</string>
<string id="ConfigUrlNotFound">URL nerastas. Galima konfigūracijos URL klaida nustatymuose.</string> <string id="ConfigUrlNotFound">URL nerastas. Potenciali konfigūracijos URL klaida nustatymuose.</string>
<string id="Confirm">Žinoma?</string> <string id="Confirm">Žinoma?</string>
<string id="Empty">Tuščia</string> <string id="Empty">Tuščias</string>
<string id="Executed" scope="glance">Patvirtinta</string> <string id="Executed" scope="glance">Patvirtinta</string>
<string id="GlanceMenu" scope="glance">Meniu</string> <string id="GlanceMenu" scope="glance">Meniu</string>
<string id="Memory" scope="glance">Atmintis</string> <string id="Memory" scope="glance">Atmintis</string>
<string id="NoAPIKey" scope="glance">Programos nustatymuose nėra API rakto.</string> <string id="NoAPIKey" scope="glance">Nėra API rakto programos nustatymuose.</string>
<string id="NoApiUrl" scope="glance">Programos nustatymuose nėra API URL.</string> <string id="NoApiUrl" scope="glance">Nėra API URL programos nustatymuose.</string>
<string id="NoConfigUrl" scope="glance">Programos nustatymuose nėra konfigūracijos URL.</string> <string id="NoConfigUrl" scope="glance">Nėra konfigūracijos URL programos nustatymuose.</string>
<string id="NoInternet">Nėra interneto ryšio.</string> <string id="NoInternet">Nėra interneto ryšio.</string>
<string id="NoJson">Joks JSON negrąžintas iš HTTP užklausos.</string> <string id="NoJson">Nė vienas JSON negrąžino iš HTTP užklausos.</string>
<string id="NoPhone" scope="glance">Nėra telefono ryšio.</string> <string id="NoPhone" scope="glance">Nėra telefono ryšio.</string>
<string id="NoResponse">Neatsako, patikrinkite interneto ryšį</string> <string id="NoPhoneNoCache" scope="glance">Nėra telefono ryšio, nėra talpyklos meniu.</string>
<string id="PinInputLocked">PIN įvestis užrakinta</string> <string id="NoResponse">Jokio atsakymo, patikrinkite interneto ryšį</string>
<string id="TimedOut">Prašyti</string>
<string id="PinInputLocked">PIN įvestis užrakintas</string>
<string id="PotentialError">Galima klaida</string> <string id="PotentialError">Galima klaida</string>
<string id="Seconds">sekundžių</string> <string id="Seconds">sekundės</string>
<string id="TemplateError">Šablono klaida</string> <string id="TemplateError">Šablono klaida</string>
<string id="TrailingSlashErr">API URL pabaigoje negali būti pasvirojo brūkšnio „/“.</string> <string id="TrailingSlashErr">API URL neturi turėti užpakalinio brūkšnio '/'.</string>
<string id="Unavailable" scope="glance">Nepasiekiamas</string> <string id="Unavailable" scope="glance">Nepasiekiamas</string>
<string id="Unconfigured" scope="glance">Nesukonfigūruotas</string> <string id="Unconfigured" scope="glance">Nekonfigūruotas</string>
<string id="UnhandledHttpErr">HTTP užklausa grąžino klaidos kodą =</string> <string id="UnhandledHttpErr">Http užklausa grąžinta klaidos kodas =</string>
<string id="WebhookFailed">Nepavyko užregistruoti Webhook</string> <string id="WebhookFailed">Nepavyko užregistruoti Webhook</string>
<string id="WrongPin">Neteisingas PIN kodas</string> <string id="WrongPin">Neteisingas kaištis</string>
<!-- Nustatymų GUI eilutės turi būti tokia tvarka, kokia jos naudojamos. --> <string id="WifiLteNotAvailable">„Wi-Fi“ ar „LTE“ nėra</string>
<string id="SettingsSelect">Pasirinkite...</string> <string id="WifiLtePrompt">Vykdyti per „Wi-Fi/LTE“?</string>
<string id="SettingsApiKey">API raktas, skirtas „HomeAssistant.</string> <string id="WifiLteExecutionTitle">Siunčiamas namų asistentui.</string>
<string id="WifiLteExecutionDataError">Jokių duomenų.</string>
<!-- „Nustatymų GUI“ stygos turėtų būti tokia tvarka. -->
<string id="SettingsSelect">Pasirinkite ...</string>
<string id="SettingsApiKey">API raktas, skirtas homeassistant.</string>
<string id="SettingsApiKeyPrompt">Ilgalaikis prieigos raktas.</string> <string id="SettingsApiKeyPrompt">Ilgalaikis prieigos raktas.</string>
<string id="SettingsApiUrl">„HomeAssistant“ API URL.</string> <string id="SettingsApiUrl">URL HOMEASISTANT API.</string>
<string id="SettingsConfigUrl">Meniu konfigūravimo URL (JSON).</string> <string id="SettingsConfigUrl">URL meniu konfigūracijai (JSON).</string>
<string id="SettingsCacheConfig">Ar programa turėtų talpykloje išsaugoti meniu konfigūraciją?</string> <string id="SettingsCacheConfig">Ar programos talpykla turėtų talpinti meniu konfigūraciją?</string>
<string id="SettingsClearCache">Ar programa turėtų išvalyti esamą talpyklą kitą kartą paleidus?</string> <string id="SettingsClearCache">Ar programa turėtų išvalyti esamą talpyklą kitą kartą, kai ji bus paleista?</string>
<string id="SettingsVibration">Ar programa turėtų teikti grįžtamąjį ryšį per vibraciją?</string> <string id="SettingsWifiLteExecutionEnable">Įgalinti komandas vykdant „Wi-Fi“/LTE.</string>
<string id="SettingsAppTimeout">Skirtasis laikas sekundėmis. Po šio neveiklumo laikotarpio išeikite iš programos, kad taupytumėte įrenginio akumuliatorių.</string> <string id="SettingsVibration">Ar programa turėtų pateikti grįžtamąjį ryšį per vibracijas?</string>
<string id="SettingsPollDelay">Papildoma apklausos delsa (sekundėmis). Prideda delsą tarp visų meniu elementų būsenos atnaujinimo.</string> <string id="SettingsAppTimeout">Laikas per kelias sekundes. Išeikite iš programos po šio neveiklumo laikotarpio, kad išsaugotumėte įrenginio akumuliatorių.</string>
<string id="SettingsConfirmTimeout">Praėjus šiam laikui (sekundėmis), veiksmo patvirtinimo dialogo langas automatiškai uždaromas ir veiksmas atšaukiamas. Nustatykite 0, kad išjungtumėte skirtąjį laiką.</string> <string id="SettingsPollDelay">Papildomas apklausos vėlavimas (per kelias sekundes). Prideda vėlavimą tarp visų meniu elementų būsenos atnaujinimo.</string>
<string id="SettingsPin">4 skaitmenų PIN kodas, naudojamas visiems veiksmams, kuriuos reikia patvirtinti (0000-9999).</string> <string id="SettingsConfirmTimeout">Po šio laiko (sekundėmis) veiksmo patvirtinimo dialogas automatiškai uždaromas ir veiksmas atšaukiamas. Nustatykite 0, kad išjungtumėte laiką.</string>
<string id="SettingsPinError">Programos nustatymuose sukonfigūruokite galiojantį 4 skaitmenų skaitmeninį PIN kodą nuo 0000 iki 9999.</string> <string id="SettingsPin">4 skaitmenų kaištis, naudojamas visiems veiksmams, kuriems to reikia (00009999).</string>
<string id="SettingsTextAlign">Kairysis (išjungtas) arba dešinysis (įjungtas) meniu lygiavimas.</string> <string id="SettingsPinError">Programos nustatymuose prašome sukonfigūruoti galiojantį 4 skaitmenų skaitinį PIN tarp 0000 ir 9999.</string>
<string id="LeftToRight">Iš kairės į dešinę</string> <string id="SettingsTextAlign">Kairėje (išjungta) arba dešinėje (įjungta) meniu suderinimas.</string>
<string id="RightToLeft">Iš dešinės į kairę</string> <string id="SettingsLeftToRight">Iš kairės į dešinę</string>
<string id="SettingsWidgetStart">(Tik valdikliui) Automatiškai paleiskite programą iš valdiklio, nelaukdami, kol bus palietus.</string> <string id="SettingsRightToLeft">Į dešinę į kairę</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="SettingsWidgetStart">(Tik valdiklis) Automatiškai paleiskite programą iš valdiklio nelaukdamas čiaupo.</string>
<string id="SettingsBatteryLevelRefreshRate">Atnaujinimo dažnis (minutėmis), kuriuo foninė paslauga turėtų pakartoti duomenų siuntimą.</string> <string id="SettingsEnableBatteryLevel">Įgalinkite fono paslaugą siųsti įrenginio akumuliatoriaus lygį, vietą ir (jei palaikoma) veiklos duomenis namų asistentui.</string>
<string id="WebhookId">(Tik skaitoma) Įrenginio sukurtas „Webhook“ ID, skirtas foninėms paslaugoms atnaujinti. Jums gali prireikti derinimo.</string> <string id="SettingsBatteryLevelRefreshRate">Atnaujinimo norma (minutėmis), kuriai fono paslauga turėtų pakartoti siuntimo duomenis.</string>
<string id="SettingsUserHttpHeader">Vartotojas pateikė HTTP antraštę</string>
<string id="SettingsUserHttpHeaderDescription">Kai kuriems namų asistento diegimui reikalinga specifikacija pagal pasirinktinę HTTP antraštę, kad ji veiktų.</string>
<string id="SettingsUserHttpHeaderName">Vartotojo tiekiamas HTTP-HEADER: Vardas</string>
<string id="SettingsUserHttpHeaderValue">Vartotojo tiekiamas HTTP-HEADER: reikšmė</string>
<string id="SettingsClearWebhookId">Prijunkite prie namų asistento („Clear WebHook ID“, žr. Trikčių šalinimo vadovą).</string>
<string id="SettingsWebhookId">(Skaitykite tik) „WebHook“ ID, kurį įrenginys sukūrė foninių paslaugų atnaujinimams. Jums gali prireikti derinimo.</string>
</strings> </strings>

View File

@@ -9,7 +9,7 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
@@ -19,54 +19,66 @@
--> -->
<strings> <strings>
<string id="ApiFlood">API-kall for raske. Vennligst senke forespørslene dine.</string> <string id="ApiFlood">API ringer for raskt. Vennligst bremse forespørslene dine.</string>
<string id="ApiUrlNotFound">Finner ikke URL. Potensiell API URL-feil i innstillingene.</string> <string id="ApiUrlNotFound">URL ikke funnet. Potensiell API URL -feil i innstillinger.</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">Tilgjengelig</string> <string id="Available" scope="glance">Tilgjengelig</string>
<string id="Cached" scope="glance">Bufret</string> <string id="Cached" scope="glance">Hurtigbufret</string>
<string id="Checking" scope="glance">Sjekker...</string> <string id="Checking" scope="glance">Sjekk ...</string>
<string id="ConfigUrlNotFound">Finner ikke URL. Potensiell konfigurasjons-URL-feil i innstillingene.</string> <string id="ConfigUrlNotFound">URL ikke funnet. Potensiell URL -feilfeil i innstillinger.</string>
<string id="Confirm">Sikker?</string> <string id="Confirm">Sikker?</string>
<string id="Empty">Tømme</string> <string id="Empty">Tømme</string>
<string id="Executed" scope="glance">Bekreftet</string> <string id="Executed" scope="glance">Bekreftet</string>
<string id="GlanceMenu" scope="glance">Meny</string> <string id="GlanceMenu" scope="glance">Meny</string>
<string id="Memory" scope="glance">Hukommelse</string> <string id="Memory" scope="glance">Hukommelse</string>
<string id="NoAPIKey" scope="glance">Ingen API-nøkkel i applikasjonsinnstillingene.</string> <string id="NoAPIKey" scope="glance">Ingen API -nøkkel i applikasjonsinnstillingene.</string>
<string id="NoApiUrl" scope="glance">Ingen API-URL i applikasjonsinnstillingene.</string> <string id="NoApiUrl" scope="glance">Ingen API -URL i applikasjonsinnstillingene.</string>
<string id="NoConfigUrl" scope="glance">Ingen konfigurasjons-URL i applikasjonsinnstillingene.</string> <string id="NoConfigUrl" scope="glance">Ingen konfigurasjons -URL i applikasjonsinnstillingene.</string>
<string id="NoInternet">Ingen Internett-tilkobling.</string> <string id="NoInternet">Ingen internettforbindelse.</string>
<string id="NoJson">Ingen JSON returnert fra HTTP-forespørsel.</string> <string id="NoJson">Ingen JSON kom tilbake fra HTTP -forespørsel.</string>
<string id="NoPhone" scope="glance">Ingen telefonforbindelse.</string> <string id="NoPhone" scope="glance">Ingen telefonforbindelse.</string>
<string id="NoResponse">Ingen svar, sjekk Internett-tilkoblingen</string> <string id="NoPhoneNoCache" scope="glance">Ingen telefonforbindelse, ingen hurtigbufret meny.</string>
<string id="PinInputLocked">PIN-inntasting låst for</string> <string id="NoResponse">Ingen svar, sjekk internettforbindelse</string>
<string id="TimedOut">Be om tidsavbrudd</string>
<string id="PinInputLocked">PIN -inngang låst for</string>
<string id="PotentialError">Potensiell feil</string> <string id="PotentialError">Potensiell feil</string>
<string id="Seconds">sekunder</string> <string id="Seconds">sekunder</string>
<string id="TemplateError">Malfeil</string> <string id="TemplateError">Malfeil</string>
<string id="TrailingSlashErr">API URL må ikke ha en etterfølgende skråstrek '/'.</string> <string id="TrailingSlashErr">API URL må ikke ha en etterfølgende skråstrek '/'.</string>
<string id="Unavailable" scope="glance">Utilgjengelig</string> <string id="Unavailable" scope="glance">Utilgjengelig</string>
<string id="Unconfigured" scope="glance">Ukonfigurert</string> <string id="Unconfigured" scope="glance">Ukonfigurert</string>
<string id="UnhandledHttpErr">HTTP-forespørsel returnerte feilkode =</string> <string id="UnhandledHttpErr">HTTP -forespørsel returnerte feilkode =</string>
<string id="WebhookFailed">Kunne ikke registrere Webhook</string> <string id="WebhookFailed">Kunne ikke registrere webhook</string>
<string id="WrongPin">Feil PIN-kode</string> <string id="WrongPin">Feil pinne</string>
<!-- For innstillingene GUI, bør strenger være i den rekkefølgen de brukes. --> <string id="WifiLteNotAvailable">Ingen Wi-Fi eller LTE tilgjengelig</string>
<string id="WifiLtePrompt">Utføre over Wi-Fi/LTE?</string>
<string id="WifiLteExecutionTitle">Sending til hjemmeassistent.</string>
<string id="WifiLteExecutionDataError">Ingen data mottatt.</string>
<!-- For innstillinger GUI skal strengene være i den rekkefølgen de brukes. -->
<string id="SettingsSelect">Velge...</string> <string id="SettingsSelect">Velge...</string>
<string id="SettingsApiKey">API-nøkkel for HomeAssistant.</string> <string id="SettingsApiKey">API -nøkkel for homeAssistant.</string>
<string id="SettingsApiKeyPrompt">Langlevd tilgangstoken.</string> <string id="SettingsApiKeyPrompt">Langvarig tilgangstoken.</string>
<string id="SettingsApiUrl">URL for HomeAssistant API.</string> <string id="SettingsApiUrl">URL for HomeAssistant API.</string>
<string id="SettingsConfigUrl">URL for menykonfigurasjon (JSON).</string> <string id="SettingsConfigUrl">URL for menykonfigurasjon (JSON).</string>
<string id="SettingsCacheConfig">Skal applikasjonen bufre menykonfigurasjonen?</string> <string id="SettingsCacheConfig">Bør applikasjonsbufferen menykonfigurasjonen?</string>
<string id="SettingsClearCache">Bør applikasjonen tømme den eksisterende cachen neste gang den startes?</string> <string id="SettingsClearCache">Bør applikasjonen fjerne den eksisterende cachen neste gang den startes?</string>
<string id="SettingsVibration">Skal applikasjonen gi tilbakemelding via vibrasjoner?</string> <string id="SettingsWifiLteExecutionEnable">Aktiver utførende kommandoer over Wi-Fi/LTE.</string>
<string id="SettingsAppTimeout">Tidsavbrudd i sekunder. Avslutt applikasjonen etter denne perioden med inaktivitet for å spare enhetens batteri.</string> <string id="SettingsVibration">Bør applikasjonen gi tilbakemelding via vibrasjoner?</string>
<string id="SettingsPollDelay">Ytterligere avstemningsforsinkelse (i sekunder). Legger til en forsinkelse mellom statusoppdatering av alle menyelementer.</string> <string id="SettingsAppTimeout">Tidsavbrudd på sekunder. Gå ut av applikasjonen etter denne perioden med inaktivitet for å lagre enhetsbatteriet.</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="SettingsPollDelay">Ytterligere avstemningsforsinkelse (på sekunder). Legger til en forsinkelse mellom statusoppdateringen av alle menyelementer.</string>
<string id="SettingsPin">4-sifret PIN-kode som skal brukes for alle handlinger som krever bekreftelse (0000-9999).</string> <string id="SettingsConfirmTimeout">Etter denne tiden (på sekunder) blir en bekreftelsesdialog for en handling automatisk lukket og handlingen blir kansellert. Sett til 0 for å deaktivere tidsavbruddet.</string>
<string id="SettingsPinError">Konfigurer en gyldig 4-sifret numerisk PIN-kode mellom 0000 og 9999 i applikasjonsinnstillingene.</string> <string id="SettingsPin">4-sifret pinne som skal brukes til alle handlinger som krever det (0000-9999).</string>
<string id="SettingsTextAlign">Venstre (av) eller Høyre (på) Menyjustering.</string> <string id="SettingsPinError">Konfigurer en gyldig 4-sifret numerisk pinne mellom 0000 og 9999 i applikasjonsinnstillingene.</string>
<string id="LeftToRight">Venstre til høyre</string> <string id="SettingsTextAlign">Venstre (av) eller høyre (på) menyjustering.</string>
<string id="RightToLeft">Høyre til venstre</string> <string id="SettingsLeftToRight">Fra venstre til høyre</string>
<string id="SettingsWidgetStart">(Kun widget) Start applikasjonen automatisk fra widgeten uten å vente på et trykk.</string> <string id="SettingsRightToLeft">Høyre til venstre</string>
<string id="SettingsEnableBatteryLevel">Aktiver bakgrunnstjenesten for å sende enhetens batterinivå, plassering og (hvis støttet) aktivitetsdata til Home Assistant.</string> <string id="SettingsWidgetStart">(Bare widget) Start automatisk applikasjonen fra widgeten uten å vente på et trykk.</string>
<string id="SettingsBatteryLevelRefreshRate">Oppdateringshastigheten (i minutter) som bakgrunnstjenesten skal gjenta sending av data med.</string> <string id="SettingsEnableBatteryLevel">Aktiver bakgrunnstjenesten å sende enhetens batterinivå, plassering og (hvis støttet) aktivitetsdata til hjemmeassistent.</string>
<string id="WebhookId">(Skrivebeskyttet) Webhook-IDen opprettet av enheten for bakgrunnstjenesteoppdateringer. Du kan kreve dette for feilsøking.</string> <string id="SettingsBatteryLevelRefreshRate">Oppdateringsfrekvensen (på få minutter) som bakgrunnstjenesten skal gjenta sendingsdata.</string>
<string id="SettingsUserHttpHeader">Bruker levert HTTP -overskrift</string>
<string id="SettingsUserHttpHeaderDescription">Noen hjemmeassistentinstallasjoner krever spesifikasjon av en tilpasset HTTP -overskrift for å fungere.</string>
<string id="SettingsUserHttpHeaderName">Bruker levert http-header: navn</string>
<string id="SettingsUserHttpHeaderValue">Bruker levert http-header: verdi</string>
<string id="SettingsClearWebhookId">Koble til hjemmeassistent (Clear WebHook ID, se Feilsøkingsveiledning).</string>
<string id="SettingsWebhookId">(Bare les) Webhook -IDen som er opprettet av enheten for oppdateringer av bakgrunnstjenester. Du kan kreve dette for feilsøking.</string>
</strings> </strings>

View File

@@ -9,23 +9,23 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
<!-- <!--
Generated by Google Translate: English to Polish Generated by Google Translate: English to Polish
Wygenerowano przez Google Tłumacz z języka angielskiego Wygenerowane przez Google Translate z angielskiego
--> -->
<strings> <strings>
<string id="ApiFlood">Wywołania API są zbyt szybkie. Proszę zwolnić żądania.</string> <string id="ApiFlood">API nazywa się zbyt szybkim. Zwolnij swoje prośby.</string>
<string id="ApiUrlNotFound">Nie znaleziono adresu URL. Potencjalny błąd adresu URL API w ustawieniach.</string> <string id="ApiUrlNotFound">URL nie znaleziono. Potencjalny błąd adresu URL API w ustawieniach.</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">Dostępny</string> <string id="Available" scope="glance">Dostępny</string>
<string id="Cached" scope="glance">Zapisane w pamięci podręcznej</string> <string id="Cached" scope="glance">Buforowany</string>
<string id="Checking" scope="glance">Kontrola...</string> <string id="Checking" scope="glance">Kontrola...</string>
<string id="ConfigUrlNotFound">Nie znaleziono adresu URL. Potencjalny błąd adresu URL konfiguracji w ustawieniach.</string> <string id="ConfigUrlNotFound">URL nie znaleziono. Potencjalny błąd adresu URL konfiguracji w ustawieniach.</string>
<string id="Confirm">Jasne?</string> <string id="Confirm">Jasne?</string>
<string id="Empty">Pusty</string> <string id="Empty">Pusty</string>
<string id="Executed" scope="glance">Potwierdzony</string> <string id="Executed" scope="glance">Potwierdzony</string>
@@ -34,39 +34,51 @@
<string id="NoAPIKey" scope="glance">Brak klucza API w ustawieniach aplikacji.</string> <string id="NoAPIKey" scope="glance">Brak klucza API w ustawieniach aplikacji.</string>
<string id="NoApiUrl" scope="glance">Brak adresu URL API w ustawieniach aplikacji.</string> <string id="NoApiUrl" scope="glance">Brak adresu URL API w ustawieniach aplikacji.</string>
<string id="NoConfigUrl" scope="glance">Brak adresu URL konfiguracji w ustawieniach aplikacji.</string> <string id="NoConfigUrl" scope="glance">Brak adresu URL konfiguracji w ustawieniach aplikacji.</string>
<string id="NoInternet">Brak połączenia z Internetem.</string> <string id="NoInternet">Brak połączenia internetowego.</string>
<string id="NoJson">Żądanie HTTP nie zwróciło żadnego JSON-a.</string> <string id="NoJson">Żaden JSON nie wrócił z żądania HTTP.</string>
<string id="NoPhone" scope="glance">Brak połączenia telefonicznego.</string> <string id="NoPhone" scope="glance">Brak połączenia telefonicznego.</string>
<string id="NoPhoneNoCache" scope="glance">Brak połączenia telefonicznego, brak menu buforowanego.</string>
<string id="NoResponse">Brak odpowiedzi, sprawdź połączenie internetowe</string> <string id="NoResponse">Brak odpowiedzi, sprawdź połączenie internetowe</string>
<string id="PinInputLocked">Wprowadzanie kodu PIN zablokowane</string> <string id="TimedOut">Żądanie wyczerpane</string>
<string id="PinInputLocked">Blokowane wejście do pinu</string>
<string id="PotentialError">Potencjalny błąd</string> <string id="PotentialError">Potencjalny błąd</string>
<string id="Seconds">towary drugiej jakości</string> <string id="Seconds">towary drugiej jakości</string>
<string id="TemplateError">Błąd szablonu</string> <string id="TemplateError">Błąd szablonu</string>
<string id="TrailingSlashErr">Adres URL interfejsu API nie może mieć ukośnika „/”.</string> <string id="TrailingSlashErr">URL API nie może mieć tulokingowego cięcia „/”.</string>
<string id="Unavailable" scope="glance">Nie płynny</string> <string id="Unavailable" scope="glance">Nie płynny</string>
<string id="Unconfigured" scope="glance">Nieskonfigurowany</string> <string id="Unconfigured" scope="glance">Niekonfigurowany</string>
<string id="UnhandledHttpErr">Żądanie HTTP zwróciło kod błędu =</string> <string id="UnhandledHttpErr">Żądanie HTTP Zwracane kod błędu =</string>
<string id="WebhookFailed">Nie udało się zarejestrować Webhook</string> <string id="WebhookFailed">Nie udało się zarejestrować WebHook</string>
<string id="WrongPin">Zły PIN</string> <string id="WrongPin">Niewłaściwy szpilka</string>
<!-- W przypadku interfejsu graficznego ustawień ciągi znaków powinny być w kolejności, w jakiej są używane. --> <string id="WifiLteNotAvailable">Brak dostępnych Wi-Fi lub LTE</string>
<string id="WifiLtePrompt">Wykonaj Wi-Fi/LTE?</string>
<string id="WifiLteExecutionTitle">Wysyłanie do asystenta domowego.</string>
<string id="WifiLteExecutionDataError">Brak danych.</string>
<!-- W przypadku ustawień GUI sznurki powinny znajdować się w kolejności ich używanych. -->
<string id="SettingsSelect">Wybierać...</string> <string id="SettingsSelect">Wybierać...</string>
<string id="SettingsApiKey">Klucz API dla HomeAssistant.</string> <string id="SettingsApiKey">Klucz API dla Homeassistant.</string>
<string id="SettingsApiKeyPrompt">Długoterminowy token dostępu.</string> <string id="SettingsApiKeyPrompt">Długowieczny token dostępu.</string>
<string id="SettingsApiUrl">Adres URL dla API HomeAssistant.</string> <string id="SettingsApiUrl">URL dla API Homeassistant.</string>
<string id="SettingsConfigUrl">Adres URL do konfiguracji menu (JSON).</string> <string id="SettingsConfigUrl">URL dla konfiguracji menu (JSON).</string>
<string id="SettingsCacheConfig">Czy aplikacja powinna buforować konfigurację menu?</string> <string id="SettingsCacheConfig">Czy aplikacja powinna buforować konfigurację menu?</string>
<string id="SettingsClearCache">Czy aplikacja powinna wyczyścić pamięć podręczną przy następnym uruchomieniu?</string> <string id="SettingsClearCache">Czy aplikacja powinna wyczyścić istniejącą pamięć podręczną następnym razem, gdy zostanie uruchomiona?</string>
<string id="SettingsVibration">Czy aplikacja powinna przekazywać informacje zwrotne za pomocą wibracji?</string> <string id="SettingsWifiLteExecutionEnable">Włącz wykonywanie poleceń przez Wi-Fi/LTE.</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="SettingsVibration">Czy aplikacja powinna przekazywać informacje zwrotne za pośrednictwem wibracji?</string>
<string id="SettingsPollDelay">Dodatkowe opóźnienie sondowania (w sekundach). Dodaje opóźnienie między aktualizacją statusu wszystkich elementów menu.</string> <string id="SettingsAppTimeout">Limit czasu w sekundach. Wyjdź z aplikacji po tym okresie bezczynności, aby zapisać akumulator urządzenia.</string>
<string id="SettingsConfirmTimeout">Po tym czasie (w sekundach) okno dialogowe potwierdzenia akcji jest automatycznie zamykane, a akcja jest anulowana. Ustaw na 0, aby wyłączyć limit czasu.</string> <string id="SettingsPollDelay">Dodatkowe opóźnienie ankiety (w sekundach). Dodaje opóźnienie między aktualizacją statusu wszystkich elementów menu.</string>
<string id="SettingsPin">4-cyfrowy kod PIN, który należy stosować do wszystkich czynności wymagających potwierdzenia (0000-9999).</string> <string id="SettingsConfirmTimeout">Po tym czasie (w sekundach) okno dialogowe potwierdzenia akcji jest automatycznie zamknięte, a akcja jest anulowana. Ustaw na 0, aby wyłączyć limit czasu.</string>
<string id="SettingsPinError">Proszę skonfigurować prawidłowy 4-cyfrowy kod PIN z zakresu od 0000 do 9999 w ustawieniach aplikacji.</string> <string id="SettingsPin">4-cyfrowy szpilka do użycia do wszystkich działań, które go wymagają (0000-9999).</string>
<string id="SettingsTextAlign">Wyrównanie menu do lewej (wyłączone) lub prawej (włączone).</string> <string id="SettingsPinError">W ustawieniach aplikacji skonfiguruj prawidłowy 4-cyfrowy pin liczbowy między 0000 a 9999.</string>
<string id="LeftToRight">Od lewej do prawej</string> <string id="SettingsTextAlign">Lewy (wyłączony) lub w prawo (na) wyrównanie menu.</string>
<string id="RightToLeft">Od prawej do lewej</string> <string id="SettingsLeftToRight">Od lewej do prawej</string>
<string id="SettingsWidgetStart">(Tylko widżet) Automatyczne uruchamianie aplikacji z widżetu bez czekania na dotknięcie.</string> <string id="SettingsRightToLeft">Od prawej do lewej</string>
<string id="SettingsEnableBatteryLevel">Włącz usługę działającą w tle, aby wysyłać do Home Assistant dane dotyczące poziomu naładowania baterii urządzenia, jego lokalizacji i aktywności (jeśli jest obsługiwana).</string> <string id="SettingsWidgetStart">(Tylko widżet) Automatycznie uruchom aplikację z widżetu bez oczekiwania na dotknięcie.</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="SettingsEnableBatteryLevel">Włącz usługę w tle wysyłanie poziomu baterii, lokalizacji i (jeśli jest obsługiwane) dane o aktywności do Asystenta Home.</string>
<string id="WebhookId">(Tylko do odczytu) Identyfikator webhooka utworzony przez urządzenie do aktualizacji usług w tle. Może być potrzebny do debugowania.</string> <string id="SettingsBatteryLevelRefreshRate">Szybkość odświeżania (w minutach), w której usługa tła powinna powtarzać dane wysyłania.</string>
<string id="SettingsUserHttpHeader">Dostarczony przez użytkownika nagłówek HTTP</string>
<string id="SettingsUserHttpHeaderDescription">Niektóre instalacje asystentów domowych wymagają specyfikacji niestandardowego nagłówka HTTP w celu funkcjonowania.</string>
<string id="SettingsUserHttpHeaderName">Dostarczony przez użytkownika HTTP-Header: Nazwa</string>
<string id="SettingsUserHttpHeaderValue">Dostarczony przez użytkownika HTTP-Header: Wartość</string>
<string id="SettingsClearWebhookId">Ponowne połączenie z Asystentem Home (Clear Webhook ID, patrz Przewodnik po rozwiązywaniu problemów).</string>
<string id="SettingsWebhookId">(Tylko odczyt) Identyfikator WebHook utworzony przez urządzenie dla aktualizacji usług w tle. Możesz tego wymagać do debugowania.</string>
</strings> </strings>

View File

@@ -9,64 +9,76 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
<!-- <!--
Generated by Google Translate: English to Portuguese Generated by Google Translate: English to Portuguese
Gerado pelo Google Tradutor do Inglês Gerado pelo Google traduz do inglês
--> -->
<strings> <strings>
<string id="ApiFlood">Chamadas de API muito rápidas. Por favor, diminua a velocidade de suas solicitações.</string> <string id="ApiFlood">A API chama muito rápido. Por favor, desacelere seus pedidos.</string>
<string id="ApiUrlNotFound">URL não encontrada. Possível erro de URL de API nas configurações.</string> <string id="ApiUrlNotFound">URL não encontrado. Erro de URL da API potencial nas configurações.</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">Disponível</string> <string id="Available" scope="glance">Disponível</string>
<string id="Cached" scope="glance">Em cache</string> <string id="Cached" scope="glance">Cache</string>
<string id="Checking" scope="glance">Verificando...</string> <string id="Checking" scope="glance">Verificando ...</string>
<string id="ConfigUrlNotFound">URL não encontrada. Possível erro de URL de configuração nas configurações.</string> <string id="ConfigUrlNotFound">URL não encontrado. Erro de URL de configuração potencial nas configurações.</string>
<string id="Confirm">Claro?</string> <string id="Confirm">Claro?</string>
<string id="Empty">Vazio</string> <string id="Empty">Vazio</string>
<string id="Executed" scope="glance">Confirmado</string> <string id="Executed" scope="glance">Confirmado</string>
<string id="GlanceMenu" scope="glance">Menu</string> <string id="GlanceMenu" scope="glance">Menu</string>
<string id="Memory" scope="glance">Memória</string> <string id="Memory" scope="glance">Memória</string>
<string id="NoAPIKey" scope="glance">Nenhuma chave de API nas configurações do aplicativo.</string> <string id="NoAPIKey" scope="glance">Nenhuma chave da API nas configurações do aplicativo.</string>
<string id="NoApiUrl" scope="glance">Nenhuma URL de API nas configurações do aplicativo.</string> <string id="NoApiUrl" scope="glance">Nenhum URL da API nas configurações do aplicativo.</string>
<string id="NoConfigUrl" scope="glance">Nenhuma URL de configuração nas configurações do aplicativo.</string> <string id="NoConfigUrl" scope="glance">Nenhum URL de configuração nas configurações do aplicativo.</string>
<string id="NoInternet">Sem conexão com a Internet.</string> <string id="NoInternet">Sem conexão com a Internet.</string>
<string id="NoJson">Nenhum JSON foi retornado da solicitação HTTP.</string> <string id="NoJson">Nenhum JSON retornou da solicitação HTTP.</string>
<string id="NoPhone" scope="glance">Sem conexão telefônica.</string> <string id="NoPhone" scope="glance">Sem conexão telefônica.</string>
<string id="NoResponse">Nenhuma resposta, verifique a conexão com a Internet</string> <string id="NoPhoneNoCache" scope="glance">Sem conexão de telefone, sem menu em cache.</string>
<string id="PinInputLocked">Entrada de PIN bloqueada para</string> <string id="NoResponse">Sem resposta, verifique a conexão com a Internet</string>
<string id="TimedOut">Solicitação cronometrada</string>
<string id="PinInputLocked">Entrada de pino bloqueado para</string>
<string id="PotentialError">Erro potencial</string> <string id="PotentialError">Erro potencial</string>
<string id="Seconds">segundos</string> <string id="Seconds">segundos</string>
<string id="TemplateError">Erro de modelo</string> <string id="TemplateError">Erro de modelo</string>
<string id="TrailingSlashErr">A URL da API não deve ter uma barra final '/'.</string> <string id="TrailingSlashErr">O URL da API não deve ter uma barra à direita '/'.</string>
<string id="Unavailable" scope="glance">Indisponível</string> <string id="Unavailable" scope="glance">Indisponível</string>
<string id="Unconfigured" scope="glance">Não configurado</string> <string id="Unconfigured" scope="glance">Não configurado</string>
<string id="UnhandledHttpErr">A solicitação HTTP retornou o código de erro =</string> <string id="UnhandledHttpErr">Solicitação HTTP Código de erro retornado =</string>
<string id="WebhookFailed">Falha ao registrar o Webhook</string> <string id="WebhookFailed">Falhou em registrar webhook</string>
<string id="WrongPin">PIN errado</string> <string id="WrongPin">Pino errado</string>
<!-- Para a GUI de configurações, as strings devem estar na ordem em que são usadas. --> <string id="WifiLteNotAvailable">Sem Wi-Fi ou LTE disponível</string>
<string id="SettingsSelect">Selecione...</string> <string id="WifiLtePrompt">Executar sobre Wi-Fi/LTE?</string>
<string id="SettingsApiKey">Chave API para HomeAssistant.</string> <string id="WifiLteExecutionTitle">Enviando para o assistente de casa.</string>
<string id="WifiLteExecutionDataError">Nenhum dado recebido.</string>
<!-- Para a GUI das configurações, as cordas devem estar na ordem em que são usadas. -->
<string id="SettingsSelect">Selecione ...</string>
<string id="SettingsApiKey">Chave da API para o homealsistente.</string>
<string id="SettingsApiKeyPrompt">Token de acesso de longa duração.</string> <string id="SettingsApiKeyPrompt">Token de acesso de longa duração.</string>
<string id="SettingsApiUrl">URL para a API do HomeAssistant.</string> <string id="SettingsApiUrl">URL para API homeassesistente.</string>
<string id="SettingsConfigUrl">URL para configuração de menu (JSON).</string> <string id="SettingsConfigUrl">URL para configuração de menu (JSON).</string>
<string id="SettingsCacheConfig">O aplicativo deve armazenar em cache a configuração do menu?</string> <string id="SettingsCacheConfig">O aplicativo deve 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="SettingsClearCache">O aplicativo deve limpar o cache existente na próxima vez que for iniciado?</string>
<string id="SettingsWifiLteExecutionEnable">Habilite os comandos de execução sobre Wi-Fi/LTE.</string>
<string id="SettingsVibration">O aplicativo deve fornecer feedback por meio de vibrações?</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 a bateria do dispositivo.</string> <string id="SettingsAppTimeout">Tempo limite em segundos. Saia do aplicativo após esse período de inatividade para salvar a bateria do dispositivo.</string>
<string id="SettingsPollDelay">Atraso adicional de pesquisa (em segundos). Adiciona um atraso entre a atualização de status de todos os itens do menu.</string> <string id="SettingsPollDelay">Atraso adicional da pesquisa (em segundos). Adiciona um atraso entre a atualização de status de todos os itens do menu.</string>
<string id="SettingsConfirmTimeout">Após esse tempo (em segundos), um diálogo de confirmação para uma ação é fechado automaticamente e a ação é cancelada. Defina como 0 para desabilitar o tempo limite.</string> <string id="SettingsConfirmTimeout">Após esse período (em segundos), uma caixa de diálogo de confirmação para uma ação é fechada automaticamente e a ação é cancelada. Defina como 0 para desativar o tempo limite.</string>
<string id="SettingsPin">PIN de 4 dígitos a ser usado para todas as ações que exigem confirmação (0000-9999).</string> <string id="SettingsPin">PIN de 4 dígitos a ser usado para todas as ações que o exigem (0000-9999).</string>
<string id="SettingsPinError">Configure um PIN numérico válido de 4 dígitos entre 0000 e 9999 nas configurações do aplicativo.</string> <string id="SettingsPinError">Configure um pino numérico de 4 dígitos válido entre 0000 e 9999 nas configurações do aplicativo.</string>
<string id="SettingsTextAlign">Alinhamento do menu à esquerda (desligado) ou à direita (ligado).</string> <string id="SettingsTextAlign">Alinhamento do menu esquerdo (desativado) ou direito (on).</string>
<string id="LeftToRight">Da esquerda para a direita</string> <string id="SettingsLeftToRight">Da esquerda para a direita</string>
<string id="RightToLeft">Da direita para a esquerda</string> <string id="SettingsRightToLeft">Direita para a esquerda</string>
<string id="SettingsWidgetStart">(Somente widget) Inicie o aplicativo automaticamente a partir do widget sem esperar por um toque.</string> <string id="SettingsWidgetStart">(Somente widget) Inicie automaticamente o aplicativo do widget sem esperar por um toque.</string>
<string id="SettingsEnableBatteryLevel">Habilite o serviço em segundo plano para enviar o nível da bateria do dispositivo, a localização e (se compatível) dados de atividade para o Home Assistant.</string> <string id="SettingsEnableBatteryLevel">Habilite o serviço em segundo plano para enviar o nível da bateria do dispositivo, localização e (se suportado) dados de atividade para o assistente doméstico.</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="SettingsBatteryLevelRefreshRate">A taxa de atualização (em minutos) na qual o serviço em segundo plano deve repetir os dados de envio.</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> <string id="SettingsUserHttpHeader">Usuário fornecido pelo cabeçalho HTTP</string>
<string id="SettingsUserHttpHeaderDescription">Algumas instalações de assistente doméstica exigem a especificação de um cabeçalho HTTP personalizado para funcionar.</string>
<string id="SettingsUserHttpHeaderName">Usuário fornecido http header: nome</string>
<string id="SettingsUserHttpHeaderValue">Usuário fornecido HTTP-Header: Valor</string>
<string id="SettingsClearWebhookId">Reconecte -se ao assistente doméstico (ID da WebHook limpa, consulte o Guia de Solução de Problemas).</string>
<string id="SettingsWebhookId">(Somente leitura) O ID do webhook criado pelo dispositivo para atualizações de serviço em segundo plano. Você pode exigir isso para depuração.</string>
</strings> </strings>

View File

@@ -9,7 +9,7 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
@@ -19,54 +19,66 @@
--> -->
<strings> <strings>
<string id="ApiFlood">Apeluri API prea rapide. Vă rugăm să încetiniți cererile dvs.</string> <string id="ApiFlood">API apelează prea rapid. Vă rugăm să încetiniți cererile.</string>
<string id="ApiUrlNotFound">Adresa URL nu a fost găsită. Potențială eroare URL API în setări.</string> <string id="ApiUrlNotFound">URL nu a fost găsit. Eroare potențială URL API în setări.</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">Disponibil</string> <string id="Available" scope="glance">Disponibil</string>
<string id="Cached" scope="glance">În cache</string> <string id="Cached" scope="glance">În cache</string>
<string id="Checking" scope="glance">Control...</string> <string id="Checking" scope="glance">Control...</string>
<string id="ConfigUrlNotFound">Adresa URL nu a fost găsită. Potențială eroare URL de configurare în setări.</string> <string id="ConfigUrlNotFound">URL nu a fost găsit. Eroare URL de configurare potențială în setări.</string>
<string id="Confirm">Sigur?</string> <string id="Confirm">Sigur?</string>
<string id="Empty">Gol</string> <string id="Empty">Gol</string>
<string id="Executed" scope="glance">Confirmat</string> <string id="Executed" scope="glance">Confirmat</string>
<string id="GlanceMenu" scope="glance">Meniu</string> <string id="GlanceMenu" scope="glance">Meniu</string>
<string id="Memory" scope="glance">Memorie</string> <string id="Memory" scope="glance">Memorie</string>
<string id="NoAPIKey" scope="glance">Nicio cheie API în setările aplicației.</string> <string id="NoAPIKey" scope="glance">Nici o 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="NoApiUrl" scope="glance">Fără 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="NoConfigUrl" scope="glance">Fără URL de configurare în setările aplicației.</string>
<string id="NoInternet">Fără conexiune la internet.</string> <string id="NoInternet">Fără conexiune la internet.</string>
<string id="NoJson">Niciun JSON nu a fost returnat de la solicitarea HTTP.</string> <string id="NoJson">Niciun JSON nu a revenit de la cererea HTTP.</string>
<string id="NoPhone" scope="glance">Fără conexiune telefonică.</string> <string id="NoPhone" scope="glance">Fără conexiune telefonică.</string>
<string id="NoResponse">Niciun răspuns, verificați conexiunea la internet</string> <string id="NoPhoneNoCache" scope="glance">Fără conexiune la telefon, fără meniu în cache.</string>
<string id="PinInputLocked">Introducerea PIN blocată pentru</string> <string id="NoResponse">Fără răspuns, verificați conexiunea la internet</string>
<string id="TimedOut">Cererea a fost cronometrată</string>
<string id="PinInputLocked">Intrarea pin blocat pentru</string>
<string id="PotentialError">Eroare potențială</string> <string id="PotentialError">Eroare potențială</string>
<string id="Seconds">secunde</string> <string id="Seconds">secunde</string>
<string id="TemplateError">Eroare de șablon</string> <string id="TemplateError">Eroare de șablon</string>
<string id="TrailingSlashErr">Adresa URL API nu trebuie să aibă o bară oblică finală „/”.</string> <string id="TrailingSlashErr">URL -ul API nu trebuie să aibă un slash '/'.</string>
<string id="Unavailable" scope="glance">Indisponibil</string> <string id="Unavailable" scope="glance">Indisponibil</string>
<string id="Unconfigured" scope="glance">Neconfigurat</string> <string id="Unconfigured" scope="glance">Neconfigurat</string>
<string id="UnhandledHttpErr">Solicitarea HTTP a returnat codul de eroare =</string> <string id="UnhandledHttpErr">Cererea http returnată cod de eroare =</string>
<string id="WebhookFailed">Nu s-a putut înregistra Webhook</string> <string id="WebhookFailed">Nu a reușit să înregistrați WebHook</string>
<string id="WrongPin">PIN greșit</string> <string id="WrongPin">Pin greșit</string>
<string id="WifiLteNotAvailable">Nu există Wi-Fi sau LTE disponibile</string>
<string id="WifiLtePrompt">Executați peste Wi-Fi/LTE?</string>
<string id="WifiLteExecutionTitle">Trimiterea către asistent de acasă.</string>
<string id="WifiLteExecutionDataError">Nu au fost primite date.</string>
<!-- Pentru GUI de setări, șirurile ar trebui să fie în ordinea în care sunt utilizate. --> <!-- Pentru GUI de setări, șirurile ar trebui să fie în ordinea în care sunt utilizate. -->
<string id="SettingsSelect">Selecta...</string> <string id="SettingsSelect">Selecta...</string>
<string id="SettingsApiKey">Cheie API pentru HomeAssistant.</string> <string id="SettingsApiKey">Cheie API pentru Homeasssistant.</string>
<string id="SettingsApiKeyPrompt">Token de acces cu viață lungă.</string> <string id="SettingsApiKeyPrompt">Token de acces de lungă durată.</string>
<string id="SettingsApiUrl">Adresa URL pentru API-ul HomeAssistant.</string> <string id="SettingsApiUrl">URL pentru API -ul Homeassistant.</string>
<string id="SettingsConfigUrl">URL pentru configurarea meniului (JSON).</string> <string id="SettingsConfigUrl">URL pentru configurația meniului (JSON).</string>
<string id="SettingsCacheConfig">Ar trebui aplicația să memoreze în cache configurația meniului?</string> <string id="SettingsCacheConfig">Aplicația cache ar trebui să fie configurația meniului?</string>
<string id="SettingsClearCache">Ar trebui aplicația să golească memoria cache existentă data viitoare când este pornită?</string> <string id="SettingsClearCache">Aplicația ar trebui să șterge cache -ul existent data viitoare când va fi pornită?</string>
<string id="SettingsVibration">Ar trebui aplicația să ofere feedback prin vibrații?</string> <string id="SettingsWifiLteExecutionEnable">Activați executarea comenzilor prin Wi-Fi/LTE.</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="SettingsVibration">Aplicația ar trebui să ofere feedback prin vibrații?</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="SettingsAppTimeout">Timeout în câteva secunde. Ieșiți din aplicație după această perioadă de inactivitate pentru a economisi bateria dispozitivului.</string>
<string id="SettingsConfirmTimeout">După acest timp (în secunde), un dialog de confirmare pentru o acțiune este închis automat și acțiunea este anulată. Setați la 0 pentru a dezactiva timeout-ul.</string> <string id="SettingsPollDelay">Întârziere suplimentară a sondajului (în secunde). Adăugă o întârziere între actualizarea de stare a tuturor elementelor din meniu.</string>
<string id="SettingsPin">PIN din 4 cifre care va fi utilizat pentru toate acțiunile care necesită confirmare (0000-9999).</string> <string id="SettingsConfirmTimeout">După acest timp (în câteva secunde), un dialog de confirmare pentru o acțiune este închis automat și acțiunea este anulată. Setați la 0 pentru a dezactiva expirarea.</string>
<string id="SettingsPinError">Vă rugăm să configurați un PIN numeric valid din 4 cifre între 0000 și 9999 în setările aplicației.</string> <string id="SettingsPin">Pinul de 4 cifre pentru a fi utilizat pentru toate acțiunile care îl necesită (0000-9999).</string>
<string id="SettingsTextAlign">Alinierea meniului la stânga (dezactivată) sau la dreapta (activată).</string> <string id="SettingsPinError">Vă rugăm să configurați un pin numeric valid cu 4 cifre între 0000 și 9999 în setările aplicației.</string>
<string id="LeftToRight">De la stânga la dreapta</string> <string id="SettingsTextAlign">Alinierea meniului stânga (oprită) sau dreapta (pornită).</string>
<string id="RightToLeft">De la dreapta la stânga</string> <string id="SettingsLeftToRight">De la stânga la dreapta</string>
<string id="SettingsRightToLeft">Dreapta la stânga</string>
<string id="SettingsWidgetStart">(Numai widget) Porniți automat aplicația din widget fără a aștepta o atingere.</string> <string id="SettingsWidgetStart">(Numai widget) Porniți automat aplicația din widget fără a aștepta o atingere.</string>
<string id="SettingsEnableBatteryLevel">Activați serviciul de fundal pentru a trimite datele despre nivelul bateriei dispozitivului, locația și (dacă este acceptat) datele de activitate către Home Assistant.</string> <string id="SettingsEnableBatteryLevel">Permiteți serviciului de fundal trimită datele bateriei, locația și (dacă este acceptat) date de activitate către asistentul de acasă.</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="SettingsBatteryLevelRefreshRate">Rata de actualizare (în câteva minute) la care serviciul de fundal ar trebui să repete date de trimitere.</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> <string id="SettingsUserHttpHeader">Antetul HTTP furnizat de utilizator</string>
<string id="SettingsUserHttpHeaderDescription">Unele instalații de asistent la domiciliu necesită specificarea unui antet HTTP personalizat pentru a funcționa.</string>
<string id="SettingsUserHttpHeaderName">HTTP-HEADER furnizat de utilizator: Nume</string>
<string id="SettingsUserHttpHeaderValue">HTTP-HEADER furnizat de utilizator: valoare</string>
<string id="SettingsClearWebhookId">Reconectați -vă la asistentul de acasă (Clear Webhook ID, consultați Ghidul de depanare).</string>
<string id="SettingsWebhookId">(Numai citiți) ID -ul WebHook creat de dispozitiv pentru actualizări de servicii de fundal. S -ar putea să solicitați acest lucru pentru depanare.</string>
</strings> </strings>

View File

@@ -25,6 +25,6 @@
<string id="NoApiUrl">V nastaveniach aplikácie chýba adresa URL rozhrania 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="NoConfigUrl">V nastaveniach aplikácie chýba konfiguračná adresa URL</string>
<string id="Unavailable">Nedostupné</string> <string id="Unavailable">Nedostupné</string>
<string id="RightToLeft">Sprava doľava</string> <string id="SettingsRightToLeft">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> <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> </strings>

View File

@@ -9,64 +9,76 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
<!-- <!--
Generated by Google Translate: English to Slovak Generated by Google Translate: English to Slovak
Vygenerované službou Google Translate z angličtiny Generované spoločnosťou Google Translate z angličtiny
--> -->
<strings> <strings>
<string id="ApiFlood">Volania API sú príliš rýchle. Spomaľte svoje požiadavky.</string> <string id="ApiFlood">API volá príliš rýchle. Spomaľte prosím svoje žiadosti.</string>
<string id="ApiUrlNotFound">Adresa URL sa nenašla. Potenciálna chyba webovej adresy rozhrania API v nastaveniach.</string> <string id="ApiUrlNotFound">URL sa nenašla. Potenciálna chyba API URL v nastaveniach.</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">Dostupné</string> <string id="Available" scope="glance">Dostupný</string>
<string id="Cached" scope="glance">Vo vyrovnávacej pamäti</string> <string id="Cached" scope="glance">Ukladaný</string>
<string id="Checking" scope="glance">Prebieha kontrola...</string> <string id="Checking" scope="glance">Kontrola ...</string>
<string id="ConfigUrlNotFound">Adresa URL sa nenašla. Potenciálna chyba konfiguračnej adresy URL v nastaveniach.</string> <string id="ConfigUrlNotFound">URL sa nenašla. Potenciálna chyba URL konfigurácie v nastaveniach.</string>
<string id="Confirm">Potvrďte</string> <string id="Confirm">Potvrďte</string>
<string id="Empty">Prázdny</string> <string id="Empty">Vyprázdn</string>
<string id="Executed" scope="glance">Spustený</string> <string id="Executed" scope="glance">Spustený</string>
<string id="GlanceMenu" scope="glance">Menu</string> <string id="GlanceMenu" scope="glance">Ponuka</string>
<string id="Memory" scope="glance">pamäť</string> <string id="Memory" scope="glance">Pamiatka</string>
<string id="NoAPIKey" scope="glance">V nastaveniach aplikácie chýba kľúč API</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="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="NoConfigUrl" scope="glance">V nastaveniach aplikácie chýba konfiguračná adresa URL</string>
<string id="NoInternet">Žiadne internetové pripojenie.</string> <string id="NoInternet">Žiadne pripojenie na internet.</string>
<string id="NoJson">Z požiadavky HTTP sa nevrátil žiadny JSON.</string> <string id="NoJson">Z požiadavky HTTP sa nevrátil žiadny JSON.</string>
<string id="NoPhone" scope="glance">Žiadne telefónne spojenie.</string> <string id="NoPhone" scope="glance">Žiadne pripojenie do telefónu.</string>
<string id="NoResponse">Žiadna odpoveď, skontrolujte internetové pripojenie</string> <string id="NoPhoneNoCache" scope="glance">Žiadne pripojenie telefónu, žiadne ponuka v pamäti cache.</string>
<string id="PinInputLocked">Vstup PIN zablokovaný pre</string> <string id="NoResponse">Žiadna odpoveď, skontrolujte pripojenie na internet</string>
<string id="TimedOut">Požadovať časovanú</string>
<string id="PinInputLocked">Vstup na kolík uzamknutý pre</string>
<string id="PotentialError">Potenciálna chyba</string> <string id="PotentialError">Potenciálna chyba</string>
<string id="Seconds">sekúnd</string> <string id="Seconds">sekundy</string>
<string id="TemplateError">Chyba šablóny</string> <string id="TemplateError">Chyba šablóny</string>
<string id="TrailingSlashErr">Adresa URL rozhrania API nesmie obsahovať koncovú lomku „/“.</string> <string id="TrailingSlashErr">URL API nesmie mať koncové lomítko '/'.</string>
<string id="Unavailable" scope="glance">Nedostupné</string> <string id="Unavailable" scope="glance">Nedostupné</string>
<string id="Unconfigured" scope="glance">Nekonfigurované</string> <string id="Unconfigured" scope="glance">Nekonfigurovaný</string>
<string id="UnhandledHttpErr">Požiadavka HTTP vrátila kód chyby =</string> <string id="UnhandledHttpErr">Požiadavka HTTP vrátená chybová kód =</string>
<string id="WebhookFailed">Registrácia Webhooku zlyhala</string> <string id="WebhookFailed">Nepodarilo sa zaregistrovať webhook</string>
<string id="WrongPin">Nesprávny PIN</string> <string id="WrongPin">Nesprávny kolík</string>
<!-- Pre nastavenia GUI by reťazce mali byť v poradí, v akom sa používajú. --> <string id="WifiLteNotAvailable">Nie sú k dispozícii žiadne Wi-Fi alebo LTE</string>
<string id="SettingsSelect">Vybrať...</string> <string id="WifiLtePrompt">Vykonajte cez Wi-Fi/LTE?</string>
<string id="SettingsApiKey">Kľúč API pre HomeAssistant.</string> <string id="WifiLteExecutionTitle">Posielanie domáceho asistenta.</string>
<string id="WifiLteExecutionDataError">Žiadne prijaté údaje.</string>
<!-- V prípade nastavení GUI by mali byť reťazce v poradí, v akom sa používajú. -->
<string id="SettingsSelect">Vyberte ...</string>
<string id="SettingsApiKey">Kľúč API pre Homeassistant.</string>
<string id="SettingsApiKeyPrompt">Prístupový token s dlhou životnosťou.</string> <string id="SettingsApiKeyPrompt">Prístupový token s dlhou životnosťou.</string>
<string id="SettingsApiUrl">URL pre HomeAssistant API.</string> <string id="SettingsApiUrl">URL pre API Homeassistant.</string>
<string id="SettingsConfigUrl">Webová adresa pre konfiguráciu ponuky (JSON).</string> <string id="SettingsConfigUrl">URL 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="SettingsCacheConfig">Mala by sa aplikácia vyrovnávať konfiguráciu ponuky?</string>
<string id="SettingsClearCache">Mala by aplikácia pri ďalšom spustení vymazať existujúcu vyrovnávaciu pamäť?</string> <string id="SettingsClearCache">Mala by aplikácia vymazať existujúcu vyrovnávaciu pamäť nabudúce, keď sa začne?</string>
<string id="SettingsWifiLteExecutionEnable">Povoliť vykonávanie príkazov cez Wi-Fi/LTE.</string>
<string id="SettingsVibration">Mala by aplikácia poskytovať spätnú väzbu prostredníctvom vibrácií?</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="SettingsAppTimeout">Časový limit v sekundách. Opustite aplikáciu po tomto období nečinnosti, aby ste uložili 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="SettingsPollDelay">Ďalšie oneskorenie ankety (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 časový limit deaktivovať, nastavte na 0.</string> <string id="SettingsConfirmTimeout">Po tomto čase (v sekundách) sa dialógové okno pre akciu automaticky zatvorí a akcia je zrušená. Nastavte na 0, aby ste zakázali časový limit.</string>
<string id="SettingsPin">4-ciferný PIN, ktorý sa má použiť pre všetky akcie, ktoré vyžadujú potvrdenie (0000-9999).</string> <string id="SettingsPin">4-ciferníkový kolík, ktorý sa má použiť pre všetky akcie, ktoré to vyžadujú (0000-9999).</string>
<string id="SettingsPinError">V nastaveniach aplikácie nakonfigurujte platný 4-miestny číselný kód PIN medzi 0000 a 9999.</string> <string id="SettingsPinError">V nastaveniach aplikácie nakonfigurujte platný štvorciferný číselný kolík medzi 0000 a 9999.</string>
<string id="SettingsTextAlign">Zarovnanie ponuky vľavo (vypnuté) alebo vpravo (zapnuté).</string> <string id="SettingsTextAlign">Zarovnanie ponuky vľavo (vypnuté) alebo doprava.</string>
<string id="LeftToRight">Zľava doprava</string> <string id="SettingsLeftToRight">Zľava doprava</string>
<string id="RightToLeft">Sprava doľava</string> <string id="SettingsRightToLeft">Sprava doľava</string>
<string id="SettingsWidgetStart">(Len miniaplikácia) Automaticky spustite aplikáciu z miniaplikácie bez čakania na klepnutie.</string> <string id="SettingsWidgetStart">(Iba widget) Automaticky spustite aplikáciu z miniaplikácie bez čakania na kohútik.</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="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="SettingsBatteryLevelRefreshRate">Rýchlosť obnovenia (v minútach), pri ktorej by služba pozadia 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> <string id="SettingsUserHttpHeader">Hlavička HTTP dodaná používateľom</string>
<string id="SettingsUserHttpHeaderDescription">Niektoré inštalácie domáceho asistenta vyžadujú, aby sa na fungovanie špecifikácia vlastnej hlavičky HTTP.</string>
<string id="SettingsUserHttpHeaderName">Užívateľ dodávaný HTTP-Header: názov</string>
<string id="SettingsUserHttpHeaderValue">Užívateľ dodávaný HTTP-Header: Hodnota</string>
<string id="SettingsClearWebhookId">Pripojte sa s domácim asistentom (Clear WebHook ID, pozri Sprievodca riešením problémov).</string>
<string id="SettingsWebhookId">(Iba prečítajte) ID WebHook vytvorené zariadením pre aktualizácie služieb na pozadí. Možno to potrebujete na ladenie.</string>
</strings> </strings>

View File

@@ -9,64 +9,76 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
<!-- <!--
Generated by Google Translate: English to Slovenian Generated by Google Translate: English to Slovenian
Ustvaril Google Translate iz angleščine Ustvari Google Translate iz angleščine
--> -->
<strings> <strings>
<string id="ApiFlood">API klici so prehitri. Prosim, upočasnite svoje zahteve.</string> <string id="ApiFlood">API kliče prehitro. Upočasnite svoje zahteve.</string>
<string id="ApiUrlNotFound">URL-ja ni bilo mogoče najti. Morebitna napaka URL-ja API-ja v nastavitvah.</string> <string id="ApiUrlNotFound">URL ni najden. Potencialna napaka URL API v nastavitvah.</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">Na voljo</string> <string id="Available" scope="glance">Na voljo</string>
<string id="Cached" scope="glance">Predpomnjeno</string> <string id="Cached" scope="glance">Predpomnjen</string>
<string id="Checking" scope="glance">Preverjanje ...</string> <string id="Checking" scope="glance">Preverjanje ...</string>
<string id="ConfigUrlNotFound">URL-ja ni bilo mogoče najti. Morebitna napaka URL-ja konfiguracije v nastavitvah.</string> <string id="ConfigUrlNotFound">URL ni najden. Potencialna napaka URL konfiguracije v nastavitvah.</string>
<string id="Confirm">Seveda?</string> <string id="Confirm">Zagotovo?</string>
<string id="Empty">prazno</string> <string id="Empty">Prazen</string>
<string id="Executed" scope="glance">Potrjeno</string> <string id="Executed" scope="glance">Potrjeno</string>
<string id="GlanceMenu" scope="glance">meni</string> <string id="GlanceMenu" scope="glance">Meni</string>
<string id="Memory" scope="glance">Spomin</string> <string id="Memory" scope="glance">Spomin</string>
<string id="NoAPIKey" scope="glance">V nastavitvah aplikacije ni ključa API.</string> <string id="NoAPIKey" scope="glance">V nastavitvah aplikacije ni ključa API -ja.</string>
<string id="NoApiUrl" scope="glance">V nastavitvah aplikacije ni URL-ja API-ja.</string> <string id="NoApiUrl" scope="glance">V nastavitvah aplikacije ni URL API -ja.</string>
<string id="NoConfigUrl" scope="glance">V nastavitvah aplikacije ni konfiguracijskega URL-ja.</string> <string id="NoConfigUrl" scope="glance">V nastavitvah aplikacije ni URL konfiguracije.</string>
<string id="NoInternet">Ni internetne povezave.</string> <string id="NoInternet">Brez internetne povezave.</string>
<string id="NoJson">Zahteva HTTP ni vrnila JSON.</string> <string id="NoJson">Noben JSON se ni vrnil z zahteve HTTP.</string>
<string id="NoPhone" scope="glance">Ni telefonske povezave.</string> <string id="NoPhone" scope="glance">Brez telefonske povezave.</string>
<string id="NoResponse">Ni odgovora, preverite internetno povezavo</string> <string id="NoPhoneNoCache" scope="glance">Brez telefonske povezave, brez predpomnjenega menija.</string>
<string id="PinInputLocked">Vnos PIN zaklenjen za</string> <string id="NoResponse">Brez odgovora, preverite internetno povezavo</string>
<string id="TimedOut">Zahtevo, ki je bila izpuščena</string>
<string id="PinInputLocked">PIN vhod zaklenjen za</string>
<string id="PotentialError">Potencialna napaka</string> <string id="PotentialError">Potencialna napaka</string>
<string id="Seconds">sekund</string> <string id="Seconds">sekunde</string>
<string id="TemplateError">Napaka predloge</string> <string id="TemplateError">Napaka predloge</string>
<string id="TrailingSlashErr">URL API-ja ne sme imeti končne poševnice '/'.</string> <string id="TrailingSlashErr">URL API ne sme imeti zadnjega poševnice '/'.</string>
<string id="Unavailable" scope="glance">Ni na voljo</string> <string id="Unavailable" scope="glance">Ni na voljo</string>
<string id="Unconfigured" scope="glance">Nekonfigurirano</string> <string id="Unconfigured" scope="glance">Neskladen</string>
<string id="UnhandledHttpErr">Zahteva HTTP je vrnila kodo napake =</string> <string id="UnhandledHttpErr">HTTP Zahteva Vrtena koda napake =</string>
<string id="WebhookFailed">Webhooka ni bilo mogoče registrirati</string> <string id="WebhookFailed">Ni uspel registrirati spletnega mesta</string>
<string id="WrongPin">Napačen PIN</string> <string id="WrongPin">Napačen zatič</string>
<!-- Za GUI nastavitev morajo biti nizi v vrstnem redu, kot so uporabljeni. --> <string id="WifiLteNotAvailable">Ni na voljo Wi-Fi ali LTE</string>
<string id="WifiLtePrompt">Izvedite preko Wi-Fi/LTE?</string>
<string id="WifiLteExecutionTitle">Pošiljanje domačemu asistentu.</string>
<string id="WifiLteExecutionDataError">Brez prejetih podatkov.</string>
<!-- Za nastavitve GUI bi morale biti strune v vrstnem redu, ki ga uporabljajo. -->
<string id="SettingsSelect">Izberite ...</string> <string id="SettingsSelect">Izberite ...</string>
<string id="SettingsApiKey">API ključ za HomeAssistant.</string> <string id="SettingsApiKey">Ključ API za Homeassistant.</string>
<string id="SettingsApiKeyPrompt">Dolgoživ dostopni žeton.</string> <string id="SettingsApiKeyPrompt">Dolgotrajni žeton dostopa.</string>
<string id="SettingsApiUrl">URL za API HomeAssistant.</string> <string id="SettingsApiUrl">URL za domači API.</string>
<string id="SettingsConfigUrl">URL za konfiguracijo menija (JSON).</string> <string id="SettingsConfigUrl">URL za konfiguracijo menija (JSON).</string>
<string id="SettingsCacheConfig">Ali naj aplikacija predpomni konfiguracijo menija?</string> <string id="SettingsCacheConfig">Ali naj aplikacija predpomni konfiguracija menija?</string>
<string id="SettingsClearCache">Ali naj aplikacija ob naslednjem zagonu počisti obstoječi predpomnilnik?</string> <string id="SettingsClearCache">Ali bi morala aplikacija očistiti obstoječi predpomnilnik naslednjič, ko se začne?</string>
<string id="SettingsVibration">Ali naj aplikacija posreduje povratne informacije prek vibriranja?</string> <string id="SettingsWifiLteExecutionEnable">Omogoči izvajanje ukazov prek Wi-Fi/LTE.</string>
<string id="SettingsAppTimeout">Časovna omejitev v sekundah. Po tem obdobju nedejavnosti zaprite aplikacijo, da prihranite baterijo naprave.</string> <string id="SettingsVibration">Ali bi morala aplikacija posredovati povratne informacije z vibracijami?</string>
<string id="SettingsPollDelay">Dodatna zakasnitev ankete (v sekundah). Doda zakasnitev med posodobitvijo stanja vseh elementov menija.</string> <string id="SettingsAppTimeout">Časovna omejitev v nekaj sekundah. Po tem obdobju neaktivnosti zapustite aplikacijo, da shranite baterijo naprave.</string>
<string id="SettingsConfirmTimeout">Po tem času (v sekundah) se potrditveno pogovorno okno za dejanje samodejno zapre in dejanje je preklicano. Nastavite na 0, da onemogočite časovno omejitev.</string> <string id="SettingsPollDelay">Dodatna zamuda ankete (v sekundah). Doda zamudo med posodobitvijo stanja vseh elementov menija.</string>
<string id="SettingsPin">4-mestni PIN, ki se uporablja za vsa dejanja, ki zahtevajo potrditev (0000-9999).</string> <string id="SettingsConfirmTimeout">Po tem času (v sekundah) se potrditveno pogovorno okno za dejanje samodejno zapre in dejanje prekliče. Nastavite na 0, da onemogočite časovno omejitev.</string>
<string id="SettingsPinError">V nastavitvah aplikacije konfigurirajte veljavno 4-mestno številčno kodo PIN med 0000 in 9999.</string> <string id="SettingsPin">4-mestni zatič, ki ga je treba uporabiti za vsa dejanja, ki ga zahtevajo (0000-9999).</string>
<string id="SettingsTextAlign">Leva (izklopljena) ali desna (vklopljena) poravnava menija.</string> <string id="SettingsPinError">V nastavitvah aplikacije konfigurirajte veljaven 4-mestni številčni zatič med 0000 in 9999.</string>
<string id="LeftToRight">Od leve proti desni</string> <string id="SettingsTextAlign">Levo (izklopljeno) ali desno (vklopljeno) poravnavo menija.</string>
<string id="RightToLeft">Od desne proti levi</string> <string id="SettingsLeftToRight">Levo proti desni</string>
<string id="SettingsWidgetStart">(Samo pripomoček) Samodejno zaženite aplikacijo iz pripomočka, ne da bi čakali na dotik.</string> <string id="SettingsRightToLeft">Desno na levo</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="SettingsWidgetStart">(Samo pripomoček) Samodejno zaženite aplikacijo iz pripomočka, ne da bi čakali na pipo.</string>
<string id="SettingsBatteryLevelRefreshRate">Hitrost osveževanja (v minutah), pri kateri naj storitev v ozadju ponavlja pošiljanje podatkov.</string> <string id="SettingsEnableBatteryLevel">Omogočite storitve v ozadju, da pošlje nivo baterije, lokacijo in (če je podprta) podatke o dejavnostih domačemu asistentu.</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> <string id="SettingsBatteryLevelRefreshRate">Stopnja osveževanja (v nekaj minutah), pri kateri naj bi storitev v ozadju ponovila podatke za pošiljanje.</string>
<string id="SettingsUserHttpHeader">Uporabnik je dobavil Http Header</string>
<string id="SettingsUserHttpHeaderDescription">Nekatere namestitve domačega asistenta zahtevajo specifikacijo glave HTTP po meri za delovanje.</string>
<string id="SettingsUserHttpHeaderName">Uporabnik dobavljen http-header: ime</string>
<string id="SettingsUserHttpHeaderValue">Uporabnik dobavljen http-header: vrednost</string>
<string id="SettingsClearWebhookId">Ponovno povežite na domačega pomočnika (Clear Webhook ID, glejte Vodnik za odpravljanje težav).</string>
<string id="SettingsWebhookId">(Samo preberite) ID spletnega mesta, ki ga je ustvarila naprava za posodobitve storitev v ozadju. To boste morda potrebovali za odpravljanje napak.</string>
</strings> </strings>

View File

@@ -9,7 +9,7 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
@@ -19,13 +19,13 @@
--> -->
<strings> <strings>
<string id="ApiFlood">Las llamadas a la API son demasiado rápidas. Reduzca la velocidad de sus solicitudes.</string> <string id="ApiFlood">API llama demasiado rápido. Reduzca sus solicitudes.</string>
<string id="ApiUrlNotFound">URL no encontrada. Posible error de URL de API en la configuración.</string> <string id="ApiUrlNotFound">URL no encontrada. Error de URL de API potencial en la configuración.</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">Disponible</string> <string id="Available" scope="glance">Disponible</string>
<string id="Cached" scope="glance">En caché</string> <string id="Cached" scope="glance">En caché</string>
<string id="Checking" scope="glance">De cheques...</string> <string id="Checking" scope="glance">De cheques...</string>
<string id="ConfigUrlNotFound">URL no encontrada. Posible error de configuración de URL en los ajustes.</string> <string id="ConfigUrlNotFound">URL no encontrada. Error de URL de configuración potencial en la configuración.</string>
<string id="Confirm">¿Seguro?</string> <string id="Confirm">¿Seguro?</string>
<string id="Empty">Vacío</string> <string id="Empty">Vacío</string>
<string id="Executed" scope="glance">Confirmado</string> <string id="Executed" scope="glance">Confirmado</string>
@@ -35,38 +35,50 @@
<string id="NoApiUrl" scope="glance">No hay URL de API en la configuración de la aplicación.</string> <string id="NoApiUrl" scope="glance">No hay URL de API en la configuración de la aplicación.</string>
<string id="NoConfigUrl" scope="glance">No hay URL de configuración en la configuración de la aplicación.</string> <string id="NoConfigUrl" scope="glance">No hay URL de configuración en la configuración de la aplicación.</string>
<string id="NoInternet">Sin conexión a Internet.</string> <string id="NoInternet">Sin conexión a Internet.</string>
<string id="NoJson">No se devolvió JSON de la solicitud HTTP.</string> <string id="NoJson">No JSON regresó de la solicitud HTTP.</string>
<string id="NoPhone" scope="glance">Sin conexión telefónica.</string> <string id="NoPhone" scope="glance">Sin conexión telefónica.</string>
<string id="NoPhoneNoCache" scope="glance">Sin conexión telefónica, sin menú en caché.</string>
<string id="NoResponse">Sin respuesta, verifique la conexión a Internet</string> <string id="NoResponse">Sin respuesta, verifique la conexión a Internet</string>
<string id="PinInputLocked">Entrada de PIN bloqueada para</string> <string id="TimedOut">Solicitar el tiempo de tiempo fuera</string>
<string id="PinInputLocked">Entrada de pasador bloqueada para</string>
<string id="PotentialError">Error potencial</string> <string id="PotentialError">Error potencial</string>
<string id="Seconds">artículos de segunda clase</string> <string id="Seconds">artículos de segunda clase</string>
<string id="TemplateError">Error de plantilla</string> <string id="TemplateError">Error de plantilla</string>
<string id="TrailingSlashErr">La URL de la API no debe tener una barra diagonal final '/'.</string> <string id="TrailingSlashErr">La URL de la API no debe tener una barra de corte '/'.</string>
<string id="Unavailable" scope="glance">Indisponible</string> <string id="Unavailable" scope="glance">Indisponible</string>
<string id="Unconfigured" scope="glance">Sin configurar</string> <string id="Unconfigured" scope="glance">No configurado</string>
<string id="UnhandledHttpErr">La solicitud HTTP devolvió el código de error =</string> <string id="UnhandledHttpErr">HTTP Solicitud devuelto código de error =</string>
<string id="WebhookFailed">Error al registrar el Webhook</string> <string id="WebhookFailed">No se pudo registrar webhook</string>
<string id="WrongPin">PIN incorrecto</string> <string id="WrongPin">Pin incorrecto</string>
<!-- Para la configuración GUI, las cadenas deben estar en el orden en que se utilizan. --> <string id="WifiLteNotAvailable">No hay Wi-Fi o LTE disponible</string>
<string id="WifiLtePrompt">Ejecutar sobre wi-fi/lte?</string>
<string id="WifiLteExecutionTitle">Enviando al asistente de casa.</string>
<string id="WifiLteExecutionDataError">No se reciben datos.</string>
<!-- Para la GUI de configuración, las cadenas deben estar en el orden en que se usan. -->
<string id="SettingsSelect">Seleccionar...</string> <string id="SettingsSelect">Seleccionar...</string>
<string id="SettingsApiKey">Clave API para HomeAssistant.</string> <string id="SettingsApiKey">Clave API para Homeassistant.</string>
<string id="SettingsApiKeyPrompt">Token de acceso de larga duración.</string> <string id="SettingsApiKeyPrompt">Token de acceso de larga vida.</string>
<string id="SettingsApiUrl">URL para la API de HomeAssistant.</string> <string id="SettingsApiUrl">URL para la API de Homeassistante.</string>
<string id="SettingsConfigUrl">URL para la configuración del menú (JSON).</string> <string id="SettingsConfigUrl">URL para la configuración del menú (JSON).</string>
<string id="SettingsCacheConfig">¿Debe la aplicación almacenar en caché la configuración del menú?</string> <string id="SettingsCacheConfig">¿Debería la aplicación almacenar en caché la configuración del menú?</string>
<string id="SettingsClearCache">¿La aplicación debe borrar el caché existente la próxima vez que se inicie?</string> <string id="SettingsClearCache">¿Debería la aplicación 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="SettingsWifiLteExecutionEnable">Habilite la ejecución de comandos sobre Wi-Fi/LTE.</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="SettingsVibration">¿Debería la aplicación proporcionar comentarios a través de vibraciones?</string>
<string id="SettingsPollDelay">Retraso de sondeo adicional (en segundos). Agrega un retraso entre la actualización de estado de todos los elementos del menú.</string> <string id="SettingsAppTimeout">Tiempo de espera en segundos. Salga de la aplicación después de este período de inactividad para guardar la batería del dispositivo.</string>
<string id="SettingsConfirmTimeout">Después de este tiempo (en segundos), se cierra automáticamente un cuadro de diálogo de confirmación de una acción y se cancela la acción. Establezca en 0 para desactivar el tiempo de espera.</string> <string id="SettingsPollDelay">Retraso de encuesta adicional (en segundos). Agrega un retraso entre la actualización de estado de todos los elementos del menú.</string>
<string id="SettingsPin">PIN de 4 dígitos a utilizar para todas las acciones que requieran confirmación (0000-9999).</string> <string id="SettingsConfirmTimeout">Después de este tiempo (en segundos), un diálogo de confirmación para una acción se cierra automáticamente y se cancela la acción. Establecer en 0 para deshabilitar el tiempo de espera.</string>
<string id="SettingsPin">Pin de 4 dígitos que se utilizará para todas las acciones que lo requieren (0000-9999).</string>
<string id="SettingsPinError">Configure un PIN numérico válido de 4 dígitos entre 0000 y 9999 en la configuración de la aplicación.</string> <string id="SettingsPinError">Configure un PIN numérico válido de 4 dígitos entre 0000 y 9999 en la configuración de la aplicación.</string>
<string id="SettingsTextAlign">Alineación del menú izquierda (desactivada) o derecha (activada).</string> <string id="SettingsTextAlign">Alineación del menú izquierda (apagada) o derecha (encendida).</string>
<string id="LeftToRight">De izquierda a derecha</string> <string id="SettingsLeftToRight">De izquierda a derecha</string>
<string id="RightToLeft">De derecha a izquierda</string> <string id="SettingsRightToLeft">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="SettingsWidgetStart">(Solo widget) Inicie 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) los datos de actividad a Home Assistant.</string> <string id="SettingsEnableBatteryLevel">Habilite el servicio de fondo para enviar el nivel de batería del dispositivo, la ubicación y (si se admiten) datos de actividad al asistente de inicio.</string>
<string id="SettingsBatteryLevelRefreshRate">La frecuencia de actualización (en minutos) con la que el servicio en segundo plano debe repetir el envío de datos.</string> <string id="SettingsBatteryLevelRefreshRate">La tasa de actualización (en minutos) en la que el servicio de fondo debe repetir los datos de envío.</string>
<string id="WebhookId">(Solo lectura) El ID del webhook creado por el dispositivo para las actualizaciones del servicio en segundo plano. Es posible que lo necesites para la depuración.</string> <string id="SettingsUserHttpHeader">Encabezado HTTP suministrado por el usuario</string>
<string id="SettingsUserHttpHeaderDescription">Algunas instalaciones de asistente de inicio requieren la especificación de un encabezado HTTP personalizado para funcionar.</string>
<string id="SettingsUserHttpHeaderName">Header HTTP suministrado por el usuario: nombre</string>
<string id="SettingsUserHttpHeaderValue">Header HTTP suministrado por el usuario: valor</string>
<string id="SettingsClearWebhookId">Vuelva a conectar al Asistente de inicio (claro ID de webhook, consulte la Guía de solución de problemas).</string>
<string id="SettingsWebhookId">(Solo lea) la ID de webhook creada por el dispositivo para actualizaciones del servicio de fondo. Es posible que necesite esto para la depuración.</string>
</strings> </strings>

View File

@@ -9,64 +9,76 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
<!-- <!--
Generated by Google Translate: English to Swedish Generated by Google Translate: English to Swedish
Genereras av Google Translate från engelska Genererad av Google översätter från engelska
--> -->
<strings> <strings>
<string id="ApiFlood">API-anrop för snabba. Vänligen sakta ner dina förfrågningar.</string> <string id="ApiFlood">API kallar för snabbt. Vänligen sakta ner dina förfrågningar.</string>
<string id="ApiUrlNotFound">Webbadressen hittades inte. Potentiellt API-URL-fel i inställningarna.</string> <string id="ApiUrlNotFound">URL hittades inte. Potentiellt API URL -fel i inställningar.</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">Tillgänglig</string> <string id="Available" scope="glance">Tillgänglig</string>
<string id="Cached" scope="glance">Cachad</string> <string id="Cached" scope="glance">Cache</string>
<string id="Checking" scope="glance">Kontroll...</string> <string id="Checking" scope="glance">Kontroll...</string>
<string id="ConfigUrlNotFound">Webbadressen hittades inte. Potentiellt konfigurations-URL-fel i inställningarna.</string> <string id="ConfigUrlNotFound">URL hittades inte. Potentiellt konfigurations -URL -fel i inställningar.</string>
<string id="Confirm">Säker?</string> <string id="Confirm">Säker?</string>
<string id="Empty">Tömma</string> <string id="Empty">Tömma</string>
<string id="Executed" scope="glance">Bekräftad</string> <string id="Executed" scope="glance">Bekräftad</string>
<string id="GlanceMenu" scope="glance">Meny</string> <string id="GlanceMenu" scope="glance">Meny</string>
<string id="Memory" scope="glance">Minne</string> <string id="Memory" scope="glance">Minne</string>
<string id="NoAPIKey" scope="glance">Ingen API-nyckel i applikationsinställningarna.</string> <string id="NoAPIKey" scope="glance">Ingen API -nyckel i applikationsinställningarna.</string>
<string id="NoApiUrl" scope="glance">Ingen API-URL i applikationsinstä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="NoConfigUrl" scope="glance">Ingen konfigurations -URL i applikationsinställningarna.</string>
<string id="NoInternet">Ingen internetanslutning.</string> <string id="NoInternet">Ingen internetanslutning.</string>
<string id="NoJson">Ingen JSON returnerades från HTTP-begäran.</string> <string id="NoJson">Ingen JSON återvände från HTTP -begäran.</string>
<string id="NoPhone" scope="glance">Ingen telefonanslutning.</string> <string id="NoPhone" scope="glance">Ingen telefonanslutning.</string>
<string id="NoResponse">Inget svar, kontrollera internetanslutningen</string> <string id="NoPhoneNoCache" scope="glance">Ingen telefonanslutning, ingen cache -meny.</string>
<string id="PinInputLocked">PIN-inmatning låst för</string> <string id="NoResponse">Inget svar, kolla Internetanslutning</string>
<string id="TimedOut">Begära tidsinställd</string>
<string id="PinInputLocked">PIN -ingång låst för</string>
<string id="PotentialError">Potentiellt fel</string> <string id="PotentialError">Potentiellt fel</string>
<string id="Seconds">sekunder</string> <string id="Seconds">sekunder</string>
<string id="TemplateError">Mallfel</string> <string id="TemplateError">Mallfel</string>
<string id="TrailingSlashErr">API-URL får inte ha ett snedstreck '/'.</string> <string id="TrailingSlashErr">API URL får inte ha en släpande snedstreck '/'.</string>
<string id="Unavailable" scope="glance">Inte tillgänglig</string> <string id="Unavailable" scope="glance">Inte tillgänglig</string>
<string id="Unconfigured" scope="glance">Okonfigurerad</string> <string id="Unconfigured" scope="glance">Okonfigurerad</string>
<string id="UnhandledHttpErr">HTTP-begäran returnerade felkod =</string> <string id="UnhandledHttpErr">Http -begäran returnerad felkod =</string>
<string id="WebhookFailed">Det gick inte att registrera Webhook</string> <string id="WebhookFailed">Det gick inte att registrera webhook</string>
<string id="WrongPin">Fel PIN-kod</string> <string id="WrongPin">Felstift</string>
<!-- För inställningarna GUI, bör strängar vara i den ordning de används. --> <string id="WifiLteNotAvailable">Ingen Wi-Fi eller LTE tillgänglig</string>
<string id="WifiLtePrompt">Utför över Wi-Fi/LTE?</string>
<string id="WifiLteExecutionTitle">Skickar till hemassistent.</string>
<string id="WifiLteExecutionDataError">Inga data mottagna.</string>
<!-- För inställningsgui bör strängar vara i den ordning de används. -->
<string id="SettingsSelect">Välja...</string> <string id="SettingsSelect">Välja...</string>
<string id="SettingsApiKey">API-nyckel för HomeAssistant.</string> <string id="SettingsApiKey">API -nyckel för homeassistant.</string>
<string id="SettingsApiKeyPrompt">Långlivad åtkomsttoken.</string> <string id="SettingsApiKeyPrompt">Långlivad åtkomsttoken.</string>
<string id="SettingsApiUrl">URL för HomeAssistant API.</string> <string id="SettingsApiUrl">URL för homeassistant API.</string>
<string id="SettingsConfigUrl">URL för menykonfiguration (JSON).</string> <string id="SettingsConfigUrl">URL för menykonfiguration (JSON).</string>
<string id="SettingsCacheConfig">Ska programmet cachelagra menykonfigurationen?</string> <string id="SettingsCacheConfig">Bör applikationen cache menykonfigurationen?</string>
<string id="SettingsClearCache">Ska programmet rensa den befintliga cachen nästa gång den startas?</string> <string id="SettingsClearCache">Bör applikationen rensa den befintliga cachen nästa gång den startas?</string>
<string id="SettingsVibration">Ska applikationen ge feedback via vibrationer?</string> <string id="SettingsWifiLteExecutionEnable">Aktivera körkommandon över Wi-Fi/LTE.</string>
<string id="SettingsAppTimeout">Timeout i sekunder. Avsluta programmet efter denna period av inaktivitet för att spara enhetens batteri.</string> <string id="SettingsVibration">Bör applikationen ge feedback via vibrationer?</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="SettingsAppTimeout">Timeout på några sekunder. Exit the application after this period of inactivity to save the device battery.</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="SettingsPollDelay">Ytterligare undersökningsfördröjning (på några sekunder). Lägger till en försening mellan statusuppdateringen av alla menyalternativ.</string>
<string id="SettingsPin">4-siffrig PIN-kod som ska användas för alla åtgärder som kräver bekräftelse (0000-9999).</string> <string id="SettingsConfirmTimeout">Efter denna tid (på några 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="SettingsPinError">Vänligen konfigurera en giltig 4-siffrig numerisk PIN-kod mellan 0000 och 9999 i programinställningarna.</string> <string id="SettingsPin">4-siffriga stift som ska användas för alla åtgärder som kräver det (0000-9999).</string>
<string id="SettingsTextAlign">Vänster (av) eller höger (på) menyjustering.</string> <string id="SettingsPinError">Konfigurera en giltig fyrsiffrig numerisk stift mellan 0000 och 9999 i applikationsinställningarna.</string>
<string id="LeftToRight">Vänster till höger</string> <string id="SettingsTextAlign">Vänster (av) eller höger (på) menyinriktning.</string>
<string id="RightToLeft">Höger till vänster</string> <string id="SettingsLeftToRight">Vänster till höger</string>
<string id="SettingsWidgetStart">(Endast widget) Starta programmet automatiskt från widgeten utan att vänta på ett tryck.</string> <string id="SettingsRightToLeft">Höger till vänster</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="SettingsWidgetStart">(Endast widget) Starta automatiskt applikationen från widgeten utan att vänta på en kran.</string>
<string id="SettingsBatteryLevelRefreshRate">Uppdateringshastigheten (i minuter) med vilken bakgrundstjänsten ska upprepa sändning av data.</string> <string id="SettingsEnableBatteryLevel">Aktivera bakgrundstjänsten att skicka enhetens batterinivå, plats och (om stödd) aktivitetsdata till hemassistent.</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> <string id="SettingsBatteryLevelRefreshRate">Uppdateringsfrekvensen (i minuter) där bakgrundstjänsten ska upprepa skicka data.</string>
<string id="SettingsUserHttpHeader">Användar levererad HTTP -rubrik</string>
<string id="SettingsUserHttpHeaderDescription">Vissa hemassistentinstallationer kräver specifikation av en anpassad HTTP -rubrik för att fungera.</string>
<string id="SettingsUserHttpHeaderName">Användare levererad http-header: namn</string>
<string id="SettingsUserHttpHeaderValue">Användare levererad http-header: värde</string>
<string id="SettingsClearWebhookId">Anslut till hemassistent (Clear WebHook ID, se Felsökningsguide).</string>
<string id="SettingsWebhookId">(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> </strings>

View File

@@ -9,7 +9,7 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
@@ -19,54 +19,66 @@
--> -->
<strings> <strings>
<string id="ApiFlood">การเรียก API เร็วเกินไป กรุณาลดความเร็วคำขอของคุณลง</string> <string id="ApiFlood">API เรียกเร็วเกินไป โปรดชะลอคำขอของคุณ</string>
<string id="ApiUrlNotFound">ไม่พบ URL อาจมีข้อผิดพลาด URL API ในการตั้งค่า</string> <string id="ApiUrlNotFound">ไม่พบ URL ข้อผิดพลาด API URL ที่อาจเกิดขึ้นในการตั้งค่า</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">มีอยู่</string> <string id="Available" scope="glance">มีอยู่</string>
<string id="Cached" scope="glance">แคช</string> <string id="Cached" scope="glance">แคช</string>
<string id="Checking" scope="glance">กำลังตรวจสอบ...</string> <string id="Checking" scope="glance">ตรวจสอบ ...</string>
<string id="ConfigUrlNotFound">ไม่พบ URL อาจมีข้อผิดพลาดเกี่ยวกับ URL การกำหนดค่าในการตั้งค่า</string> <string id="ConfigUrlNotFound">ไม่พบ URL ข้อผิดพลาด URL การกำหนดค่าที่มีศักยภาพในการตั้งค่า</string>
<string id="Confirm">แน่นอน?</string> <string id="Confirm">แน่นอน?</string>
<string id="Empty">ว่างเปล่า</string> <string id="Empty">ว่างเปล่า</string>
<string id="Executed" scope="glance">ได้รับการยืนยันแล้ว</string> <string id="Executed" scope="glance">ที่ได้ยืนยันแล้ว</string>
<string id="GlanceMenu" scope="glance">เมนู</string> <string id="GlanceMenu" scope="glance">เมนู</string>
<string id="Memory" scope="glance">หน่วยความจำ</string> <string id="Memory" scope="glance">หน่วยความจำ</string>
<string id="NoAPIKey" scope="glance">ไม่มีคีย์ API ในการตั้งค่าแอปพลิเคชัน</string> <string id="NoAPIKey" scope="glance">ไม่มีคีย์ API ในการตั้งค่าแอปพลิเคชัน</string>
<string id="NoApiUrl" scope="glance">ไม่มี URL API ในการตั้งค่าแอปพลิเคชัน</string> <string id="NoApiUrl" scope="glance">ไม่มี URL API ในการตั้งค่าแอปพลิเคชัน</string>
<string id="NoConfigUrl" scope="glance">ไม่มี URL การกำหนดค่าในการตั้งค่าแอปพลิเคชัน</string> <string id="NoConfigUrl" scope="glance">ไม่มี URL การกำหนดค่าในการตั้งค่าแอปพลิเคชัน</string>
<string id="NoInternet">ไม่มีการเชื่อมต่ออินเอร์เน็ต</string> <string id="NoInternet">ไม่มีการเชื่อมต่ออินเอร์เน็ต</string>
<string id="NoJson">ไม่มี JSON ที่ส่งคืนจากคำขอ HTTP</string> <string id="NoJson">ไม่มี JSON ส่งคืนจากคำขอ HTTP</string>
<string id="NoPhone" scope="glance">ไม่มีการเชื่อมต่อโทรศัพท์</string> <string id="NoPhone" scope="glance">ไม่มีการเชื่อมต่อโทรศัพท์</string>
<string id="NoResponse">ไม่มีการตอบสนอง กรุณาตรวจสอบการเชื่อมต่ออินเตอร์เน็ต</string> <string id="NoPhoneNoCache" scope="glance">ไม่มีการเชื่อมต่อโทรศัพท์ไม่มีเมนูแคช</string>
<string id="PinInputLocked">ล็อคอินพุต PIN สำหรับ</string> <string id="NoResponse">ไม่มีการตอบกลับตรวจสอบการเชื่อมต่ออินเทอร์เน็ต</string>
<string id="TimedOut">ขอหมดเวลา</string>
<string id="PinInputLocked">อินพุตพินล็อคสำหรับ</string>
<string id="PotentialError">ข้อผิดพลาดที่อาจเกิดขึ้น</string> <string id="PotentialError">ข้อผิดพลาดที่อาจเกิดขึ้น</string>
<string id="Seconds">วินาที</string> <string id="Seconds">ไม่กี่วินาที</string>
<string id="TemplateError">ข้อผิดพลาดเทมเพลต</string> <string id="TemplateError">ข้อผิดพลาดเทมเพลต</string>
<string id="TrailingSlashErr">URL ของ API จะต้องไม่มีเครื่องหมายทับต่อท้าย '/'</string> <string id="TrailingSlashErr">URL API จะต้องไม่มี Slash ต่อท้าย '/'</string>
<string id="Unavailable" scope="glance">ไม่สามารถใช้งานได้</string> <string id="Unavailable" scope="glance">ไม่สามารถใช้งานได้</string>
<string id="Unconfigured" scope="glance">ไม่ได้กำหนดค่า</string> <string id="Unconfigured" scope="glance">ไม่ได้กำหนดค่า</string>
<string id="UnhandledHttpErr">คำขอ HTTP ส่งกลับรหัสข้อผิดพลาด =</string> <string id="UnhandledHttpErr">คำขอ http ส่งคืนรหัสข้อผิดพลาด =</string>
<string id="WebhookFailed">ไม่สามารถลงทะเบียน Webhook ได้</string> <string id="WebhookFailed">ไม่สามารถลงทะเบียน webhook</string>
<string id="WrongPin">รหัส PIN ผิด</string> <string id="WrongPin">พินผิด</string>
<!-- สำหรับ GUI การตั้งค่า สตริงควรอยู่ในลำดับที่ใช้ --> <string id="WifiLteNotAvailable">ไม่มี Wi-Fi หรือ LTE</string>
<string id="WifiLtePrompt">ดำเนินการผ่าน wi-fi/lte?</string>
<string id="WifiLteExecutionTitle">ส่งไปยังผู้ช่วยที่บ้าน</string>
<string id="WifiLteExecutionDataError">ไม่ได้รับข้อมูล</string>
<!-- สำหรับการตั้งค่า GUI สตริงควรอยู่ในลำดับที่ใช้ -->
<string id="SettingsSelect">เลือก...</string> <string id="SettingsSelect">เลือก...</string>
<string id="SettingsApiKey">API Key สำหรับ HomeAssistant</string> <string id="SettingsApiKey">คีย์ API สำหรับ HomeAssistant</string>
<string id="SettingsApiKeyPrompt">โทเค็นการเข้าถึงที่มีอายุยืนยาว</string> <string id="SettingsApiKeyPrompt">โทเค็นการเข้าถึงมายาวนาน</string>
<string id="SettingsApiUrl">URL สำหรับ HomeAssistant API</string> <string id="SettingsApiUrl">URL สำหรับ API homeAssistant</string>
<string id="SettingsConfigUrl">URL สำหรับการกำหนดค่าเมนู (JSON)</string> <string id="SettingsConfigUrl">URL สำหรับการกำหนดค่าเมนู (JSON)</string>
<string id="SettingsCacheConfig">แอปพลิเคชันควรแคชการกำหนดค่าเมนูหรือไม่</string> <string id="SettingsCacheConfig">แอปพลิเคชันควรแคชการกำหนดค่าเมนูหรือไม่?</string>
<string id="SettingsClearCache">แอปพลิเคชันควรจะล้างแคชที่มีอยู่บนสุดในครั้งต่อไปที่เริ่มต้นใช้งานหรือไม่</string> <string id="SettingsClearCache">แอปพลิเคชันควรล้างแคชที่มีอยู่ครั้งต่อไปในครั้งต่อไปหรือไม่</string>
<string id="SettingsWifiLteExecutionEnable">เปิดใช้งานการดำเนินการคำสั่งผ่าน Wi-Fi/LTE</string>
<string id="SettingsVibration">แอปพลิเคชันควรให้ข้อเสนอแนะผ่านการสั่นสะเทือนหรือไม่?</string> <string id="SettingsVibration">แอปพลิเคชันควรให้ข้อเสนอแนะผ่านการสั่นสะเทือนหรือไม่?</string>
<string id="SettingsAppTimeout">หมดเวลาในไม่กี่วินาที ออกจากแอปพลิเคชันหลังจากช่วงเวลาที่ไม่ได้ใช้งานเพื่อประหยัดแบตเตอรี่ของอุปกรณ์</string> <string id="SettingsAppTimeout">หมดเวลาในไม่กี่วินาที ออกจากแอปพลิเคชันหลังจากช่วงเวลาที่ไม่มีการใช้งานเพื่อประหยัดแบตเตอรี่อุปกรณ์</string>
<string id="SettingsPollDelay">การหน่วงเวลาการสำรวจเพิ่มเติม (เป็นวินาที) เพิ่มการหน่วงเวลาระหว่างการอัปเดตสถานะของรายการเมนูทั้งหมด</string> <string id="SettingsPollDelay">ความล่าช้าในการสำรวจเพิ่มเติม (ในไม่กี่วินาที) เพิ่มความล่าช้าระหว่างการอัปเดตสถานะของรายการเมนูทั้งหมด</string>
<string id="SettingsConfirmTimeout">หลังจากเวลาที่กำหนด (เป็นวินาที) กล่องโต้ตอบยืนยันการดำเนินการจะถูกปิดโดยอัตโนมัติและการดำเนินการจะถูกยกเลิก ตั้งค่าเป็น 0 เพื่อปิดใช้งานการหมดเวลา</string> <string id="SettingsConfirmTimeout">หลังจากเวลานี้ (ในไม่กี่วินาที) กล่องโต้ตอบยืนยันสำหรับการกระทำจะถูกปิดโดยอัตโนมัติและการดำเนินการจะถูกยกเลิก ตั้งค่าเป็น 0 เพื่อปิดการหมดเวลา</string>
<string id="SettingsPin">รหัส PIN 4 หลักที่จะใช้สำหรับทุกการกระทำที่ต้องได้รับการยืนยัน (0000-9999)</string> <string id="SettingsPin">พิน 4 หลักที่จะใช้สำหรับการกระทำทั้งหมดที่ต้องการ (0000-9999)</string>
<string id="SettingsPinError">กรุณาตั้งค่ารหัส PIN ตัวเลข 4 หลักที่ถูกต้องระหว่าง 0000 ถึง 9999 ในการตั้งค่าแอปพลิเคชัน</string> <string id="SettingsPinError">โปรดกำหนดค่าพินตัวเลข 4 หลักที่ถูกต้องระหว่าง 0000 ถึง 9999 ในการตั้งค่าแอปพลิเคชัน</string>
<string id="SettingsTextAlign">การจัดตำแหน่งเมนูด้านซ้าย (ปิด) หรือด้านขวา (เปิด)</string> <string id="SettingsTextAlign">การจัดตำแหน่งเมนูซ้าย (ปิด) หรือขวา (เปิด)</string>
<string id="LeftToRight">จากซ้ายไปขวา</string> <string id="SettingsLeftToRight">จากซ้ายไปขวา</string>
<string id="RightToLeft">จากขวาไปซ้าย</string> <string id="SettingsRightToLeft">ขวาไปซ้าย</string>
<string id="SettingsWidgetStart">(เฉพาะวิดเจ็ต) เริ่มแอปพลิเคชันจากวิดเจ็ตโดยอัตโนมัติโดยไม่ต้องรอแตะ</string> <string id="SettingsWidgetStart">(วิดเจ็ตเท่านั้น) เริ่มแอปพลิเคชันจากวิดเจ็ตโดยอัตโนมัติโดยไม่ต้องรอแตะ</string>
<string id="SettingsEnableBatteryLevel">เปิดใช้งานบริการพื้นหลังเพื่อส่งระดับแบตเตอรี่ของอุปกรณ์ ตำแหน่ง และข้อมูลกิจกรรม (ถ้ารองรับ) ไปยัง Home Assistant</string> <string id="SettingsEnableBatteryLevel">เปิดใช้งานบริการพื้นหลังเพื่อส่งระดับแบตเตอรี่ของอุปกรณ์ตำแหน่งและข้อมูลกิจกรรม (ถ้ารองรับ) ไปยังผู้ช่วยที่บ้าน</string>
<string id="SettingsBatteryLevelRefreshRate">อัตราการรีเฟรช (เป็นนาที) ที่บริการพื้นหลังควรจะส่งข้อมูลซ้ำ</string> <string id="SettingsBatteryLevelRefreshRate">อัตราการรีเฟรช (ในไม่กี่นาที) ที่บริการพื้นหลังควรส่งข้อมูลซ้ำ</string>
<string id="WebhookId">(อ่านอย่างเดียว) ID เว็บฮุกที่สร้างโดยอุปกรณ์สำหรับการอัปเดตบริการเบื้องหลัง คุณอาจต้องใช้สิ่งนี้เพื่อแก้ไขข้อบกพร่อง</string> <string id="SettingsUserHttpHeader">ส่วนหัว HTTP ที่ผู้ใช้จัดหา</string>
<string id="SettingsUserHttpHeaderDescription">การติดตั้งผู้ช่วยที่บ้านบางคนต้องการข้อมูลจำเพาะของส่วนหัว HTTP ที่กำหนดเองเพื่อให้สามารถใช้งานได้</string>
<string id="SettingsUserHttpHeaderName">ผู้ใช้ HTTP-Header: ชื่อ</string>
<string id="SettingsUserHttpHeaderValue">ผู้ใช้ HTTP-Header: ค่า</string>
<string id="SettingsClearWebhookId">เชื่อมต่อกับผู้ช่วยที่บ้าน (Clear Webhook ID ดูคู่มือการแก้ไขปัญหา)</string>
<string id="SettingsWebhookId">(อ่านเท่านั้น) ID WebHook ที่สร้างโดยอุปกรณ์สำหรับการอัปเดตบริการพื้นหลัง คุณอาจต้องการสิ่งนี้สำหรับการดีบัก</string>
</strings> </strings>

View File

@@ -9,64 +9,76 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
<!-- <!--
Generated by Google Translate: English to Turkish Generated by Google Translate: English to Turkish
Google Translate tarafından İngilizce'den oluşturuldu Google tarafından Oluşturuldu İngilizce'den Çeviri
--> -->
<strings> <strings>
<string id="ApiFlood">API çağrıları çok hızlı. Lütfen isteklerinizi yavaşlatın.</string> <string id="ApiFlood">API çok hızlı arar. Lütfen isteklerinizi yavaşlatın.</string>
<string id="ApiUrlNotFound">URL bulunamadı. Ayarlarda potansiyel API URL hatası.</string> <string id="ApiUrlNotFound">URL bulunamadı. Ayarlarda potansiyel API URL hatası.</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">Mevcut</string> <string id="Available" scope="glance">Mevcut</string>
<string id="Cached" scope="glance">Önbelleğe alındı</string> <string id="Cached" scope="glance">Önbelleğe alınmış</string>
<string id="Checking" scope="glance">Kontrol ediliyor...</string> <string id="Checking" scope="glance">Kontrol etmek ...</string>
<string id="ConfigUrlNotFound">URL bulunamadı. Ayarlarda potansiyel Yapılandırma URL hatası.</string> <string id="ConfigUrlNotFound">URL bulunamadı. Ayarlarda potansiyel yapılandırma URL hatası.</string>
<string id="Confirm">Elbette?</string> <string id="Confirm">Elbette?</string>
<string id="Empty">Boş</string> <string id="Empty">Boş</string>
<string id="Executed" scope="glance">Onaylandı</string> <string id="Executed" scope="glance">Onaylanmış</string>
<string id="GlanceMenu" scope="glance">Menü</string> <string id="GlanceMenu" scope="glance">Menü</string>
<string id="Memory" scope="glance">Hafıza</string> <string id="Memory" scope="glance">Hafıza</string>
<string id="NoAPIKey" scope="glance">Uygulama ayarlarında API anahtarı yok.</string> <string id="NoAPIKey" scope="glance">Uygulama ayarlarında API anahtarı yok.</string>
<string id="NoApiUrl" scope="glance">Uygulama ayarlarında API URL'si yok.</string> <string id="NoApiUrl" scope="glance">Uygulama ayarlarında API URL'si yok.</string>
<string id="NoConfigUrl" scope="glance">Uygulama ayarlarında yapılandırma URL'si yok.</string> <string id="NoConfigUrl" scope="glance">Uygulama ayarlarında yapılandırma URL'si yok.</string>
<string id="NoInternet">İnternet bağlantısı yok.</string> <string id="NoInternet">İnternet bağlantısı yok.</string>
<string id="NoJson">HTTP isteğinden JSON döndürülmedi.</string> <string id="NoJson">HTTP isteğinden hiçbir JSON geri dönmedi.</string>
<string id="NoPhone" scope="glance">Telefon bağlantısı yok.</string> <string id="NoPhone" scope="glance">Telefon bağlantısı yok.</string>
<string id="NoResponse">Cevap yok, İnternet bağlantısını kontrol edin</string> <string id="NoPhoneNoCache" scope="glance">Telefon bağlantısı yok, önbelleğe alınmış menü yok.</string>
<string id="PinInputLocked">PIN girişi kilitlendi</string> <string id="NoResponse">Yanıt yok, İnternet bağlantısını kontrol edin</string>
<string id="PotentialError">Potansiyel Hata</string> <string id="TimedOut">İstek zaman aşımına uğramış</string>
<string id="Seconds">saniyeler</string> <string id="PinInputLocked">Pin girişi için kilitli</string>
<string id="TemplateError">Şablon Hatası</string> <string id="PotentialError">Potansiyel hata</string>
<string id="TrailingSlashErr">API URL'sinin sonunda eğik çizgi '/' bulunmamalıdır.</string> <string id="Seconds">saniye</string>
<string id="Unavailable" scope="glance">Mevcut değil</string> <string id="TemplateError">Şablon hatası</string>
<string id="Unconfigured" scope="glance">Yapılandırılmamış</string> <string id="TrailingSlashErr">API URL'sinin takip eden bir eğik çizgisi olmamalıdır '/'.</string>
<string id="UnhandledHttpErr">HTTP isteği hata kodu döndürdü =</string> <string id="Unavailable" scope="glance">Müsait olmayan</string>
<string id="WebhookFailed">Webhook'u kaydetme başarısız oldu</string> <string id="Unconfigured" scope="glance">Yapılmamış</string>
<string id="WrongPin">Yanlış PIN</string> <string id="UnhandledHttpErr">HTTP isteği döndürülen hata kodu =</string>
<!-- Ayarlar GUI'si için dizeler kullanıldıkları sıraya göre olmalıdır. --> <string id="WebhookFailed">Webhook kaydedilemedi</string>
<string id="WrongPin">Yanlış iğne</string>
<string id="WifiLteNotAvailable">Wi-Fi veya LTE yok</string>
<string id="WifiLtePrompt">Wi-Fi/LTE üzerinden yürütülüyor mu?</string>
<string id="WifiLteExecutionTitle">Ev Asistanı'na gönderiyor.</string>
<string id="WifiLteExecutionDataError">Alınan veri yok.</string>
<!-- Ayarlar GUI için dizeler kullanıldıkları sırayla olmalıdır. -->
<string id="SettingsSelect">Seçme...</string> <string id="SettingsSelect">Seçme...</string>
<string id="SettingsApiKey">HomeAssistant için API Anahtarı.</string> <string id="SettingsApiKey">HomeasSistant için API Anahtarı.</string>
<string id="SettingsApiKeyPrompt">Uzun Ömürlü Erişim Jetonu.</string> <string id="SettingsApiKeyPrompt">Uzun ömürlü erişim belirteci.</string>
<string id="SettingsApiUrl">HomeAssistant API'sinin URL'si.</string> <string id="SettingsApiUrl">HomeasSistant APIin URL.</string>
<string id="SettingsConfigUrl">Menü yapılandırması için URL (JSON).</string> <string id="SettingsConfigUrl">Menü yapılandırması için URL (JSON).</string>
<string id="SettingsCacheConfig">Uygulama menü yapılandırmasını önbelleğe almalı mı?</string> <string id="SettingsCacheConfig">Uygulama menü yapılandırmasını önbelleğe almalı mı?</string>
<string id="SettingsClearCache">Uygulama bir sonraki başlatıldığında mevcut önbelleği temizlemeli mi?</string> <string id="SettingsClearCache">Uygulama bir dahaki sefere başladığında mevcut önbelleği temizlemeli mi?</string>
<string id="SettingsVibration">Uygulama titreşim yoluyla geri bildirim sağlamalı mı?</string> <string id="SettingsWifiLteExecutionEnable">Wi-Fi/LTE üzerinden komutların yürütülmesini etkinleştirin.</string>
<string id="SettingsAppTimeout">Saniye cinsinden zaman aşımı. Cihaz pilini korumak için bu süre boyunca hareketsizlikten sonra uygulamadan çıkın.</string> <string id="SettingsVibration">Uygulama titreşimlerle geri bildirim sağlamalı mı?</string>
<string id="SettingsPollDelay">Ek anket gecikmesi (saniye cinsinden). Tüm menü öğelerinin durum güncellemesi arasına bir gecikme ekler.</string> <string id="SettingsAppTimeout">Saniyeler içinde zaman aşımı. Cihaz bataryasını kaydetmek için bu hareketsizlik döneminden sonra uygulamadan çıkın.</string>
<string id="SettingsConfirmTimeout">Bu süreden sonra (saniye cinsinden), bir eylem için onay iletişim kutusu otomatik olarak kapatılır ve eylem iptal edilir. Zaman aşımını devre dışı bırakmak için 0 olarak ayarlayın.</string> <string id="SettingsPollDelay">Ek anket gecikmesi (saniyeler içinde). Tüm menü öğelerinin durum güncellemesi arasında bir gecikme ekler.</string>
<string id="SettingsPin">Onay gerektiren tüm işlemlerde kullanılacak 4 haneli PIN (0000-9999).</string> <string id="SettingsConfirmTimeout">Bu süreden sonra (saniye cinsinden), bir eylem için bir onay iletişim kutusu otomatik olarak kapatılır ve eylem iptal edilir. Zaman aşımını devre dışı bırakmak için 0 olarak ayarlayın.</string>
<string id="SettingsPinError">Lütfen uygulama ayarlarından 0000 ile 9999 arasında geçerli bir 4 haneli sayısal PIN yapılandırın.</string> <string id="SettingsPin">4 basamaklı pim gerektiren tüm eylemler için kullanılacak (0000-9999).</string>
<string id="SettingsTextAlign">Sol (kapalı) veya Sağ (açık) Menü Hizalaması.</string> <string id="SettingsPinError">Lütfen uygulama ayarlarında 0000 ve 9999 arasında geçerli bir 4 haneli sayısal pimi yapılandırın.</string>
<string id="LeftToRight">Soldan sağa</string> <string id="SettingsTextAlign">Sol (kapalı) veya sağ (açık) menü hizalaması.</string>
<string id="RightToLeft">Sdan Sola</string> <string id="SettingsLeftToRight">Soldan sağa</string>
<string id="SettingsWidgetStart">(Yalnızca Widget) Dokunmayı beklemeden uygulamayı widget'tan otomatik olarak başlat.</string> <string id="SettingsRightToLeft">Sağdan sola</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="SettingsWidgetStart">(Yalnızca widget) Bir musluk beklemeden uygulamayı widget'tan otomatik olarak başlatın.</string>
<string id="SettingsEnableBatteryLevel">Arka plan hizmetinin aygıt pil seviyesini, konumunu ve (desteklenirse) etkinlik verilerini ev asistanına göndermesini etkinleştirin.</string>
<string id="SettingsBatteryLevelRefreshRate">Arka plan hizmetinin veri göndermeyi tekrarlaması gereken yenileme hızı (dakika cinsinden).</string> <string id="SettingsBatteryLevelRefreshRate">Arka plan hizmetinin veri göndermeyi tekrarlaması gereken yenileme hızı (dakika cinsinden).</string>
<string id="WebhookId">(Salt okunur) Arkaplan servis güncellemeleri için cihaz tarafından oluşturulan Webhook Kimliği. Hata ayıklama için buna ihtiyacınız olabilir.</string> <string id="SettingsUserHttpHeader">Kullanıcı tarafından sağlanan HTTP başlığı</string>
<string id="SettingsUserHttpHeaderDescription">Bazı ev asistanı kurulumları, çalışabilmek için özel bir HTTP başlığının belirtilmesini gerektirir.</string>
<string id="SettingsUserHttpHeaderName">Kullanıcı tarafından sağlanan HTTP-Header: Ad</string>
<string id="SettingsUserHttpHeaderValue">Kullanıcı tarafından tedarik edilen HTTP-Header: Değer</string>
<string id="SettingsClearWebhookId">Ev Asistanı'na yeniden bağlanın (Webhook kimliğini temizleyin, bkz. Sorun Giderme Kılavuzu).</string>
<string id="SettingsWebhookId">(Yalnızca okuyun) Arka plan hizmeti güncellemeleri için cihaz tarafından oluşturulan WebHook kimliği. Hata ayıklama için bunu isteyebilirsiniz.</string>
</strings> </strings>

View File

@@ -9,64 +9,76 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
<!-- <!--
Generated by Google Translate: English to Ukrainian Generated by Google Translate: English to Ukrainian
Створено Google Translate з англійської Створений Google Translate з англійської мови
--> -->
<strings> <strings>
<string id="ApiFlood">Надто швидкі виклики API. Будь ласка, сповільніть свої запити.</string> <string id="ApiFlood">API дзвонить занадто швидко. Будь ласка, уповільніть свої запити.</string>
<string id="ApiUrlNotFound">URL не знайдено. Потенційна помилка URL-адреси API в налаштуваннях.</string> <string id="ApiUrlNotFound">URL -адреса не знайдена. Потенційна помилка URL -адреси API в налаштуваннях.</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">в наявності</string> <string id="Available" scope="glance">Доступний</string>
<string id="Cached" scope="glance">Кешовано</string> <string id="Cached" scope="glance">Кешевий</string>
<string id="Checking" scope="glance">Перевірка...</string> <string id="Checking" scope="glance">Перевірка ...</string>
<string id="ConfigUrlNotFound">URL не знайдено. Потенційна помилка URL-адреси конфігурації в налаштуваннях.</string> <string id="ConfigUrlNotFound">URL -адреса не знайдена. Потенційна помилка URL -адреси конфігурації в налаштуваннях.</string>
<string id="Confirm">Зрозуміло?</string> <string id="Confirm">Звичайно?</string>
<string id="Empty">Порожній</string> <string id="Empty">Порожній</string>
<string id="Executed" scope="glance">Підтверджено</string> <string id="Executed" scope="glance">Підтверджений</string>
<string id="GlanceMenu" scope="glance">Меню</string> <string id="GlanceMenu" scope="glance">Меню</string>
<string id="Memory" scope="glance">Пам'ять</string> <string id="Memory" scope="glance">Пам'ять</string>
<string id="NoAPIKey" scope="glance">У налаштуваннях програми немає ключа API.</string> <string id="NoAPIKey" scope="glance">Немає ключа API в налаштуваннях програми.</string>
<string id="NoApiUrl" scope="glance">У налаштуваннях програми немає URL-адреси API.</string> <string id="NoApiUrl" scope="glance">Немає URL -адреси API в налаштуваннях програми.</string>
<string id="NoConfigUrl" scope="glance">У налаштуваннях програми немає URL-адреси конфігурації.</string> <string id="NoConfigUrl" scope="glance">Немає URL -адреси конфігурації в налаштуваннях програми.</string>
<string id="NoInternet">Немає підключення до Інтернету.</string> <string id="NoInternet">Немає підключення до Інтернету.</string>
<string id="NoJson">Запит HTTP не повертає JSON.</string> <string id="NoJson">Жоден JSON не повернувся з запиту HTTP.</string>
<string id="NoPhone" scope="glance">Немає телефонного зв'язку.</string> <string id="NoPhone" scope="glance">Немає підключення до телефону.</string>
<string id="NoResponse">Немає відповіді, перевірте підключення до Інтернету</string> <string id="NoPhoneNoCache" scope="glance">Ні підключення до телефону, ні кешованого меню.</string>
<string id="PinInputLocked">Введення PIN-коду заблоковано для</string> <string id="NoResponse">Немає відповіді, перевірити підключення до Інтернету</string>
<string id="TimedOut">Запит на приурочення</string>
<string id="PinInputLocked">PIN -вхід, заблокований для</string>
<string id="PotentialError">Потенційна помилка</string> <string id="PotentialError">Потенційна помилка</string>
<string id="Seconds">секунд</string> <string id="Seconds">секунди</string>
<string id="TemplateError">Помилка шаблону</string> <string id="TemplateError">Помилка шаблону</string>
<string id="TrailingSlashErr">URL-адреса API не повинна містити косу риску '/'.</string> <string id="TrailingSlashErr">URL -адреса API не повинна мати кінцеву косою косою '/'.</string>
<string id="Unavailable" scope="glance">Недоступний</string> <string id="Unavailable" scope="glance">Недоступний</string>
<string id="Unconfigured" scope="glance">Неналаштований</string> <string id="Unconfigured" scope="glance">Неінфігурований</string>
<string id="UnhandledHttpErr">Запит HTTP повернув код помилки =</string> <string id="UnhandledHttpErr">Запит HTTP Повернувся код помилки =</string>
<string id="WebhookFailed">Не вдалося зареєструвати Webhook</string> <string id="WebhookFailed">Не вдалося зареєструвати WebHook</string>
<string id="WrongPin">Неправильний PIN-код</string> <string id="WrongPin">Неправильна шпилька</string>
<!-- У графічному інтерфейсі налаштувань рядки мають бути в порядку їх використання. --> <string id="WifiLteNotAvailable">Відсутність Wi-Fi або LTE</string>
<string id="SettingsSelect">Виберіть...</string> <string id="WifiLtePrompt">Виконати через Wi-Fi/LTE?</string>
<string id="SettingsApiKey">Ключ API для HomeAssistant.</string> <string id="WifiLteExecutionTitle">Відправлення домашнього помічника.</string>
<string id="SettingsApiKeyPrompt">Довговічний маркер доступу.</string> <string id="WifiLteExecutionDataError">Не отримані даних.</string>
<string id="SettingsApiUrl">URL для HomeAssistant API.</string> <!-- Для графічного інтерфейсу рядків повинні бути в порядку, в якому вони використовуються. -->
<string id="SettingsConfigUrl">URL для налаштування меню (JSON).</string> <string id="SettingsSelect">Виберіть ...</string>
<string id="SettingsCacheConfig">Чи має програма кешувати конфігурацію меню?</string> <string id="SettingsApiKey">Ключ API для домашніх систем.</string>
<string id="SettingsClearCache">Чи слід програмі очистити наявний кеш під час наступного запуску?</string> <string id="SettingsApiKeyPrompt">Довгоживучий маркер доступу.</string>
<string id="SettingsVibration">Чи має програма надавати зворотній зв’язок за допомогою вібрації?</string> <string id="SettingsApiUrl">URL -адреса для домашнього API.</string>
<string id="SettingsAppTimeout">Час очікування в секундах. Вийдіть із програми після цього періоду бездіяльності, щоб заощадити батарею пристрою.</string> <string id="SettingsConfigUrl">URL -адреса для конфігурації меню (JSON).</string>
<string id="SettingsPollDelay">Додаткова затримка опитування (у секундах). Додає затримку між оновленням статусу всіх пунктів меню.</string> <string id="SettingsCacheConfig">Чи повинен додатковий кеш конфігурації меню?</string>
<string id="SettingsConfirmTimeout">Після закінчення цього часу (у секундах) діалогове вікно підтвердження дії автоматично закривається, а дія скасовується. Встановіть 0, щоб вимкнути тайм-аут.</string> <string id="SettingsClearCache">Чи повинен програма очистити існуючий кеш наступного разу, коли він буде запущений?</string>
<string id="SettingsPin">4-значний PIN-код для всіх дій, які потребують підтвердження (0000-9999).</string> <string id="SettingsWifiLteExecutionEnable">Увімкнути виконання команд над Wi-Fi/LTE.</string>
<string id="SettingsPinError">Налаштуйте дійсний 4-значний цифровий PIN-код між 0000 і 9999 у налаштуваннях програми.</string> <string id="SettingsVibration">Чи повинен програма надавати зворотній зв'язок через вібрації?</string>
<string id="SettingsTextAlign">Ліворуч (вимкнено) або праворуч (увімкнено) вирівнювання меню.</string> <string id="SettingsAppTimeout">Тайм -аут за лічені секунди. Вийдіть із програми після цього періоду бездіяльності, щоб зберегти акумулятор пристрою.</string>
<string id="LeftToRight">Зліва направо</string> <string id="SettingsPollDelay">Додаткова затримка опитування (за лічені секунди). Додає затримку між оновленням статусу всіх пунктів меню.</string>
<string id="RightToLeft">Справа наліво</string> <string id="SettingsConfirmTimeout">Після цього часу (за лічені секунди) діалогове вікно підтвердження дії автоматично закривається і дія скасовується. Встановіть 0, щоб відключити тайм -аут.</string>
<string id="SettingsWidgetStart">(Лише віджет) Автоматично запускайте програму з віджета, не чекаючи дотику.</string> <string id="SettingsPin">4-значний PIN-код, який слід використовувати для всіх дій, які потребують цього (0000-9999).</string>
<string id="SettingsEnableBatteryLevel">Увімкніть фонову службу, щоб надсилати дані про рівень заряду акумулятора пристрою, місцезнаходження та (якщо підтримується) дані про активність до Home Assistant.</string> <string id="SettingsPinError">Будь ласка, налаштуйте дійсний 4-значний числовий штифт між 0000 та 9999 у налаштуваннях програми.</string>
<string id="SettingsBatteryLevelRefreshRate">Частота оновлення (у хвилинах), з якою фонова служба має повторювати надсилання даних.</string> <string id="SettingsTextAlign">Зліва (вимкнено) або праворуч (увімкнено) вирівнювання меню.</string>
<string id="WebhookId">(Лише для читання) Ідентифікатор Webhook, створений пристроєм для фонового оновлення служби. Це може знадобитися для налагодження.</string> <string id="SettingsLeftToRight">Зліва направо</string>
<string id="SettingsRightToLeft">Праворуч зліва</string>
<string id="SettingsWidgetStart">(Тільки віджет) автоматично запустіть програму з віджета, не чекаючи натискання.</string>
<string id="SettingsEnableBatteryLevel">Увімкніть фонову службу для надсилання рівня акумулятора пристрою, розташування та (за підтримки) даних активності домашньому помічнику.</string>
<string id="SettingsBatteryLevelRefreshRate">Швидкість оновлення (за лічені хвилини), в якій фонова послуга повинна повторити надсилання даних.</string>
<string id="SettingsUserHttpHeader">Користувач постачав HTTP заголовок</string>
<string id="SettingsUserHttpHeaderDescription">Деякі установи домашнього помічника потребують специфікації спеціального заголовка HTTP для функціонування.</string>
<string id="SettingsUserHttpHeaderName">Поставлений користувачем HTTP-Header: Ім'я</string>
<string id="SettingsUserHttpHeaderValue">Користувач надає HTTP-Header: Значення</string>
<string id="SettingsClearWebhookId">Повторно підключіться до домашнього помічника (Clear Webhook Id, див. Посібник з усунення несправностей).</string>
<string id="SettingsWebhookId">(Лише читайте) Ідентифікатор WebHook, створений пристроєм для оновлень фонових служб. Вам може знадобитися це для налагодження.</string>
</strings> </strings>

View File

@@ -9,64 +9,76 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
<!-- <!--
Generated by Google Translate: English to Vietnamese Generated by Google Translate: English to Vietnamese
Được tạo ra bởi Google Dịch từ tiếng Anh Được tạo bởi google dịch từ tiếng Anh
--> -->
<strings> <strings>
<string id="ApiFlood">Cuộc gọi API quá nhanh. Vui lòng làm chậm yêu cầu của bạn.</string> <string id="ApiFlood">API gọi quá nhanh. Vui lòng làm chậm các yêu cầu của bạn.</string>
<string id="ApiUrlNotFound">Không tìm thấy URL. Có thể có lỗi URL API trong cài đặt.</string> <string id="ApiUrlNotFound">URL không tìm thấy. Lỗi URL API tiềm năng trong cài đặt.</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">Có sẵn</string> <string id="Available" scope="glance">Có sẵn</string>
<string id="Cached" scope="glance">Đã lưu trữ</string> <string id="Cached" scope="glance">Bộ nhớ cache</string>
<string id="Checking" scope="glance">Đang kiểm tra...</string> <string id="Checking" scope="glance">Kiểm tra ...</string>
<string id="ConfigUrlNotFound">Không tìm thấy URL. Có thể có lỗi URL cấu hình trong cài đặt.</string> <string id="ConfigUrlNotFound">URL không tìm thấy. Lỗi URL cấu hình tiềm năng trong cài đặt.</string>
<string id="Confirm">Chắc chắn?</string> <string id="Confirm">Chắc chắn?</string>
<string id="Empty">Trống</string> <string id="Empty">Trống</string>
<string id="Executed" scope="glance">Đã xác nhận</string> <string id="Executed" scope="glance">Xác nhận</string>
<string id="GlanceMenu" scope="glance">Thực đơn</string> <string id="GlanceMenu" scope="glance">Menu</string>
<string id="Memory" scope="glance">Ký ức</string> <string id="Memory" scope="glance">Ký ức</string>
<string id="NoAPIKey" scope="glance">Không có khóa API trong cài đặt ứng dụng.</string> <string id="NoAPIKey" scope="glance">Không có khóa API trong cài đặt ứng dụng.</string>
<string id="NoApiUrl" scope="glance">Không có URL API trong cài đặt ứng dụng.</string> <string id="NoApiUrl" scope="glance">Không có URL API trong cài đặt ứng dụng.</string>
<string id="NoConfigUrl" scope="glance">Không có URL cấu hình trong cài đặt ứng dụng.</string> <string id="NoConfigUrl" scope="glance">Không có URL cấu hình trong cài đặt ứng dụng.</string>
<string id="NoInternet">Không có kết nối Internet.</string> <string id="NoInternet">Không có kết nối internet.</string>
<string id="NoJson">Không có JSON nào được trả về từ yêu cầu HTTP.</string> <string id="NoJson">Không có JSON trở lại từ yêu cầu HTTP.</string>
<string id="NoPhone" scope="glance">Không có kết nối điện thoại.</string> <string id="NoPhone" scope="glance">Không có kết nối điện thoại.</string>
<string id="NoResponse">Không có phản hồi, hãy kiểm tra kết nối Internet</string> <string id="NoPhoneNoCache" scope="glance">Không kết nối điện thoại, không có menu được lưu trong bộ nhớ cache.</string>
<string id="PinInputLocked">Mã PIN đầu vào bị khóa</string> <string id="NoResponse">Không có phản hồi, kiểm tra kết nối Internet</string>
<string id="PotentialError">Lỗi tiềm ẩn</string> <string id="TimedOut">Yêu cầu hết thời gian</string>
<string id="PinInputLocked">Pin đầu vào bị khóa cho</string>
<string id="PotentialError">Lỗi tiềm năng</string>
<string id="Seconds">giây</string> <string id="Seconds">giây</string>
<string id="TemplateError">Lỗi mẫu</string> <string id="TemplateError">Lỗi mẫu</string>
<string id="TrailingSlashErr">URL API không được có dấu gạch chéo '/' ở cuối.</string> <string id="TrailingSlashErr">URL API không được có một dấu gạch chéo '/'.</string>
<string id="Unavailable" scope="glance">Không có sẵn</string> <string id="Unavailable" scope="glance">Không có sẵn</string>
<string id="Unconfigured" scope="glance">Chưa cấu hình</string> <string id="Unconfigured" scope="glance">Không được cấu hình</string>
<string id="UnhandledHttpErr">Yêu cầu HTTP trả về mã lỗi =</string> <string id="UnhandledHttpErr">HTTP yêu cầu trả về mã lỗi =</string>
<string id="WebhookFailed">Không đăng ký được Webhook</string> <string id="WebhookFailed">Không đăng ký Webhook</string>
<string id="WrongPin">PIN sai</string> <string id="WrongPin">PIN sai</string>
<!-- Đối với giao diện cài đặt, các chuỗi phải được sắp xếp theo thứ tự sử dụng. --> <string id="WifiLteNotAvailable">Không có Wi-Fi hoặc LTE có sẵn</string>
<string id="WifiLtePrompt">Thực hiện qua Wi-Fi/LTE?</string>
<string id="WifiLteExecutionTitle">Gửi đến trợ lý nhà.</string>
<string id="WifiLteExecutionDataError">Không nhận được dữ liệu.</string>
<!-- Đối với GUI cài đặt, các chuỗi phải theo thứ tự chúng được sử dụng. -->
<string id="SettingsSelect">Lựa chọn...</string> <string id="SettingsSelect">Lựa chọn...</string>
<string id="SettingsApiKey">Khóa API cho HomeAssistant.</string> <string id="SettingsApiKey">Khóa API cho HomeAssistant.</string>
<string id="SettingsApiKeyPrompt">Mã thông báo truy cập lâu dài.</string> <string id="SettingsApiKeyPrompt">Mã thông báo truy cập tồn tại lâu dài.</string>
<string id="SettingsApiUrl">URL cho API HomeAssistant.</string> <string id="SettingsApiUrl">URL cho API homeassistant.</string>
<string id="SettingsConfigUrl">URL để cấu hình menu (JSON).</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 vào bộ nhớ đệm không?</string> <string id="SettingsCacheConfig">Bộ đệm ứng dụng có nên 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ó khi khi động lần sau không?</string> <string id="SettingsClearCache">Ứng dụng có nên xóa bộ đệm hiện tại vào lần tới khi nó được bắt đầu 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="SettingsWifiLteExecutionEnable">Bật các lệnh thực thi qua Wi-Fi/LTE.</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="SettingsVibration">Ứng dụng có nên cung cấp phản hồi thông qua các rung động?</string>
<string id="SettingsPollDelay">Độ trễ thăm dò bổ sung (tính bằng giây). Thêm độ trễ giữa quá trình cập nhật trạng thái của tất cả các mục menu.</string> <string id="SettingsAppTimeout">Thời gian chờ trong giây. Thoát khỏi ứng dụng sau khoảng thi gian không hoạt động để lưu 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 một hành động sẽ tự động đóng lại và hành động đó sẽ bị hủy. Đặt thành 0 để vô hiệu hóa thời gian chờ.</string> <string id="SettingsPollDelay">Độ trễ thăm dò ý kiến bổ sung (tính bằng giây). Thêm độ trễ giữa bản cập nhật trạng thái của tất cả các mục menu.</string>
<string id="SettingsPin">Mã PIN gồm 4 chữ số được sử dụng cho mọi hành động cần xác nhận (0000-9999).</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 bị hủy. Đặt thành 0 để vô hiệu hóa thời gian chờ.</string>
<string id="SettingsPinError">Vui lòng cấu hình mã PIN số 4 chữ số hợp lệ trong khoảng từ 0000 đến 9999 trong cài đặt ứng dụng.</string> <string id="SettingsPin">Pin 4 chữ số được sử dụng cho tất cả các hành động yêu cầu nó (0000-9999).</string>
<string id="SettingsTextAlign">Căn chỉnh Menu Trái (tắt) hoặc Phải (bật).</string> <string id="SettingsPinError">Vui lòng định cấu hình chân số 4 chữ số hợp lệ giữa 0000 đến 9999 trong cài đặt ứng dụng.</string>
<string id="LeftToRight">Từ trái sang phải</string> <string id="SettingsTextAlign">Bên trái (tắt) hoặc bên phải (trên) căn chỉnh menu.</string>
<string id="RightToLeft">Từ phải sang trái</string> <string id="SettingsLeftToRight">Ti sang phải</string>
<string id="SettingsWidgetStart">(Chỉ dành cho tiện ích) Tự động khởi động ứng dụng từ tiện ích mà không cần phải chạm.</string> <string id="SettingsRightToLeft">Phải sang trái</string>
<string id="SettingsEnableBatteryLevel">Bật dịch vụ nền để gửi mức pin, vị trí và dữ liệu hoạt động (nếu được hỗ trợ) của thiết bị tới Home Assistant.</string> <string id="SettingsWidgetStart">(Chỉ Widget) Tự động khởi động ứng dụng từ tiện ích mà không cần chờ vòi.</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="SettingsEnableBatteryLevel">Cho phép dịch vụ nền để gửi dữ liệu hoạt động, vị trí và (nếu được hỗ trợ) của thiết bị đến trợ lý nhà.</string>
<string id="WebhookId">(Chỉ đọc) ID Webhook do thiết bị tạo ra để cập nhật dịch vụ nền. Bạn có thể cần ID này để gỡ lỗi.</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 gửi dữ liệu.</string>
<string id="SettingsUserHttpHeader">Tiêu đề HTTP do người dùng cung cấp</string>
<string id="SettingsUserHttpHeaderDescription">Một số cài đặt trợ lý gia đình yêu cầu đặc điểm kỹ thuật của tiêu đề HTTP tùy chỉnh để hoạt động.</string>
<string id="SettingsUserHttpHeaderName">Tiêu đề http do người dùng cung cấp: tên</string>
<string id="SettingsUserHttpHeaderValue">Tiêu đề HTTP do người dùng cung cấp: Giá trị</string>
<string id="SettingsClearWebhookId">Kết nối lại với Trợ lý nhà (Xóa ID Webhook, xem Hướng dẫn khắc phục sự cố).</string>
<string id="SettingsWebhookId">(Chỉ đọc) ID webhook được tạo bởi thiết bị để 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> </strings>

View File

@@ -9,64 +9,76 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
<!-- <!--
Generated by Google Translate: English to Chinese (Simplified) Generated by Google Translate: English to Chinese (Simplified)
谷歌翻译从英文生成 Google生成的英语翻译
--> -->
<strings> <strings>
<string id="ApiFlood">API 调用速度过快。请放慢您的请求速度</string> <string id="ApiFlood">API打电话太快。请放慢您的要求</string>
<string id="ApiUrlNotFound">未找到 URL。设置中可能存在 API URL 错误。</string> <string id="ApiUrlNotFound">找不到URL。设置中的潜在API URL错误。</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">可用的</string> <string id="Available" scope="glance">可用的</string>
<string id="Cached" scope="glance">缓存</string> <string id="Cached" scope="glance">缓存</string>
<string id="Checking" scope="glance">检查...</string> <string id="Checking" scope="glance">检查...</string>
<string id="ConfigUrlNotFound">未找到 URL。设置中可能存在配置 URL 错误。</string> <string id="ConfigUrlNotFound">找不到URL。设置中的潜在配置URL错误。</string>
<string id="Confirm">当然?</string> <string id="Confirm">当然?</string>
<string id="Empty">空的</string> <string id="Empty">空的</string>
<string id="Executed" scope="glance">确认的</string> <string id="Executed" scope="glance">确认的</string>
<string id="GlanceMenu" scope="glance">菜单</string> <string id="GlanceMenu" scope="glance">菜单</string>
<string id="Memory" scope="glance">记忆</string> <string id="Memory" scope="glance">记忆</string>
<string id="NoAPIKey" scope="glance">应用程序设置中没有 API 密钥。</string> <string id="NoAPIKey" scope="glance">应用程序设置中没有API密钥。</string>
<string id="NoApiUrl" scope="glance">应用程序设置中没有 API URL。</string> <string id="NoApiUrl" scope="glance">应用程序设置中没有API URL。</string>
<string id="NoConfigUrl" scope="glance">应用程序设置中没有配置 URL。</string> <string id="NoConfigUrl" scope="glance">应用程序设置中没有配置URL。</string>
<string id="NoInternet">没有互联网连接。</string> <string id="NoInternet">没有互联网连接。</string>
<string id="NoJson">HTTP 请求返回 JSON。</string> <string id="NoJson">没有从HTTP请求返回JSON。</string>
<string id="NoPhone" scope="glance">没有电话连接。</string> <string id="NoPhone" scope="glance">没有电话连接。</string>
<string id="NoResponse">无响应,请检查互联网连接</string> <string id="NoPhoneNoCache" scope="glance">没有电话连接,没有缓存的菜单。</string>
<string id="PinInputLocked">PIN 输入已锁定</string> <string id="NoResponse">没有回应,检查互联网连接</string>
<string id="TimedOut">请求计时</string>
<string id="PinInputLocked">锁定的引脚输入</string>
<string id="PotentialError">潜在错误</string> <string id="PotentialError">潜在错误</string>
<string id="Seconds"></string> <string id="Seconds"></string>
<string id="TemplateError">模板错误</string> <string id="TemplateError">模板错误</string>
<string id="TrailingSlashErr">API URL 末尾不能有斜杠“/”</string> <string id="TrailingSlashErr">API URL一定不能有尾巴'/'</string>
<string id="Unavailable" scope="glance">不可用</string> <string id="Unavailable" scope="glance">不可用</string>
<string id="Unconfigured" scope="glance">未配置</string> <string id="Unconfigured" scope="glance">未配置</string>
<string id="UnhandledHttpErr">HTTP 请求返回错误代码 =</string> <string id="UnhandledHttpErr">http请求返回错误代码=</string>
<string id="WebhookFailed">无法注册 Webhook</string> <string id="WebhookFailed">无法注册Webhook</string>
<string id="WrongPin">PIN错误</string> <string id="WrongPin">PIN错误</string>
<!-- 对于设置 GUI字符串应该按照其使用的顺序排列。 --> <string id="WifiLteNotAvailable">没有Wi-Fi或LTE</string>
<string id="WifiLtePrompt">执行Wi-Fi/LTE</string>
<string id="WifiLteExecutionTitle">发送给家庭助理。</string>
<string id="WifiLteExecutionDataError">没有收到数据。</string>
<!-- 对于GUI设置应按照使用顺序使用。 -->
<string id="SettingsSelect">选择...</string> <string id="SettingsSelect">选择...</string>
<string id="SettingsApiKey">HomeAssistant 的 API 密钥</string> <string id="SettingsApiKey">API钥匙的野性钥匙</string>
<string id="SettingsApiKeyPrompt">寿命访问令牌。</string> <string id="SettingsApiKeyPrompt">访问令牌。</string>
<string id="SettingsApiUrl">HomeAssistant APIURL。</string> <string id="SettingsApiUrl">Homeassistant APIURL。</string>
<string id="SettingsConfigUrl">菜单配置的 URLJSON</string> <string id="SettingsConfigUrl">菜单配置的URLJSON</string>
<string id="SettingsCacheConfig">应用程序是否应该缓存菜单配置?</string> <string id="SettingsCacheConfig">应用程序缓存菜单配置应该缓存吗</string>
<string id="SettingsClearCache">应用程序下次启动时是否应该清除现有缓存?</string> <string id="SettingsClearCache">应用程序下次启动时是否应该清除现有的高速缓存?</string>
<string id="SettingsVibration">应用程序是否应通过振动提供反馈?</string> <string id="SettingsWifiLteExecutionEnable">在Wi-Fi/LTE上启用执行命令。</string>
<string id="SettingsAppTimeout">超时时间(秒)。在这段不活动时间过后退出应用程序以节省设备电池。</string> <string id="SettingsVibration">应用程序是否应该通过振动提供反馈?</string>
<string id="SettingsPollDelay">附加轮询延迟(以秒为单位)。在所有菜单项的状态更新之间添加延迟</string> <string id="SettingsAppTimeout">超时几秒钟。在此不活动期间退出应用程序以节省设备电池</string>
<string id="SettingsConfirmTimeout">在此时间(以秒为单位)之后,操作的确认对话框将自动关闭,并且操作将被取消。设置为 0 可禁用超时</string> <string id="SettingsPollDelay">额外的民意调查延迟(以秒为单位)。在所有菜单项的状态更新之间添加延迟</string>
<string id="SettingsPin">所有需要确认的操作均需使用 4 位 PIN 码0000-9999</string> <string id="SettingsConfirmTimeout">在此时间以秒为单位之后将自动关闭操作的确认对话框并取消操作。设置为0以禁用超时</string>
<string id="SettingsPinError">请在应用程序设置中配置一个介于 00009999 之间的有效 4 位数字 PIN 码</string> <string id="SettingsPin">4位PIN用于所有需要它的动作0000-9999</string>
<string id="SettingsTextAlign">左(关闭)或右(打开)菜单对齐</string> <string id="SettingsPinError">请在应用程序设置中配置有效的4位数字引脚</string>
<string id="LeftToRight">从左到右</string> <string id="SettingsTextAlign">关闭或右ON菜单对齐。</string>
<string id="RightToLeft">右到</string> <string id="SettingsLeftToRight">从左到右</string>
<string id="SettingsWidgetStart">(仅限小部件)无需等待点击即可从小部件自动启动应用程序。</string> <string id="SettingsRightToLeft">向左到左</string>
<string id="SettingsEnableBatteryLevel">启用后台服务将设备电池电量、位置和(如果支持)活动数据发送到 Home Assistant</string> <string id="SettingsWidgetStart">(仅小部件)自动从小部件启动应用程序,而无需等待点击</string>
<string id="SettingsBatteryLevelRefreshRate">后台服务应重复发送数据的刷新率(以分钟为单位)</string> <string id="SettingsEnableBatteryLevel">使背景服务能够将设备电池电量,位置以及(如果支持)将活动数据发送给家庭助手</string>
<string id="WebhookId">(只读)设备为后台服务更新创建的 Webhook ID。您可能需要此 ID 来进行调试</string> <string id="SettingsBatteryLevelRefreshRate">背景服务应重复发送数据的刷新率(分钟为几分钟)</string>
<string id="SettingsUserHttpHeader">用户提供的HTTP标头</string>
<string id="SettingsUserHttpHeaderDescription">一些家庭助理安装需要定义自定义HTTP标头的规格才能运行。</string>
<string id="SettingsUserHttpHeaderName">用户提供的http-header名称</string>
<string id="SettingsUserHttpHeaderValue">用户提供的HTTP头</string>
<string id="SettingsClearWebhookId">重新连接家庭助理清除Webhook ID请参阅故障排除指南</string>
<string id="SettingsWebhookId">仅读设备创建的Webhook ID用于背景服务更新。您可能需要此次调试。</string>
</strings> </strings>

View File

@@ -9,64 +9,76 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
<!-- <!--
Generated by Google Translate: English to Chinese (Traditional) Generated by Google Translate: English to Chinese (Traditional)
由Google翻譯自英文生成 由Google生成的英語翻譯
--> -->
<strings> <strings>
<string id="ApiFlood">API 呼叫速度太快。請放慢您的求。</string> <string id="ApiFlood">API打電話太快。請放慢您的求。</string>
<string id="ApiUrlNotFound">找不到網址。設定中可能存在 API URL 錯誤。</string> <string id="ApiUrlNotFound">找不到URL。設置中的潛在API URL錯誤。</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">可用的</string> <string id="Available" scope="glance">可用的</string>
<string id="Cached" scope="glance">快取</string> <string id="Cached" scope="glance">快取</string>
<string id="Checking" scope="glance">檢查...</string> <string id="Checking" scope="glance">檢查...</string>
<string id="ConfigUrlNotFound">找不到網址。設定中可能存在配置 URL 錯誤。</string> <string id="ConfigUrlNotFound">找不到URL。設置中的潛在配置URL錯誤。</string>
<string id="Confirm">當然?</string> <string id="Confirm">當然?</string>
<string id="Empty">空的</string> <string id="Empty">空的</string>
<string id="Executed" scope="glance">確認的</string> <string id="Executed" scope="glance">確認的</string>
<string id="GlanceMenu" scope="glance"></string> <string id="GlanceMenu" scope="glance"></string>
<string id="Memory" scope="glance">記憶</string> <string id="Memory" scope="glance">記憶</string>
<string id="NoAPIKey" scope="glance">應用程式設定中沒有 API鑰。</string> <string id="NoAPIKey" scope="glance">應用程序設置中沒有API鑰。</string>
<string id="NoApiUrl" scope="glance">應用程式設定中沒有 API URL。</string> <string id="NoApiUrl" scope="glance">應用程序設置中沒有API URL。</string>
<string id="NoConfigUrl" scope="glance">應用程式設定中沒有配置 URL。</string> <string id="NoConfigUrl" scope="glance">應用程序設置中沒有配置URL。</string>
<string id="NoInternet">沒有網路連線</string> <string id="NoInternet">沒有互聯網連接</string>
<string id="NoJson">HTTP 請求未傳回 JSON。</string> <string id="NoJson">沒有從HTTP請求返回的JSON。</string>
<string id="NoPhone" scope="glance">沒有電話連</string> <string id="NoPhone" scope="glance">沒有電話連</string>
<string id="NoResponse">無響應,請檢查互聯網連接</string> <string id="NoPhoneNoCache" scope="glance">沒有電話連接,沒有緩存的菜單。</string>
<string id="PinInputLocked">PIN 輸入被鎖定</string> <string id="NoResponse">沒有回應,檢查互聯網連接</string>
<string id="TimedOut">請求計時</string>
<string id="PinInputLocked">鎖定的引腳輸入</string>
<string id="PotentialError">潛在錯誤</string> <string id="PotentialError">潛在錯誤</string>
<string id="Seconds"></string> <string id="Seconds"></string>
<string id="TemplateError">模板錯誤</string> <string id="TemplateError">模板錯誤</string>
<string id="TrailingSlashErr">API URL 不得有尾部斜線「/」</string> <string id="TrailingSlashErr">API URL一定不能有尾巴'/'</string>
<string id="Unavailable" scope="glance">不可用</string> <string id="Unavailable" scope="glance">不可用</string>
<string id="Unconfigured" scope="glance">未配置</string> <string id="Unconfigured" scope="glance">未配置</string>
<string id="UnhandledHttpErr">HTTP請求回傳錯誤碼=</string> <string id="UnhandledHttpErr">http請求返回錯誤碼=</string>
<string id="WebhookFailed">註冊Webhook失敗</string> <string id="WebhookFailed">無法註冊Webhook</string>
<string id="WrongPin">PIN錯誤</string> <string id="WrongPin">PIN錯誤</string>
<!-- 對於設定 GUI字串應按其使用順序排列。 --> <string id="WifiLteNotAvailable">沒有Wi-Fi或LTE</string>
<string id="WifiLtePrompt">執行Wi-Fi/LTE</string>
<string id="WifiLteExecutionTitle">發送給家庭助理。</string>
<string id="WifiLteExecutionDataError">沒有收到數據。</string>
<!-- 對於GUI設置應按照使用順序使用。 -->
<string id="SettingsSelect">選擇...</string> <string id="SettingsSelect">選擇...</string>
<string id="SettingsApiKey">HomeAssistant 的 API 金鑰</string> <string id="SettingsApiKey">API鑰匙的野性鑰匙</string>
<string id="SettingsApiKeyPrompt">長期訪問令牌。</string> <string id="SettingsApiKeyPrompt">長期訪問令牌。</string>
<string id="SettingsApiUrl">HomeAssistant APIURL。</string> <string id="SettingsApiUrl">Homeassistant APIURL。</string>
<string id="SettingsConfigUrl">單配置的 URL (JSON)</string> <string id="SettingsConfigUrl">單配置的URLJSON</string>
<string id="SettingsCacheConfig">應用程式是否應該快取選單配置</string> <string id="SettingsCacheConfig">應用程序緩存菜單配置應該緩存嗎</string>
<string id="SettingsClearCache">應用程式是否應該在下次啟動時清除現有快取</string> <string id="SettingsClearCache">應用程序下次啟動時是否應該清除現有的高速緩存</string>
<string id="SettingsVibration">應用程式是否應該透過振動提供回饋?</string> <string id="SettingsWifiLteExecutionEnable">在Wi-Fi/LTE上啟用執行命令。</string>
<string id="SettingsAppTimeout">超時(以秒為單位)。閒置一段時間後退出應用程式以節省設備電池。</string> <string id="SettingsVibration">應用程序是否應該通過振動提供反饋?</string>
<string id="SettingsPollDelay">額外的輪詢延遲(以秒為單位)。在所有選單項目的狀態更新之間新增延遲</string> <string id="SettingsAppTimeout">超時幾秒鐘。在此不活動期間退出應用程序以節省設備電池</string>
<string id="SettingsConfirmTimeout">在此時間(以秒為單位)之後,操作的確認對話方塊將自動關閉並取消該操作。設定為 0 以停用逾時</string> <string id="SettingsPollDelay">額外的民意調查延遲(以秒為單位)。在所有菜單項的狀態更新之間添加延遲</string>
<string id="SettingsPin">用於所有需要確認的操作的 4 位元 PIN (0000-9999)</string> <string id="SettingsConfirmTimeout">在此時間以秒為單位之後將自動關閉操作的確認對話框並取消操作。設置為0以禁用超時</string>
<string id="SettingsPinError">請在應用程式設定中設定 00009999 之間的有效 4 位數 PIN</string> <string id="SettingsPin">4位PIN用於所有需要它的動作0000-9999</string>
<string id="SettingsTextAlign">左(關)或右(開)選單對齊</string> <string id="SettingsPinError">請在應用程序設置中配置有效的4位數字引腳</string>
<string id="LeftToRight">從左到右</string> <string id="SettingsTextAlign">關閉或右ON菜單對齊。</string>
<string id="RightToLeft">右到</string> <string id="SettingsLeftToRight">從左到右</string>
<string id="SettingsWidgetStart">(僅限小部件)從小部件自動啟動應用程序,無需等待點擊。</string> <string id="SettingsRightToLeft">向左到左</string>
<string id="SettingsEnableBatteryLevel">啟用後台服務將裝置電池電量、位置和(如果支援)活動資料傳送至 Home Assistant</string> <string id="SettingsWidgetStart">(僅小部件)自動從小部件啟動應用程序,而無需等待點擊</string>
<string id="SettingsBatteryLevelRefreshRate">後台服務應重複傳送資料的更新率(以分鐘為單位)</string> <string id="SettingsEnableBatteryLevel">使背景服務能夠將設備電池電量,位置以及(如果支持)將活動數據發送給家庭助手</string>
<string id="WebhookId">(唯讀)裝置為後台服務更新所建立的 Webhook ID。您可能需要它來進行調試</string> <string id="SettingsBatteryLevelRefreshRate">背景服務應重複發送數據的刷新率(分鐘為幾分鐘)</string>
<string id="SettingsUserHttpHeader">用戶提供的HTTP標頭</string>
<string id="SettingsUserHttpHeaderDescription">一些家庭助理安裝需要定義自定義HTTP標頭的規格才能運行。</string>
<string id="SettingsUserHttpHeaderName">用戶提供的http-header名稱</string>
<string id="SettingsUserHttpHeaderValue">用戶提供的HTTP頭</string>
<string id="SettingsClearWebhookId">重新連接家庭助理清除Webhook ID請參閱故障排除指南</string>
<string id="SettingsWebhookId">僅讀設備創建的Webhook ID用於背景服務更新。您可能需要此次調試。</string>
</strings> </strings>

View File

@@ -9,64 +9,76 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
<!-- <!--
Generated by Google Translate: English to Standard (Bahasa) Malay Generated by Google Translate: English to Standard (Bahasa) Malay
Dijana oleh Terjemahan Google daripada Bahasa Inggeris Dihasilkan oleh Google Terjemahan dari Bahasa Inggeris
--> -->
<strings> <strings>
<string id="ApiFlood">Panggilan API terlalu pantas. Sila perlahankan permintaan anda.</string> <string id="ApiFlood">API memanggil terlalu cepat. Sila lambat permintaan anda.</string>
<string id="ApiUrlNotFound">URL tidak ditemui. Ralat URL API yang berpotensi dalam tetapan.</string> <string id="ApiUrlNotFound">URL tidak dijumpai. Kesalahan URL API yang berpotensi dalam tetapan.</string>
<string id="AppName" scope="glance">HomeAssistant</string> <string id="AppName" scope="glance">HomeAssistant</string>
<string id="Available" scope="glance">Tersedia</string> <string id="Available" scope="glance">Terdapat</string>
<string id="Cached" scope="glance">Dicache</string> <string id="Cached" scope="glance">Cache</string>
<string id="Checking" scope="glance">Menyemak...</string> <string id="Checking" scope="glance">Memeriksa ...</string>
<string id="ConfigUrlNotFound">URL tidak ditemui. Ralat URL Konfigurasi Potensi dalam tetapan.</string> <string id="ConfigUrlNotFound">URL tidak dijumpai. Kesalahan URL Konfigurasi Potensi dalam Tetapan.</string>
<string id="Confirm">pasti?</string> <string id="Confirm">Pasti?</string>
<string id="Empty">kosong</string> <string id="Empty">Kosong</string>
<string id="Executed" scope="glance">Disahkan</string> <string id="Executed" scope="glance">Disahkan</string>
<string id="GlanceMenu" scope="glance">Menu</string> <string id="GlanceMenu" scope="glance">Menu</string>
<string id="Memory" scope="glance">Ingatan</string> <string id="Memory" scope="glance">Ingatan</string>
<string id="NoAPIKey" scope="glance">Tiada kunci API dalam tetapan aplikasi.</string> <string id="NoAPIKey" scope="glance">Tiada kunci API dalam tetapan aplikasi.</string>
<string id="NoApiUrl" scope="glance">Tiada URL API dalam tetapan aplikasi.</string> <string id="NoApiUrl" scope="glance">Tiada URL API dalam tetapan aplikasi.</string>
<string id="NoConfigUrl" scope="glance">Tiada URL konfigurasi dalam tetapan aplikasi.</string> <string id="NoConfigUrl" scope="glance">Tiada URL Konfigurasi dalam Tetapan Aplikasi.</string>
<string id="NoInternet">Tiada sambungan Internet.</string> <string id="NoInternet">Tiada sambungan internet.</string>
<string id="NoJson">Tiada JSON dikembalikan daripada permintaan HTTP.</string> <string id="NoJson">Tiada JSON kembali dari permintaan HTTP.</string>
<string id="NoPhone" scope="glance">Tiada sambungan Telefon.</string> <string id="NoPhone" scope="glance">Tiada sambungan telefon.</string>
<string id="NoResponse">Tiada Respons, semak sambungan Internet</string> <string id="NoPhoneNoCache" scope="glance">Tiada sambungan telefon, tiada menu cache.</string>
<string id="PinInputLocked">Input PIN dikunci untuk</string> <string id="NoResponse">Tiada Respons, Periksa Sambungan Internet</string>
<string id="PotentialError">Ralat Berpotensi</string> <string id="TimedOut">Meminta tamat masa</string>
<string id="Seconds">detik</string> <string id="PinInputLocked">Input pin terkunci untuk</string>
<string id="TemplateError">Ralat Templat</string> <string id="PotentialError">Kesalahan yang berpotensi</string>
<string id="TrailingSlashErr">URL API mestilah tidak mempunyai garis miring '/'.</string> <string id="Seconds">saat</string>
<string id="TemplateError">Ralat templat</string>
<string id="TrailingSlashErr">URL API tidak boleh mempunyai slash trailing '/'.</string>
<string id="Unavailable" scope="glance">Tidak tersedia</string> <string id="Unavailable" scope="glance">Tidak tersedia</string>
<string id="Unconfigured" scope="glance">Tidak dikonfigurasikan</string> <string id="Unconfigured" scope="glance">Tidak dikonfigurasi</string>
<string id="UnhandledHttpErr">Permintaan HTTP mengembalikan kod ralat =</string> <string id="UnhandledHttpErr">Permintaan HTTP Kod Ralat Kembali =</string>
<string id="WebhookFailed">Gagal mendaftar Webhook</string> <string id="WebhookFailed">Gagal mendaftarkan webhook</string>
<string id="WrongPin">PIN salah</string> <string id="WrongPin">PIN yang salah</string>
<!-- Untuk GUI tetapan, rentetan hendaklah mengikut susunan ia digunakan. --> <string id="WifiLteNotAvailable">Tidak ada Wi-Fi atau LTE</string>
<string id="SettingsSelect">Pilih...</string> <string id="WifiLtePrompt">Jalankan melalui Wi-Fi/LTE?</string>
<string id="SettingsApiKey">Kunci API untuk HomeAssistant.</string> <string id="WifiLteExecutionTitle">Menghantar ke pembantu rumah.</string>
<string id="SettingsApiKeyPrompt">Token Akses Berumur Panjang.</string> <string id="WifiLteExecutionDataError">Tiada data yang diterima.</string>
<string id="SettingsApiUrl">URL untuk API HomeAssistant.</string> <!-- Untuk tetapan GUI, rentetan harus mengikut urutan yang digunakan. -->
<string id="SettingsConfigUrl">URL untuk konfigurasi menu (JSON).</string> <string id="SettingsSelect">Pilih ...</string>
<string id="SettingsApiKey">Kunci API untuk Homeassistant.</string>
<string id="SettingsApiKeyPrompt">Token akses lama.</string>
<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="SettingsCacheConfig">Sekiranya aplikasi cache konfigurasi menu?</string>
<string id="SettingsClearCache">Patutkah aplikasi mengosongkan cache sedia ada pada kali seterusnya ia dimulakan?</string> <string id="SettingsClearCache">Sekiranya permohonan membersihkan cache yang sedia ada pada masa akan datang, ia bermula?</string>
<string id="SettingsVibration">Patutkah aplikasi memberikan maklum balas melalui getaran?</string> <string id="SettingsWifiLteExecutionEnable">Dayakan perintah melaksanakan melalui Wi-Fi/LTE.</string>
<string id="SettingsAppTimeout">Tamat masa dalam beberapa saat. Keluar dari aplikasi selepas tempoh tidak aktif ini untuk menjimatkan bateri peranti.</string> <string id="SettingsVibration">Sekiranya permohonan memberikan maklum balas melalui getaran?</string>
<string id="SettingsPollDelay">Kelewatan tinjauan pendapat tambahan (dalam beberapa saat). Menambah kelewatan antara kemas kini status semua item menu.</string> <string id="SettingsAppTimeout">Tamat masa dalam beberapa saat. Keluar dari permohonan selepas tempoh tidak aktif ini untuk menyimpan bateri peranti.</string>
<string id="SettingsConfirmTimeout">Selepas masa ini (dalam beberapa saat), dialog pengesahan untuk tindakan ditutup secara automatik dan tindakan itu dibatalkan. Tetapkan kepada 0 untuk melumpuhkan tamat masa.</string> <string id="SettingsPollDelay">Kelewatan tinjauan tambahan (dalam saat). Menambah kelewatan antara kemas kini status semua item menu.</string>
<string id="SettingsPin">PIN 4 digit untuk digunakan untuk semua tindakan yang memerlukan pengesahan (0000-9999).</string> <string id="SettingsConfirmTimeout">Selepas masa ini (dalam saat), dialog pengesahan untuk tindakan ditutup secara automatik dan tindakan dibatalkan. Tetapkan ke 0 untuk melumpuhkan masa tamat.</string>
<string id="SettingsPinError">Sila konfigurasikan PIN berangka 4 digit yang sah antara 0000 dan 9999 dalam tetapan aplikasi.</string> <string id="SettingsPin">Pin 4 digit untuk digunakan untuk semua tindakan yang memerlukannya (0000-9999).</string>
<string id="SettingsTextAlign">Penjajaran Menu Kiri (mati) atau Kanan (hidup).</string> <string id="SettingsPinError">Sila konfigurasikan pin angka 4 digit yang sah antara 0000 dan 9999 dalam tetapan permohonan.</string>
<string id="LeftToRight">Kiri ke kanan</string> <string id="SettingsTextAlign">Penjajaran menu kiri (off) atau kanan (ON).</string>
<string id="RightToLeft">Kanan ke Kiri</string> <string id="SettingsLeftToRight">Kiri ke kanan</string>
<string id="SettingsWidgetStart">(Widget sahaja) Mulakan aplikasi secara automatik daripada widget tanpa menunggu satu ketikan.</string> <string id="SettingsRightToLeft">Kanan ke kiri</string>
<string id="SettingsEnableBatteryLevel">Dayakan perkhidmatan latar belakang untuk menghantar data paras bateri peranti, lokasi dan (jika disokong) kepada Home Assistant.</string> <string id="SettingsWidgetStart">(Widget sahaja) Secara automatik memulakan aplikasi dari widget tanpa menunggu ketuk.</string>
<string id="SettingsBatteryLevelRefreshRate">Kadar penyegaran semula (dalam minit) di mana perkhidmatan latar belakang harus mengulangi penghantaran data.</string> <string id="SettingsEnableBatteryLevel">Dayakan perkhidmatan latar belakang untuk menghantar data aktiviti bateri, lokasi dan (jika disokong) ke Pembantu Rumah.</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> <string id="SettingsBatteryLevelRefreshRate">Kadar penyegaran (dalam minit) di mana perkhidmatan latar belakang harus mengulangi data penghantaran.</string>
<string id="SettingsUserHttpHeader">Pengguna membekalkan header HTTP</string>
<string id="SettingsUserHttpHeaderDescription">Sesetengah pemasangan pembantu rumah memerlukan spesifikasi header HTTP tersuai untuk berfungsi.</string>
<string id="SettingsUserHttpHeaderName">Pengguna yang dibekalkan HTTP-HEADER: Nama</string>
<string id="SettingsUserHttpHeaderValue">Pengguna yang dibekalkan HTTP-HEADER: Nilai</string>
<string id="SettingsClearWebhookId">Sambung semula ke Pembantu Rumah (Clear Webhook ID, lihat Panduan Penyelesaian Masalah).</string>
<string id="SettingsWebhookId">(Baca sahaja) ID Webhook yang dibuat oleh peranti untuk kemas kini perkhidmatan latar belakang. Anda mungkin memerlukan ini untuk debugging.</string>
</strings> </strings>

View File

@@ -8,7 +8,7 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
@@ -38,6 +38,12 @@
--> -->
<property id="clear_cache" type="boolean">false</property> <property id="clear_cache" type="boolean">false</property>
<!--
Enables the SyncDelegate and prompt to send a command over Wi-Fi/LTE.
This will only show when not connected to the user's phone.
-->
<property id="wifi_lte_execution" type="boolean">false</property>
<!-- <!--
Enable notification via vibrations, typically for confirmation of actions. Enable notification via vibrations, typically for confirmation of actions.
--> -->
@@ -53,7 +59,7 @@
Poll delay adds a user configurable delay (in seconds) to each round of 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 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 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 this delay for an "always open" mode of operation, which then drains the
watch battery from the additional API access activity. watch battery from the additional API access activity.
--> -->
<property id="poll_delay_combined" type="number">5</property> <property id="poll_delay_combined" type="number">5</property>
@@ -88,6 +94,26 @@
--> -->
<property id="battery_level_refresh_rate" type="number">15</property> <property id="battery_level_refresh_rate" type="number">15</property>
<!--
A user specified HTTP header name to be used in all HTTP requests.
This is useful for some Home Assistant installations that require a
custom HTTP header.
-->
<property id="user_http_header_name" type="string"></property>
<!--
A user specified HTTP header value to be used in all HTTP requests.
This is useful for some Home Assistant installations that require a
custom HTTP header.
-->
<property id="user_http_header_value" type="string"></property>
<!--
Clear the Webhook ID on next application start, and reauthenticate,
then set this back to false.
-->
<property id="clear_webhook_id" type="boolean">false</property>
<!-- <!--
The webhook ID is the last part of the webhook URL. It is secret and 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 should not be shared. It will not be set in settings but will be
@@ -95,5 +121,4 @@
for trouble shooting. for trouble shooting.
--> -->
<property id="webhook_id" type="string"></property> <property id="webhook_id" type="string"></property>
</properties> </properties>

View File

@@ -8,7 +8,7 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
@@ -18,7 +18,7 @@
title="@Strings.SettingsApiKey" title="@Strings.SettingsApiKey"
prompt="@Strings.SettingsApiKeyPrompt" prompt="@Strings.SettingsApiKeyPrompt"
> >
<settingConfig type="alphaNumeric" /> <settingConfig type="alphaNumeric" required="true" />
</setting> </setting>
<setting <setting
@@ -26,7 +26,7 @@
title="@Strings.SettingsApiUrl" title="@Strings.SettingsApiUrl"
prompt="https://homeassistant.local/api" prompt="https://homeassistant.local/api"
> >
<settingConfig type="alphaNumeric" /> <settingConfig type="alphaNumeric" required="true" />
</setting> </setting>
<setting <setting
@@ -34,7 +34,7 @@
title="@Strings.SettingsConfigUrl" title="@Strings.SettingsConfigUrl"
prompt="https://homeassistant.local/local/garmin/menu.json" prompt="https://homeassistant.local/local/garmin/menu.json"
> >
<settingConfig type="alphaNumeric" /> <settingConfig type="alphaNumeric" required="true" />
</setting> </setting>
<setting <setting
@@ -51,6 +51,13 @@
<settingConfig type="boolean" /> <settingConfig type="boolean" />
</setting> </setting>
<setting
propertyKey="@Properties.wifi_lte_execution"
title="@Strings.SettingsWifiLteExecutionEnable"
>
<settingConfig type="boolean" />
</setting>
<setting <setting
propertyKey="@Properties.enable_vibration" propertyKey="@Properties.enable_vibration"
title="@Strings.SettingsVibration" title="@Strings.SettingsVibration"
@@ -83,7 +90,7 @@
propertyKey="@Properties.pin" propertyKey="@Properties.pin"
title="@Strings.SettingsPin" title="@Strings.SettingsPin"
> >
<settingConfig type="alphaNumeric" /> <settingConfig type="alphaNumeric" maxLength="4" />
</setting> </setting>
<setting <setting
@@ -91,8 +98,8 @@
title="@Strings.SettingsTextAlign" title="@Strings.SettingsTextAlign"
> >
<settingConfig type="list"> <settingConfig type="list">
<listEntry value="1">@Strings.LeftToRight</listEntry> <listEntry value="1">@Strings.SettingsLeftToRight</listEntry>
<listEntry value="0">@Strings.RightToLeft</listEntry> <listEntry value="0">@Strings.SettingsRightToLeft</listEntry>
</settingConfig> </settingConfig>
</setting> </setting>
@@ -110,10 +117,31 @@
<settingConfig type="numeric" min="5" /> <settingConfig type="numeric" min="5" />
</setting> </setting>
<setting
propertyKey="@Properties.user_http_header_name"
title="@Strings.SettingsUserHttpHeaderName"
>
<settingConfig type="alphaNumeric" />
</setting>
<setting
propertyKey="@Properties.user_http_header_value"
title="@Strings.SettingsUserHttpHeaderValue"
>
<settingConfig type="alphaNumeric" />
</setting>
<setting
propertyKey="@Properties.clear_webhook_id"
title="@Strings.SettingsClearWebhookId"
>
<settingConfig type="boolean" />
</setting>
<setting <setting
propertyKey="@Properties.webhook_id" propertyKey="@Properties.webhook_id"
title="@Strings.WebhookId" title="@Strings.SettingsWebhookId"
> >
<settingConfig type="alphaNumeric" readonly="true" /> <settingConfig type="alphaNumeric" readonly="true" />
</setting> </setting>
</settings> </settings>

View File

@@ -8,7 +8,7 @@
tested on a Venu 2 device. The source code is provided at: tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant. https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 31 October 2023
--> -->
@@ -31,7 +31,9 @@
<string id="NoInternet">No Internet connection.</string> <string id="NoInternet">No Internet connection.</string>
<string id="NoJson">No JSON returned from HTTP request.</string> <string id="NoJson">No JSON returned from HTTP request.</string>
<string id="NoPhone" scope="glance">No Phone connection.</string> <string id="NoPhone" scope="glance">No Phone connection.</string>
<string id="NoPhoneNoCache" scope="glance">No phone connection, no cached menu.</string>
<string id="NoResponse">No Response, check Internet connection</string> <string id="NoResponse">No Response, check Internet connection</string>
<string id="TimedOut">Request timed out</string>
<string id="PinInputLocked">PIN input locked for</string> <string id="PinInputLocked">PIN input locked for</string>
<string id="PotentialError">Potential Error</string> <string id="PotentialError">Potential Error</string>
<string id="Seconds">seconds</string> <string id="Seconds">seconds</string>
@@ -42,6 +44,10 @@
<string id="UnhandledHttpErr">HTTP request returned error code = </string> <string id="UnhandledHttpErr">HTTP request returned error code = </string>
<string id="WebhookFailed">Failed to register Webhook</string> <string id="WebhookFailed">Failed to register Webhook</string>
<string id="WrongPin">Wrong PIN</string> <string id="WrongPin">Wrong PIN</string>
<string id="WifiLteNotAvailable">No Wi-Fi or LTE available</string>
<string id="WifiLtePrompt">Execute over Wi-Fi/LTE?</string>
<string id="WifiLteExecutionTitle">Sending to Home Assistant.</string>
<string id="WifiLteExecutionDataError">No data received.</string>
<!-- For the settings GUI, strings should be in the order they are used. --> <!-- For the settings GUI, strings should be in the order they are used. -->
<string id="SettingsSelect">Select...</string> <string id="SettingsSelect">Select...</string>
@@ -51,17 +57,23 @@
<string id="SettingsConfigUrl">URL for menu configuration (JSON).</string> <string id="SettingsConfigUrl">URL for menu configuration (JSON).</string>
<string id="SettingsCacheConfig">Should the application cache the menu configuration?</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="SettingsClearCache">Should the application clear the existing cache next time it is started?</string>
<string id="SettingsWifiLteExecutionEnable">Enable executing commands over Wi-Fi/LTE.</string>
<string id="SettingsVibration">Should the application provide feedback via vibrations?</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="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="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="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="SettingsPin">4-digit PIN to be used for all actions that require confirmation (0000-9999).</string> <string id="SettingsPin">4-digit PIN to be used for all actions that require it (0000-9999).</string>
<string id="SettingsPinError">Please configure a valid 4-digit numeric PIN between 0000 and 9999 in the application settings.</string> <string id="SettingsPinError">Please configure a valid 4-digit numeric PIN between 0000 and 9999 in the application settings.</string>
<string id="SettingsTextAlign">Left (off) or Right (on) Menu Alignment.</string> <string id="SettingsTextAlign">Left (off) or Right (on) Menu Alignment.</string>
<string id="LeftToRight">Left to right</string> <string id="SettingsLeftToRight">Left to right</string>
<string id="RightToLeft">Right to Left</string> <string id="SettingsRightToLeft">Right to Left</string>
<string id="SettingsWidgetStart">(Widget only) Automatically start the application from the widget without waiting for a tap.</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="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="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> <string id="SettingsUserHttpHeader">User supplied HTTP header</string>
<string id="SettingsUserHttpHeaderDescription">Some Home Assistant installations require the specification of a custom HTTP header in order to function.</string>
<string id="SettingsUserHttpHeaderName">User supplied HTTP-Header: Name</string>
<string id="SettingsUserHttpHeaderValue">User supplied HTTP-Header: Value</string>
<string id="SettingsClearWebhookId">Reconnect to Home Assistant (clear Webhook ID, see Troubleshooting guide).</string>
<string id="SettingsWebhookId">(Read only) The Webhook ID created by the device for background service updates. You might require this for debugging.</string>
</strings> </strings>

View File

@@ -11,15 +11,6 @@
// //
// J D Abbey & P A Abbey, 28 December 2022 // J D Abbey & P A Abbey, 28 December 2022
// //
//
// Description:
//
// Alert provides a means to present application notifications to the user
// briefly. Credit to travis.vitek on forums.garmin.com.
//
// Reference:
// * https://forums.garmin.com/developer/connect-iq/f/discussion/106/how-to-show-alert-messages
//
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
using Toybox.Lang; using Toybox.Lang;
@@ -27,6 +18,12 @@ using Toybox.Graphics;
using Toybox.WatchUi; using Toybox.WatchUi;
using Toybox.Timer; using Toybox.Timer;
//! The Alert class provides a means to present application notifications to the user
//! briefly. Credit to travis.vitek on forums.garmin.com.
//!
//! Reference:
//! @url https://forums.garmin.com/developer/connect-iq/f/discussion/106/how-to-show-alert-messages
//
class Alert extends WatchUi.View { class Alert extends WatchUi.View {
private static const scRadius = 10; private static const scRadius = 10;
private var mTimer as Timer.Timer; private var mTimer as Timer.Timer;
@@ -36,30 +33,40 @@ class Alert extends WatchUi.View {
private var mFgcolor as Graphics.ColorType; private var mFgcolor as Graphics.ColorType;
private var mBgcolor as Graphics.ColorType; private var mBgcolor as Graphics.ColorType;
//! Class Constructor
//! @param params A dictionary object as follows:<br>
//! `{`<br>
//! &emsp; `:timeout as Lang.Number,` // Timeout in millseconds<br>
//! &emsp; `:font as Graphics.FontType,` // Text font size<br>
//! &emsp; `:text as Lang.String,` // Text to display<br>
//! &emsp; `:fgcolor as Graphics.ColorType,` // Foreground Colour<br>
//! &emsp; `:bgcolor as Graphics.ColorType` // Background Colour<br>
//! `}`
//
function initialize(params as Lang.Dictionary) { function initialize(params as Lang.Dictionary) {
View.initialize(); View.initialize();
mText = params.get(:text) as Lang.String; mText = params[:text] as Lang.String;
if (mText == null) { if (mText == null) {
mText = "Alert"; mText = "Alert";
} }
mFont = params.get(:font) as Graphics.FontType; mFont = params[:font] as Graphics.FontType;
if (mFont == null) { if (mFont == null) {
mFont = Graphics.FONT_MEDIUM; mFont = Graphics.FONT_MEDIUM;
} }
mFgcolor = params.get(:fgcolor) as Graphics.ColorType; mFgcolor = params[:fgcolor] as Graphics.ColorType;
if (mFgcolor == null) { if (mFgcolor == null) {
mFgcolor = Graphics.COLOR_BLACK; mFgcolor = Graphics.COLOR_BLACK;
} }
mBgcolor = params.get(:bgcolor) as Graphics.ColorType; mBgcolor = params[:bgcolor] as Graphics.ColorType;
if (mBgcolor == null) { if (mBgcolor == null) {
mBgcolor = Graphics.COLOR_WHITE; mBgcolor = Graphics.COLOR_WHITE;
} }
mTimeout = params.get(:timeout) as Lang.Number; mTimeout = params[:timeout] as Lang.Number;
if (mTimeout == null) { if (mTimeout == null) {
mTimeout = 2000; mTimeout = 2000;
} }
@@ -67,14 +74,22 @@ class Alert extends WatchUi.View {
mTimer = new Timer.Timer(); mTimer = new Timer.Timer();
} }
//! Setup a timer to dismiss the alert.
//
function onShow() { function onShow() {
mTimer.start(method(:dismiss), mTimeout, false); mTimer.start(method(:dismiss), mTimeout, false);
} }
//! Prematurely stop the timer.
//
function onHide() { function onHide() {
mTimer.stop(); mTimer.stop();
} }
//! Draw the Alert view.
//!
//! @param dc Device context
//
function onUpdate(dc as Graphics.Dc) { function onUpdate(dc as Graphics.Dc) {
var tWidth = dc.getTextWidthInPixels(mText, mFont); var tWidth = dc.getTextWidthInPixels(mText, mFont);
var tHeight = dc.getFontHeight(mFont); var tHeight = dc.getFontHeight(mFont);
@@ -110,32 +125,49 @@ class Alert extends WatchUi.View {
dc.drawText(tX, tY, mFont, mText, Graphics.TEXT_JUSTIFY_CENTER | Graphics.TEXT_JUSTIFY_VCENTER); dc.drawText(tX, tY, mFont, mText, Graphics.TEXT_JUSTIFY_CENTER | Graphics.TEXT_JUSTIFY_VCENTER);
} }
// Remove the alert from view, usually on user input, but that is defined by the calling function. //! Remove the alert from view, usually on user input, but that is defined by the calling function.
// //
function dismiss() as Void { function dismiss() as Void {
WatchUi.popView(SLIDE_IMMEDIATE); WatchUi.popView(SLIDE_IMMEDIATE);
} }
function pushView(transition) as Void { //! Push this view onto the view stack.
//!
//! @param transition Slide Type
function pushView(transition as WatchUi.SlideType) as Void {
WatchUi.pushView(self, new AlertDelegate(self), transition); WatchUi.pushView(self, new AlertDelegate(self), transition);
} }
} }
//! Input Delegate for the Alert view.
//
class AlertDelegate extends WatchUi.InputDelegate { class AlertDelegate extends WatchUi.InputDelegate {
private var mView; private var mView as Alert;
function initialize(view) { //! Class Constructor
//!
//! @param view The Alert view for which this class is a delegate.
//!
function initialize(view as Alert) {
InputDelegate.initialize(); InputDelegate.initialize();
mView = view; mView = view;
} }
function onKey(evt) as Lang.Boolean { //! Handle key events.
//!
//! @param evt The key event whose value is ignored, just fact of key event matters.
//!
function onKey(evt as WatchUi.KeyEvent) as Lang.Boolean {
mView.dismiss(); mView.dismiss();
getApp().getQuitTimer().reset(); getApp().getQuitTimer().reset();
return true; return true;
} }
function onTap(evt) as Lang.Boolean { //! Handle click events.
//!
//! @param evt The click event whose value is ignored, just fact of key event matters.
//!
function onTap(evt as WatchUi.ClickEvent) as Lang.Boolean {
mView.dismiss(); mView.dismiss();
getApp().getQuitTimer().reset(); getApp().getQuitTimer().reset();
return true; return true;

View File

@@ -11,12 +11,6 @@
// //
// P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 // P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023
// //
//
// Description:
//
// The background service delegate currently just reports the Garmin watch's battery
// level.
//
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
using Toybox.Lang; using Toybox.Lang;
@@ -25,20 +19,43 @@ using Toybox.Background;
using Toybox.System; using Toybox.System;
using Toybox.Activity; using Toybox.Activity;
//! The background service delegate reports the Garmin watch's various status values
//! back to the Home Assistant instance.
//
(:background) (:background)
class BackgroundServiceDelegate extends System.ServiceDelegate { class BackgroundServiceDelegate extends System.ServiceDelegate {
//! Class Constructor
//
function initialize() { function initialize() {
ServiceDelegate.initialize(); ServiceDelegate.initialize();
} }
function onReturnBatteryUpdate(responseCode as Lang.Number, data as Null or Lang.Dictionary or Lang.String) as Void { //! Callback function for doUpdate().
// System.println("BackgroundServiceDelegate onReturnBatteryUpdate() Response Code: " + responseCode); //!
// System.println("BackgroundServiceDelegate onReturnBatteryUpdate() Response Data: " + data); //! @param responseCode Response code
//! @param data Return data
//
function onReturnDoUpdate(responseCode as Lang.Number, data as Null or Lang.Dictionary or Lang.String) as Void {
// System.println("BackgroundServiceDelegate onReturnDoUpdate() Response Code: " + responseCode);
// System.println("BackgroundServiceDelegate onReturnDoUpdate() Response Data: " + data);
Background.exit(null); Background.exit(null);
} }
function onActivityCompleted(activity as { :sport as Activity.Sport, :subSport as Activity.SubSport }) as Void { //! Called on completion of an activity.
//!
//! @param activity Specified as a Dictionary with two items.<br>
//! `{`<br>
//! &emsp; `:sport as Activity.Sport`<br>
//! &emsp; `:subSport as Activity.SubSport`<br>
//! `}`
//
function onActivityCompleted(
activity as {
:sport as Activity.Sport,
:subSport as Activity.SubSport
}
) as Void {
if (!System.getDeviceSettings().phoneConnected) { if (!System.getDeviceSettings().phoneConnected) {
// System.println("BackgroundServiceDelegate onActivityCompleted(): No Phone connection, skipping API call."); // System.println("BackgroundServiceDelegate onActivityCompleted(): No Phone connection, skipping API call.");
} else if (!System.getDeviceSettings().connectionAvailable) { } else if (!System.getDeviceSettings().connectionAvailable) {
@@ -50,6 +67,8 @@ class BackgroundServiceDelegate extends System.ServiceDelegate {
} }
} }
//! Called periodically to send status updates to the Home Assistant instance.
//
function onTemporalEvent() as Void { function onTemporalEvent() as Void {
if (!System.getDeviceSettings().phoneConnected) { if (!System.getDeviceSettings().phoneConnected) {
// System.println("BackgroundServiceDelegate onTemporalEvent(): No Phone connection, skipping API call."); // System.println("BackgroundServiceDelegate onTemporalEvent(): No Phone connection, skipping API call.");
@@ -76,7 +95,15 @@ class BackgroundServiceDelegate extends System.ServiceDelegate {
} }
} }
private function doUpdate(activity as Lang.Number or Null, sub_activity as Lang.Number or Null) { //! Combined update function to collect the data to be sent as updates to the Home Assistant instance.
//!
//! @param activity Activity.Sport
//! @param sub_activity Activity.SubSport
//
private function doUpdate(
activity as Lang.Number?,
sub_activity as Lang.Number?
) {
// System.println("BackgroundServiceDelegate onTemporalEvent(): Making API call."); // System.println("BackgroundServiceDelegate onTemporalEvent(): Making API call.");
var position = Position.getInfo(); var position = Position.getInfo();
// System.println("BackgroundServiceDelegate onTemporalEvent(): GPS : " + position.position.toDegrees()); // System.println("BackgroundServiceDelegate onTemporalEvent(): GPS : " + position.position.toDegrees());
@@ -127,16 +154,16 @@ class BackgroundServiceDelegate extends System.ServiceDelegate {
(Properties.getValue("api_url") as Lang.String) + "/webhook/" + (Properties.getValue("webhook_id") as Lang.String), (Properties.getValue("api_url") as Lang.String) + "/webhook/" + (Properties.getValue("webhook_id") as Lang.String),
{ {
"type" => "update_location", "type" => "update_location",
"data" => data, "data" => data
}, },
{ {
:method => Communications.HTTP_REQUEST_METHOD_POST, :method => Communications.HTTP_REQUEST_METHOD_POST,
:headers => { :headers => Settings.augmentHttpHeaders({
"Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON "Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON
}, }),
:responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON :responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON
}, },
method(:onReturnBatteryUpdate) method(:onReturnDoUpdate)
); );
} }
var activityInfo = ActivityMonitor.getInfo(); var activityInfo = ActivityMonitor.getInfo();
@@ -217,12 +244,12 @@ class BackgroundServiceDelegate extends System.ServiceDelegate {
}, },
{ {
:method => Communications.HTTP_REQUEST_METHOD_POST, :method => Communications.HTTP_REQUEST_METHOD_POST,
:headers => { :headers => Settings.augmentHttpHeaders({
"Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON "Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON
}, }),
:responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON :responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON
}, },
method(:onReturnBatteryUpdate) method(:onReturnDoUpdate)
); );
} }

View File

@@ -11,15 +11,12 @@
// //
// J D Abbey & P A Abbey, 28 December 2022 // J D Abbey & P A Abbey, 28 December 2022
// //
//
// Description:
//
// ClientId is somewhere to store personal credentials that should not be shared in
// a separate file that is locally customised to the source code and not commited
// back to GitHub.
//
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
//! ClientId is somewhere to store personal credentials that should not be shared in
//! a separate file that is locally customised to the source code and not committed
//! back to GitHub.
//
(:glance) (:glance)
class ClientId { class ClientId {
static const webLogUrl = "https://..."; static const webLogUrl = "https://...";

View File

@@ -11,22 +11,6 @@
// //
// J D Abbey & P A Abbey, 28 December 2022 // J D Abbey & P A Abbey, 28 December 2022
// //
//
// Description:
//
// ErrorView provides a means to present application errors to the user. These
// should not happen of course... but they do, so best make sure errors can be
// reported.
//
// Designed so that a single ErrorView is used for all errors and hence can ensure
// that only the first call to display is honoured until the view is dismissed.
// This compensates for older devices not being able to call WatchUi.getCurrentView()
// due to not supporting API level 3.4.0.
//
// Usage:
// 1) ErrorView.show("Error message");
// 2) return ErrorView.create("Error message"); // as Lang.Array<WatchUi.Views or WatchUi.InputDelegates>
//
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
using Toybox.Graphics; using Toybox.Graphics;
@@ -35,6 +19,19 @@ using Toybox.WatchUi;
using Toybox.Communications; using Toybox.Communications;
using Toybox.Timer; using Toybox.Timer;
//! ErrorView provides a means to present application errors to the user. These
//! should not happen of course... but they do, so best make sure errors can be
//! reported.
//!
//! Designed so that a single ErrorView is used for all errors and hence can ensure
//! that only the first call to display is honoured until the view is dismissed.
//! This compensates for older devices not being able to call WatchUi.getCurrentView()
//! due to not supporting API level 3.4.0.
//!
//! Usage:
//! 1) `ErrorView.show("Error message");`
//! 2) `return ErrorView.create("Error message"); // as Lang.Array<WatchUi.Views or WatchUi.InputDelegates>`
//
class ErrorView extends ScalableView { class ErrorView extends ScalableView {
private static const scErrorIconMargin as Lang.Float = 7f; private static const scErrorIconMargin as Lang.Float = 7f;
private var mText as Lang.String = ""; private var mText as Lang.String = "";
@@ -42,15 +39,17 @@ class ErrorView extends ScalableView {
// Vertical spacing between the top of the face and the error icon // Vertical spacing between the top of the face and the error icon
private var mErrorIconMargin as Lang.Number; private var mErrorIconMargin as Lang.Number;
private var mErrorIcon; private var mErrorIcon;
private var mTextArea as WatchUi.TextArea or Null; private var mTextArea as WatchUi.TextArea?;
private var mAntiAlias as Lang.Boolean = false; private var mAntiAlias as Lang.Boolean = false;
private static var instance; private static var instance;
private static var mShown as Lang.Boolean = false; private static var mShown as Lang.Boolean = false;
//! Class Constructor
//
function initialize() { function initialize() {
ScalableView.initialize(); ScalableView.initialize();
mDelegate = new ErrorDelegate(self); mDelegate = new ErrorDelegate();
// Convert the settings from % of screen size to pixels // Convert the settings from % of screen size to pixels
mErrorIconMargin = pixelsForScreen(scErrorIconMargin); mErrorIconMargin = pixelsForScreen(scErrorIconMargin);
mErrorIcon = Application.loadResource(Rez.Drawables.ErrorIcon) as Graphics.BitmapResource; mErrorIcon = Application.loadResource(Rez.Drawables.ErrorIcon) as Graphics.BitmapResource;
@@ -59,7 +58,10 @@ class ErrorView extends ScalableView {
} }
} }
// Load your resources here //! Construct the view.
//!
//! @param dc Device context
//
function onLayout(dc as Graphics.Dc) as Void { function onLayout(dc as Graphics.Dc) as Void {
var w = dc.getWidth(); var w = dc.getWidth();
@@ -75,7 +77,10 @@ class ErrorView extends ScalableView {
}); });
} }
// Update the view //! Update the view
//!
//! @param dc Device context
//
function onUpdate(dc as Graphics.Dc) as Void { function onUpdate(dc as Graphics.Dc) as Void {
var w = dc.getWidth(); var w = dc.getWidth();
if (mAntiAlias) { if (mAntiAlias) {
@@ -87,10 +92,18 @@ class ErrorView extends ScalableView {
mTextArea.draw(dc); mTextArea.draw(dc);
} }
//! Get this view's delegate for processing events.
//
function getDelegate() as ErrorDelegate { function getDelegate() as ErrorDelegate {
return mDelegate; return mDelegate;
} }
//! 'Create' (get) the ErrorView instance, intended to make short work of using this class. E.g.
//!
//! `return ErrorView.create("Went wrong!");`
//!
//! @param text The string to display in the ErrorView.
//
static function create(text as Lang.String) as [ WatchUi.Views ] or [ WatchUi.Views, WatchUi.InputDelegates ] { static function create(text as Lang.String) as [ WatchUi.Views ] or [ WatchUi.Views, WatchUi.InputDelegates ] {
if (instance == null) { if (instance == null) {
instance = new ErrorView(); instance = new ErrorView();
@@ -102,7 +115,10 @@ class ErrorView extends ScalableView {
return [instance, instance.getDelegate()]; return [instance, instance.getDelegate()];
} }
// Create or reuse an existing ErrorView, and pass on the text. //! Create or reuse an existing ErrorView, and pass on the text.
//!
//! @param text The string to display in the ErrorView.
//
static function show(text as Lang.String) as Void { static function show(text as Lang.String) as Void {
if (!mShown) { if (!mShown) {
create(text); // Ignore returned values create(text); // Ignore returned values
@@ -113,20 +129,25 @@ class ErrorView extends ScalableView {
} }
} }
//! Pop the view and clean up timers.
//
static function unShow() as Void { static function unShow() as Void {
if (mShown) { if (mShown) {
WatchUi.popView(WatchUi.SLIDE_DOWN); WatchUi.popView(WatchUi.SLIDE_DOWN);
// The call to 'updateMenuItems()' must be on another thread so that the view is popped above. // The call to 'updateMenuItems()' must be on another thread so that the view is popped above.
var myTimer = new Timer.Timer(); 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. // 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(:updateMenuItems), Globals.scApiResume, false); myTimer.start(getApp().method(:updateMenuItems), Globals.scApiResumeMs, false);
// This must be last to avoid a race condition with show(), where the // This must be last to avoid a race condition with show(), where the
// ErrorView can't be dismissed. // ErrorView can't be dismissed.
mShown = false; mShown = false;
} }
} }
// Internal show now we're not a static method like 'show()'. //! Internal show now we're not a static method like 'show()'.
//!
//! @param text Change the string tio display in the ErrorView.
//
function setText(text as Lang.String) as Void { function setText(text as Lang.String) as Void {
mText = text; mText = text;
if (mTextArea != null) { if (mTextArea != null) {
@@ -137,12 +158,19 @@ class ErrorView extends ScalableView {
} }
//! Delegate for the ErrorView.
//
class ErrorDelegate extends WatchUi.BehaviorDelegate { class ErrorDelegate extends WatchUi.BehaviorDelegate {
function initialize(view as ErrorView) { //! Class Constructor
//!
function initialize() {
WatchUi.BehaviorDelegate.initialize(); WatchUi.BehaviorDelegate.initialize();
} }
//! Handle the back button (ESC) to clear the ErrorView.
//
function onBack() as Lang.Boolean { function onBack() as Lang.Boolean {
getApp().getQuitTimer().reset(); getApp().getQuitTimer().reset();
ErrorView.unShow(); ErrorView.unShow();

View File

@@ -11,30 +11,42 @@
// //
// P A Abbey & J D Abbey & Someone0nEarth & moesterheld, 31 October 2023 // P A Abbey & J D Abbey & Someone0nEarth & moesterheld, 31 October 2023
// //
//
// Description:
//
// Home Assistant centralised constants.
//
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
using Toybox.Lang; using Toybox.Lang;
//! Home Assistant centralised constants.
//
(:glance) (:glance)
class Globals { class Globals {
static const scAlertTimeout = 2000; // ms //! Alert is a toast at the top of the watch screen, it stays present until tapped
static const scTapTimeout = 1000; // ms //! or this timeout has expired.
// Time to let the existing HTTP responses get serviced after a static const scAlertTimeoutMs = 2000; // ms
// Communications.NETWORK_RESPONSE_OUT_OF_MEMORY response code.
static const scApiBackoff = 1000; // ms //! Time to let the existing HTTP responses get serviced after a
// Needs to be long enough to enable a "double ESC" to quit the application from //! `Communications.NETWORK_RESPONSE_OUT_OF_MEMORY` response code.
// an ErrorView. static const scApiBackoffMs = 2000; // ms
static const scApiResume = 200; // ms
// Warn the user after fetching the menu if their watch is low on memory before the device crashes. //! Needs to be long enough to enable a "double ESC" to quit the application from
//! an ErrorView.
static const scApiResumeMs = 200; // ms
//! Warn the user after fetching the menu if their watch is low on memory before the device crashes.
static const scLowMem = 0.90; // percent as a fraction. static const scLowMem = 0.90; // percent as a fraction.
// Constants for PIN confirmation dialog //! Constant for PIN confirmation dialog.<br>
static const scPinMaxFailures = 5; // Maximum number of failed PIN confirmation attemps allwed in ... //! Maximum number of failed PIN confirmation attempts allowed in `scPinMaxFailureMinutes`.
static const scPinMaxFailureMinutes = 2; // ... this number of minutes before PIN confirmation is locked for ... static const scPinMaxFailures = 5;
static const scPinLockTimeMinutes = 10; // ... this number of minutes
//! Constant for PIN confirmation dialog.<br>
//! Period in minutes during which no more than `scPinMaxFailures` PIN attempts are tolerated.
static const scPinMaxFailureMinutes = 2;
//! Constant for PIN confirmation dialog.<br>
//! Lock out time in minutes after a failed PIN entry.
static const scPinLockTimeMinutes = 10;
//! After running a task by Wi-Fi/LTE synchronisation the periodic updates need to resume. This
//! is the delay between synchronisation completion and resumption of updates.
static const wifiPollResumeDelayMs = 2000; // ms
} }

View File

@@ -9,37 +9,40 @@
// tested on a Venu 2 device. The source code is provided at: // tested on a Venu 2 device. The source code is provided at:
// https://github.com/house-of-abbey/GarminHomeAssistant. // https://github.com/house-of-abbey/GarminHomeAssistant.
// //
// P A Abbey & J D Abbey & Someone0nEarth & moesterheld, 31 October 2023 // P A Abbey & J D Abbey & Someone0nEarth & moesterheld & vincentezw, 31 October 2023
//
//
// Description:
//
// Application root for GarminHomeAssistant
// //
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
using Toybox.Application; using Toybox.Application;
using Toybox.Communications;
using Toybox.Lang; using Toybox.Lang;
using Toybox.WatchUi; using Toybox.WatchUi;
using Toybox.System; using Toybox.System;
using Toybox.Application.Properties; using Toybox.Application.Properties;
using Toybox.Timer; using Toybox.Timer;
//! Application root for GarminHomeAssistant
//
(:glance, :background) (:glance, :background)
class HomeAssistantApp extends Application.AppBase { class HomeAssistantApp extends Application.AppBase {
private var mApiStatus as Lang.String or Null; private var mHasToast as Lang.Boolean = false;
private var mMenuStatus as Lang.String or Null; private var mApiStatus as Lang.String?;
private var mHaMenu as HomeAssistantView or Null; private var mMenuStatus as Lang.String?;
private var mQuitTimer as QuitTimer or Null; private var mHaMenu as HomeAssistantView?;
private var mGlanceTimer as Timer.Timer or Null; private var mGlanceTemplate as Lang.String? = null;
private var mUpdateTimer as Timer.Timer or Null; private var mGlanceText as Lang.String? = null;
private var mQuitTimer as QuitTimer?;
private var mGlanceTimer as Timer.Timer?;
private var mUpdateTimer as Timer.Timer?;
// Array initialised by onReturnFetchMenuConfig() // Array initialised by onReturnFetchMenuConfig()
private var mItemsToUpdate as Lang.Array<HomeAssistantToggleMenuItem or HomeAssistantTapMenuItem or HomeAssistantGroupMenuItem> or Null; private var mItemsToUpdate as Lang.Array<HomeAssistantToggleMenuItem or HomeAssistantTapMenuItem or HomeAssistantGroupMenuItem>?;
private var mIsGlance as Lang.Boolean = false;
private var mIsApp as Lang.Boolean = false; // Or Widget private var mIsApp as Lang.Boolean = false; // Or Widget
private var mUpdating as Lang.Boolean = false; // Don't start a second chain of updates private var mUpdating as Lang.Boolean = false; // Don't start a second chain of updates
private var mTemplates as Lang.Dictionary = {}; private var mTemplates as Lang.Dictionary = {};
private var mNotifiedNoBle as Lang.Boolean = false;
//! Class Constructor
//
function initialize() { function initialize() {
AppBase.initialize(); AppBase.initialize();
// ATTENTION when adding stuff into this block: // ATTENTION when adding stuff into this block:
@@ -55,7 +58,10 @@ class HomeAssistantApp extends Application.AppBase {
// with "(:glance)". // with "(:glance)".
} }
// onStart() is called on application start up //! Called on application start up
//!
//! @param state see `AppBase.onStart()`
//
function onStart(state as Lang.Dictionary?) as Void { function onStart(state as Lang.Dictionary?) as Void {
AppBase.onStart(state); AppBase.onStart(state);
// ATTENTION when adding stuff into this block: // ATTENTION when adding stuff into this block:
@@ -71,7 +77,11 @@ class HomeAssistantApp extends Application.AppBase {
// with "(:glance)". // with "(:glance)".
} }
// onStop() is called when your application is exiting //! Called when your application is exiting
//
//!
//! @param state see `AppBase.onStop()`
//
function onStop(state as Lang.Dictionary?) as Void { function onStop(state as Lang.Dictionary?) as Void {
AppBase.onStop(state); AppBase.onStop(state);
// ATTENTION when adding stuff into this block: // ATTENTION when adding stuff into this block:
@@ -87,13 +97,17 @@ class HomeAssistantApp extends Application.AppBase {
// with "(:glance)". // with "(:glance)".
} }
// Return the initial view of your application here //! Returns the initial view of the application.
//!
//! @return The initial view.
//
function getInitialView() as [ WatchUi.Views ] or [ WatchUi.Views, WatchUi.InputDelegates ] { function getInitialView() as [ WatchUi.Views ] or [ WatchUi.Views, WatchUi.InputDelegates ] {
mIsApp = true; mIsApp = true;
mQuitTimer = new QuitTimer(); mQuitTimer = new QuitTimer();
mUpdateTimer = new Timer.Timer(); mUpdateTimer = new Timer.Timer();
mApiStatus = WatchUi.loadResource($.Rez.Strings.Checking) as Lang.String; mApiStatus = WatchUi.loadResource($.Rez.Strings.Checking) as Lang.String;
mMenuStatus = WatchUi.loadResource($.Rez.Strings.Checking) as Lang.String; mMenuStatus = WatchUi.loadResource($.Rez.Strings.Checking) as Lang.String;
mHasToast = WatchUi has :showToast;
Settings.update(); Settings.update();
if (Settings.getApiKey().length() == 0) { if (Settings.getApiKey().length() == 0) {
@@ -111,11 +125,14 @@ class HomeAssistantApp extends Application.AppBase {
} else if (Settings.getPin() == null) { } else if (Settings.getPin() == null) {
// System.println("HomeAssistantApp getInitialView(): Invalid PIN in application settings."); // System.println("HomeAssistantApp getInitialView(): Invalid PIN in application settings.");
return ErrorView.create(WatchUi.loadResource($.Rez.Strings.SettingsPinError) as Lang.String); return ErrorView.create(WatchUi.loadResource($.Rez.Strings.SettingsPinError) as Lang.String);
} else if (! System.getDeviceSettings().phoneConnected) { } else if (! System.getDeviceSettings().phoneConnected and Settings.getWifiLteExecutionEnabled() and ! hasCachedMenu()) {
// System.println("HomeAssistantApp getInitialView(): No Phone connection, skipping API call."); // System.println("HomeAssistantApp getInitialView(): No Phone connection, no cached menu, skipping API call.");
return ErrorView.create(WatchUi.loadResource($.Rez.Strings.NoPhoneNoCache) as Lang.String);
} else if (! System.getDeviceSettings().phoneConnected and ! Settings.getWifiLteExecutionEnabled()) {
// System.println("HomeAssistantApp getInitialView(): No Phone connection and Wi-Fi disabled, skipping API call.");
return ErrorView.create(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String); return ErrorView.create(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String);
} else if (! System.getDeviceSettings().connectionAvailable) { } else if (! System.getDeviceSettings().connectionAvailable and ! Settings.getWifiLteExecutionEnabled()) {
// System.println("HomeAssistantApp getInitialView(): No Internet connection, skipping API call."); // System.println("HomeAssistantApp getInitialView(): No Internet connection and Wi-Fi disabled, skipping API call.");
return ErrorView.create(WatchUi.loadResource($.Rez.Strings.NoInternet) as Lang.String); return ErrorView.create(WatchUi.loadResource($.Rez.Strings.NoInternet) as Lang.String);
} else { } else {
var isCached = fetchMenuConfig(); var isCached = fetchMenuConfig();
@@ -132,10 +149,15 @@ class HomeAssistantApp extends Application.AppBase {
} }
} }
// Callback function after completing the GET request to fetch the configuration menu. //! Callback function after completing the GET request to fetch the configuration menu.
//!
//! @param responseCode Response code.
//! @param data Response data.
// //
(:glance) function onReturnFetchMenuConfig(
function onReturnFetchMenuConfig(responseCode as Lang.Number, data as Null or Lang.Dictionary or Lang.String) as Void { responseCode as Lang.Number,
data as Null or Lang.Dictionary or Lang.String
) as Void {
// System.println("HomeAssistantApp onReturnFetchMenuConfig() Response Code: " + responseCode); // System.println("HomeAssistantApp onReturnFetchMenuConfig() Response Code: " + responseCode);
// System.println("HomeAssistantApp onReturnFetchMenuConfig() Response Data: " + data); // System.println("HomeAssistantApp onReturnFetchMenuConfig() Response Data: " + data);
@@ -144,35 +166,35 @@ class HomeAssistantApp extends Application.AppBase {
case Communications.BLE_HOST_TIMEOUT: case Communications.BLE_HOST_TIMEOUT:
case Communications.BLE_CONNECTION_UNAVAILABLE: case Communications.BLE_CONNECTION_UNAVAILABLE:
// 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) { if (mIsApp) {
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String); ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String);
} }
break; break;
case Communications.BLE_QUEUE_FULL: case Communications.BLE_QUEUE_FULL:
// 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) { if (mIsApp) {
ErrorView.show(WatchUi.loadResource($.Rez.Strings.ApiFlood) as Lang.String); ErrorView.show(WatchUi.loadResource($.Rez.Strings.ApiFlood) as Lang.String);
} }
break; break;
case Communications.NETWORK_REQUEST_TIMED_OUT: case Communications.NETWORK_REQUEST_TIMED_OUT:
// 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) { if (mIsApp) {
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoResponse) as Lang.String); ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoResponse) as Lang.String);
} }
break; break;
case Communications.INVALID_HTTP_BODY_IN_NETWORK_RESPONSE: case Communications.INVALID_HTTP_BODY_IN_NETWORK_RESPONSE:
// 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) { if (mIsApp) {
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoJson) as Lang.String); ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoJson) as Lang.String);
} }
break; break;
case 404: case 404:
// 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) { if (mIsApp) {
ErrorView.show(WatchUi.loadResource($.Rez.Strings.ConfigUrlNotFound) as Lang.String); ErrorView.show(WatchUi.loadResource($.Rez.Strings.ConfigUrlNotFound) as Lang.String);
} }
break; break;
@@ -188,7 +210,9 @@ class HomeAssistantApp extends Application.AppBase {
mMenuStatus = WatchUi.loadResource($.Rez.Strings.Available) as Lang.String; mMenuStatus = WatchUi.loadResource($.Rez.Strings.Available) as Lang.String;
} }
} }
if (!mIsGlance) { if (!mIsApp) {
glanceTemplate(data);
} else {
if (data == null) { if (data == null) {
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoJson) as Lang.String); ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoJson) as Lang.String);
} else { } else {
@@ -200,7 +224,7 @@ class HomeAssistantApp extends Application.AppBase {
default: default:
// System.println("HomeAssistantApp onReturnFetchMenuConfig(): Unhandled HTTP response code = " + responseCode); // System.println("HomeAssistantApp onReturnFetchMenuConfig(): Unhandled HTTP response code = " + responseCode);
if (!mIsGlance) { if (mIsApp) {
ErrorView.show(WatchUi.loadResource($.Rez.Strings.UnhandledHttpErr) as Lang.String + responseCode); ErrorView.show(WatchUi.loadResource($.Rez.Strings.UnhandledHttpErr) as Lang.String + responseCode);
} }
break; break;
@@ -208,9 +232,23 @@ class HomeAssistantApp extends Application.AppBase {
WatchUi.requestUpdate(); WatchUi.requestUpdate();
} }
// Return true if the menu came from the cache, otherwise false. This is because fetching the menu when not in the cache is //! Can we use the cached menu?
// asynchronous and affects how the views are managed. //!
(:glance) //! @return Return true if there's a menu in cache, and if the user has enabled the cache and
//! has not requested to have the cache refreshed.
//
function hasCachedMenu() as Lang.Boolean {
if (Settings.getClearCache() || !Settings.getCacheConfig()) {
return false;
}
return (Storage.getValue("menu") as Lang.Dictionary) != null;
}
//! Fetch the menu configuration over HTTPS, which might be locally cached.
//!
//! @return Return true if the menu came from the cache, otherwise false. This is because fetching
//! the menu when not in the cache is asynchronous and affects how the views are managed.
//
function fetchMenuConfig() as Lang.Boolean { function fetchMenuConfig() as Lang.Boolean {
// System.println("Menu URL = " + Settings.getConfigUrl()); // System.println("Menu URL = " + Settings.getConfigUrl());
if (Settings.getConfigUrl().equals("")) { if (Settings.getConfigUrl().equals("")) {
@@ -224,29 +262,30 @@ class HomeAssistantApp extends Application.AppBase {
Settings.unsetClearCache(); Settings.unsetClearCache();
} }
if (menu == null) { if (menu == null) {
if (! System.getDeviceSettings().phoneConnected) { var phoneConnected = System.getDeviceSettings().phoneConnected;
var internetAvailable = System.getDeviceSettings().connectionAvailable;
if (! phoneConnected or ! internetAvailable) {
var errorRez = $.Rez.Strings.NoPhone;
if (Settings.getWifiLteExecutionEnabled()) {
errorRez = $.Rez.Strings.NoPhoneNoCache;
} else if (! internetAvailable) {
errorRez = $.Rez.Strings.Unavailable;
}
// System.println("HomeAssistantApp fetchMenuConfig(): No Phone connection, skipping API call."); // System.println("HomeAssistantApp fetchMenuConfig(): No Phone connection, skipping API call.");
if (mIsGlance) { if (!mIsApp) {
WatchUi.requestUpdate(); WatchUi.requestUpdate();
} else { } else {
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String); ErrorView.show(WatchUi.loadResource(errorRez) as Lang.String);
} }
mMenuStatus = WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String; mMenuStatus = WatchUi.loadResource(errorRez) as Lang.String;
} else if (! System.getDeviceSettings().connectionAvailable) {
// System.println("HomeAssistantApp fetchMenuConfig(): No Internet connection, skipping API call.");
if (mIsGlance) {
WatchUi.requestUpdate();
} else {
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoInternet) as Lang.String);
}
mMenuStatus = WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String;
} else { } else {
Communications.makeWebRequest( Communications.makeWebRequest(
Settings.getConfigUrl(), Settings.getConfigUrl(),
null, null,
{ {
:method => Communications.HTTP_REQUEST_METHOD_GET, :method => Communications.HTTP_REQUEST_METHOD_GET,
:responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON :responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON,
:headers => Settings.augmentHttpHeaders({})
}, },
method(:onReturnFetchMenuConfig) method(:onReturnFetchMenuConfig)
); );
@@ -254,7 +293,9 @@ class HomeAssistantApp extends Application.AppBase {
} else { } else {
mMenuStatus = WatchUi.loadResource($.Rez.Strings.Cached) as Lang.String; mMenuStatus = WatchUi.loadResource($.Rez.Strings.Cached) as Lang.String;
WatchUi.requestUpdate(); WatchUi.requestUpdate();
if (!mIsGlance) { if (!mIsApp) {
glanceTemplate(menu);
} else {
buildMenu(menu); buildMenu(menu);
} }
return true; return true;
@@ -263,23 +304,53 @@ class HomeAssistantApp extends Application.AppBase {
return false; return false;
} }
//! Build the menu and store in `mHaMenu`. Then start updates if necessary.
//!
//! @param menu The dictionary derived from the JSON menu fetched by `fetchMenuConfig()`.
//
private function buildMenu(menu as Lang.Dictionary) { private function buildMenu(menu as Lang.Dictionary) {
mHaMenu = new HomeAssistantView(menu, null); mHaMenu = new HomeAssistantView(menu, null);
mQuitTimer.begin(); mQuitTimer.begin();
if (!Settings.getWebhookId().equals("")) { if (!Settings.getWebhookId().equals("") && !Settings.getClearWebhookId()) {
startUpdates(); startUpdates();
} // If not, this will be done via a chain in Settings.webhook() and mWebhookManager.requestWebhookId() that registers the sensors. } // If not, this will be done via a chain in Settings.webhook() and mWebhookManager.requestWebhookId() that registers the sensors.
} }
function startUpdates() { //! Start the periodic menu updates for as long as the application is running.
//
function startUpdates() as Void {
if (mHaMenu != null and !mUpdating) { if (mHaMenu != null and !mUpdating) {
// Start the continuous update process that continues for as long as the application is running. // Start the continuous update process that continues for as long as the application is running.
updateMenuItems();
mUpdating = true; mUpdating = true;
updateMenuItems();
} }
} }
function onReturnUpdateMenuItems(responseCode as Lang.Number, data as Null or Lang.Dictionary) as Void { //! Extract the optional template to override the default glance view.
//
function glanceTemplate(menu as Lang.Dictionary) {
if (menu != null) {
if (menu.get("glance") != null) {
var glance = menu.get("glance") as Lang.Dictionary;
if (glance.get("type").equals("info")) {
mGlanceTemplate = glance.get("content") as Lang.String;
// System.println("HomeAssistantApp glanceTemplate() " + mGlanceTemplate);
} else { // if glance.get("type").equals("status")
mGlanceTemplate = null;
}
}
}
}
//! Callback function for each menu update GET request.
//!
//! @param responseCode Response code.
//! @param data Response data.
//
function onReturnUpdateMenuItems(
responseCode as Lang.Number,
data as Null or Lang.Dictionary
) as Void {
// System.println("HomeAssistantApp onReturnUpdateMenuItems() Response Code: " + responseCode); // System.println("HomeAssistantApp onReturnUpdateMenuItems() Response Code: " + responseCode);
// System.println("HomeAssistantApp onReturnUpdateMenuItems() Response Data: " + data); // System.println("HomeAssistantApp onReturnUpdateMenuItems() Response Data: " + data);
@@ -310,7 +381,7 @@ class HomeAssistantApp extends Application.AppBase {
// System.println("HomeAssistantApp onReturnUpdateMenuItems() Response Code: NETWORK_RESPONSE_OUT_OF_MEMORY, are we going too fast?"); // System.println("HomeAssistantApp onReturnUpdateMenuItems() Response Code: NETWORK_RESPONSE_OUT_OF_MEMORY, are we going too fast?");
var myTimer = new Timer.Timer(); 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. // Now this feels very "closely coupled" to the application, but it is the most reliable method instead of using a timer.
myTimer.start(method(:updateMenuItems), Globals.scApiBackoff, false); myTimer.start(method(:updateMenuItems), Globals.scApiBackoffMs, false);
// Revert status // Revert status
status = getApiStatus(); status = getApiStatus();
break; break;
@@ -328,6 +399,10 @@ class HomeAssistantApp extends Application.AppBase {
case 200: case 200:
status = WatchUi.loadResource($.Rez.Strings.Available) as Lang.String; status = WatchUi.loadResource($.Rez.Strings.Available) as Lang.String;
// System.println("mItemsToUpdate: " + mItemsToUpdate); // System.println("mItemsToUpdate: " + mItemsToUpdate);
if (data == null) {
// Simulation and real device behave differently, hence 2nd NoJson error message for "data == null".
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoJson) as Lang.String);
} else {
if (mItemsToUpdate != null) { if (mItemsToUpdate != null) {
for (var i = 0; i < mItemsToUpdate.size(); i++) { for (var i = 0; i < mItemsToUpdate.size(); i++) {
var item = mItemsToUpdate[i]; var item = mItemsToUpdate[i];
@@ -344,6 +419,7 @@ class HomeAssistantApp extends Application.AppBase {
updateMenuItems(); updateMenuItems();
} }
} }
}
break; break;
default: default:
@@ -353,22 +429,60 @@ class HomeAssistantApp extends Application.AppBase {
setApiStatus(status); setApiStatus(status);
} }
//! Construct the GET request to update all menu items.
//
function updateMenuItems() as Void { function updateMenuItems() as Void {
if (! System.getDeviceSettings().phoneConnected) { if (mUpdating) {
var phoneConnected = System.getDeviceSettings().phoneConnected;
var connectionAvailable = System.getDeviceSettings().connectionAvailable;
// In Wi-Fi/LTE execution mode, we should not show an error page but use a toast instead.
if (Settings.getWifiLteExecutionEnabled() && (! phoneConnected || ! connectionAvailable)) {
// Notify only once per disconnection cycle
if (!mNotifiedNoBle) {
var toast = WatchUi.loadResource($.Rez.Strings.NoPhone);
if (!connectionAvailable) {
toast = WatchUi.loadResource($.Rez.Strings.NoInternet);
}
if (mHasToast) {
WatchUi.showToast(toast, null);
} else {
new Alert({
:timeout => Globals.scAlertTimeoutMs,
:font => Graphics.FONT_MEDIUM,
:text => toast,
:fgcolor => Graphics.COLOR_WHITE,
:bgcolor => Graphics.COLOR_BLACK
}).pushView(WatchUi.SLIDE_IMMEDIATE);
}
}
mNotifiedNoBle = true;
setApiStatus(WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String);
mUpdateTimer.start(method(:startUpdates), Globals.wifiPollResumeDelayMs, false);
mUpdating = false;
return;
}
if (! phoneConnected) {
// System.println("HomeAssistantApp updateMenuItems(): No Phone connection, skipping API call."); // System.println("HomeAssistantApp updateMenuItems(): No Phone connection, skipping API call.");
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String); ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String);
setApiStatus(WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String); setApiStatus(WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String);
} else if (! System.getDeviceSettings().connectionAvailable) { } else if (! connectionAvailable) {
// System.println("HomeAssistantApp updateMenuItems(): No Internet connection, skipping API call."); // System.println("HomeAssistantApp updateMenuItems(): No Internet connection, skipping API call.");
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoInternet) as Lang.String); ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoInternet) as Lang.String);
setApiStatus(WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String); setApiStatus(WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String);
} else { } else {
mNotifiedNoBle = false;
if (mItemsToUpdate == null or mTemplates == null) { if (mItemsToUpdate == null or mTemplates == null) {
mItemsToUpdate = mHaMenu.getItemsToUpdate(); mItemsToUpdate = mHaMenu.getItemsToUpdate();
mTemplates = {}; mTemplates = {};
for (var i = 0; i < mItemsToUpdate.size(); i++) { for (var i = 0; i < mItemsToUpdate.size(); i++) {
var item = mItemsToUpdate[i]; var item = mItemsToUpdate[i];
var template = item.buildTemplate(); var template = item.getTemplate();
if (template != null) { if (template != null) {
mTemplates.put(i.toString(), { mTemplates.put(i.toString(), {
"template" => template "template" => template
@@ -376,36 +490,41 @@ class HomeAssistantApp extends Application.AppBase {
} }
if (item instanceof HomeAssistantToggleMenuItem) { if (item instanceof HomeAssistantToggleMenuItem) {
mTemplates.put(i.toString() + "t", { mTemplates.put(i.toString() + "t", {
"template" => (item as HomeAssistantToggleMenuItem).buildToggleTemplate() "template" => (item as HomeAssistantToggleMenuItem).getToggleTemplate()
}); });
} }
} }
} }
// https://developers.home-assistant.io/docs/api/native-app-integration/sending-data/#render-templates // https://developers.home-assistant.io/docs/api/native-app-integration/sending-data/#render-templates
var url = Settings.getApiUrl() + "/webhook/" + Settings.getWebhookId();
// System.println("HomeAssistantApp updateMenuItems() URL=" + url + ", Template='" + mTemplate + "'"); // System.println("HomeAssistantApp updateMenuItems() URL=" + url + ", Template='" + mTemplate + "'");
Communications.makeWebRequest( Communications.makeWebRequest(
url, Settings.getApiUrl() + "/webhook/" + Settings.getWebhookId(),
{ {
"type" => "render_template", "type" => "render_template",
"data" => mTemplates "data" => mTemplates
}, },
{ {
:method => Communications.HTTP_REQUEST_METHOD_POST, :method => Communications.HTTP_REQUEST_METHOD_POST,
:headers => { :headers => Settings.augmentHttpHeaders({
"Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON "Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON
}, }),
:responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON :responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON
}, },
method(:onReturnUpdateMenuItems) method(:onReturnUpdateMenuItems)
); );
} }
} }
}
// Callback function after completing the GET request to fetch the API status. //! Callback function after completing the GET request to fetch the API status.
//!
//! @param responseCode Response code.
//! @param data Response data.
// //
(:glance) function onReturnFetchApiStatus(
function onReturnFetchApiStatus(responseCode as Lang.Number, data as Null or Lang.Dictionary or Lang.String) as Void { responseCode as Lang.Number,
data as Null or Lang.Dictionary or Lang.String
) as Void {
// System.println("HomeAssistantApp onReturnFetchApiStatus() Response Code: " + responseCode); // System.println("HomeAssistantApp onReturnFetchApiStatus() Response Code: " + responseCode);
// System.println("HomeAssistantApp onReturnFetchApiStatus() Response Data: " + data); // System.println("HomeAssistantApp onReturnFetchApiStatus() Response Data: " + data);
@@ -414,35 +533,35 @@ class HomeAssistantApp extends Application.AppBase {
case Communications.BLE_HOST_TIMEOUT: case Communications.BLE_HOST_TIMEOUT:
case Communications.BLE_CONNECTION_UNAVAILABLE: case Communications.BLE_CONNECTION_UNAVAILABLE:
// 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) { if (mIsApp) {
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String); ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String);
} }
break; break;
case Communications.BLE_QUEUE_FULL: case Communications.BLE_QUEUE_FULL:
// 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) { if (mIsApp) {
ErrorView.show(WatchUi.loadResource($.Rez.Strings.ApiFlood) as Lang.String); ErrorView.show(WatchUi.loadResource($.Rez.Strings.ApiFlood) as Lang.String);
} }
break; break;
case Communications.NETWORK_REQUEST_TIMED_OUT: case Communications.NETWORK_REQUEST_TIMED_OUT:
// 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) { if (mIsApp) {
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoResponse) as Lang.String); ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoResponse) as Lang.String);
} }
break; break;
case Communications.INVALID_HTTP_BODY_IN_NETWORK_RESPONSE: case Communications.INVALID_HTTP_BODY_IN_NETWORK_RESPONSE:
// 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) { if (mIsApp) {
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoJson) as Lang.String); ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoJson) as Lang.String);
} }
break; break;
case 404: case 404:
// 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) { if (mIsApp) {
ErrorView.show(WatchUi.loadResource($.Rez.Strings.ConfigUrlNotFound) as Lang.String); ErrorView.show(WatchUi.loadResource($.Rez.Strings.ConfigUrlNotFound) as Lang.String);
} }
break; break;
@@ -451,7 +570,7 @@ class HomeAssistantApp extends Application.AppBase {
if ((data != null) && data.get("message").equals("API running.")) { if ((data != null) && data.get("message").equals("API running.")) {
mApiStatus = WatchUi.loadResource($.Rez.Strings.Available) as Lang.String; mApiStatus = WatchUi.loadResource($.Rez.Strings.Available) as Lang.String;
} else { } else {
if (!mIsGlance) { if (mIsApp) {
ErrorView.show("API " + mApiStatus + "."); ErrorView.show("API " + mApiStatus + ".");
} }
} }
@@ -459,32 +578,40 @@ class HomeAssistantApp extends Application.AppBase {
default: default:
// System.println("HomeAssistantApp onReturnFetchApiStatus(): Unhandled HTTP response code = " + responseCode); // System.println("HomeAssistantApp onReturnFetchApiStatus(): Unhandled HTTP response code = " + responseCode);
if (!mIsGlance) { if (mIsApp) {
ErrorView.show(WatchUi.loadResource($.Rez.Strings.UnhandledHttpErr) as Lang.String + responseCode); ErrorView.show(WatchUi.loadResource($.Rez.Strings.UnhandledHttpErr) as Lang.String + responseCode);
} }
} }
WatchUi.requestUpdate(); WatchUi.requestUpdate();
} }
(:glance) //! Construct the GET request to test the API status, is it accessible?
//
function fetchApiStatus() as Void { function fetchApiStatus() as Void {
var phoneConnected = System.getDeviceSettings().phoneConnected;
var connectionAvailable = System.getDeviceSettings().connectionAvailable;
// System.println("API URL = " + Settings.getApiUrl()); // System.println("API URL = " + Settings.getApiUrl());
if (Settings.getApiUrl().equals("")) { if (Settings.getApiUrl().equals("")) {
mApiStatus = WatchUi.loadResource($.Rez.Strings.Unconfigured) as Lang.String; mApiStatus = WatchUi.loadResource($.Rez.Strings.Unconfigured) as Lang.String;
WatchUi.requestUpdate(); WatchUi.requestUpdate();
} else { } else {
if (! System.getDeviceSettings().phoneConnected) { if ( mIsApp && Settings.getWifiLteExecutionEnabled() && (! phoneConnected || ! connectionAvailable)) {
// System.println("HomeAssistantApp fetchApiStatus(): In-app Wifi mode (No Phone and Internet connection), early return.");
return;
} else if (! phoneConnected) {
// System.println("HomeAssistantApp fetchApiStatus(): No Phone connection, skipping API call."); // System.println("HomeAssistantApp fetchApiStatus(): No Phone connection, skipping API call.");
mApiStatus = WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String; mApiStatus = WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String;
if (mIsGlance) { if (!mIsApp) {
WatchUi.requestUpdate(); WatchUi.requestUpdate();
} else { } else {
System.println("we here");
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String); ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String);
} }
} else if (! System.getDeviceSettings().connectionAvailable) { } else if (! connectionAvailable) {
// System.println("HomeAssistantApp fetchApiStatus(): No Internet connection, skipping API call."); // System.println("HomeAssistantApp fetchApiStatus(): No Internet connection, skipping API call.");
mApiStatus = WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String; mApiStatus = WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String;
if (mIsGlance) { if (!mIsApp) {
WatchUi.requestUpdate(); WatchUi.requestUpdate();
} else { } else {
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoInternet) as Lang.String); ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoInternet) as Lang.String);
@@ -495,9 +622,9 @@ class HomeAssistantApp extends Application.AppBase {
null, null,
{ {
:method => Communications.HTTP_REQUEST_METHOD_GET, :method => Communications.HTTP_REQUEST_METHOD_GET,
:headers => { :headers => Settings.augmentHttpHeaders({
"Authorization" => "Bearer " + Settings.getApiKey() "Authorization" => "Bearer " + Settings.getApiKey()
}, }),
:responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON :responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON
}, },
method(:onReturnFetchApiStatus) method(:onReturnFetchApiStatus)
@@ -506,30 +633,148 @@ class HomeAssistantApp extends Application.AppBase {
} }
} }
//! Callback function after completing the GET request to render the glance template.
//!
//! @param responseCode Response code.
//! @param data Response data.
//
function onReturnFetchGlanceContent(
responseCode as Lang.Number,
data as Null or Lang.Dictionary or Lang.String
) as Void {
// System.println("HomeAssistantApp onReturnFetchGlanceContent() Response Code: " + responseCode);
// System.println("HomeAssistantApp onReturnFetchGlanceContent() Response Data: " + data);
switch (responseCode) {
case Communications.BLE_HOST_TIMEOUT:
case Communications.BLE_CONNECTION_UNAVAILABLE:
// System.println("HomeAssistantApp onReturnFetchGlanceContent() Response Code: BLE_HOST_TIMEOUT or BLE_CONNECTION_UNAVAILABLE, Bluetooth connection severed.");
if (mIsApp) {
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String);
}
break;
case Communications.BLE_QUEUE_FULL:
// System.println("HomeAssistantApp onReturnFetchGlanceContent() Response Code: BLE_QUEUE_FULL, API calls too rapid.");
if (mIsApp) {
ErrorView.show(WatchUi.loadResource($.Rez.Strings.ApiFlood) as Lang.String);
}
break;
case Communications.NETWORK_REQUEST_TIMED_OUT:
// System.println("HomeAssistantApp onReturnFetchGlanceContent() Response Code: NETWORK_REQUEST_TIMED_OUT, check Internet connection.");
if (mIsApp) {
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoResponse) as Lang.String);
}
break;
case Communications.INVALID_HTTP_BODY_IN_NETWORK_RESPONSE:
// System.println("HomeAssistantApp onReturnFetchGlanceContent() Response Code: INVALID_HTTP_BODY_IN_NETWORK_RESPONSE, check JSON is returned.");
if (mIsApp) {
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoJson) as Lang.String);
}
break;
case 404:
// System.println("HomeAssistantApp onReturnFetchGlanceContent() Response Code: 404, page not found. Check Configuration URL setting.");
if (mIsApp) {
ErrorView.show(WatchUi.loadResource($.Rez.Strings.ConfigUrlNotFound) as Lang.String);
}
break;
case 200:
if (data != null) {
mGlanceText = data.get("glanceTemplate");
}
break;
default:
// System.println("HomeAssistantApp onReturnFetchGlanceContent(): Unhandled HTTP response code = " + responseCode);
if (mIsApp) {
ErrorView.show(WatchUi.loadResource($.Rez.Strings.UnhandledHttpErr) as Lang.String + responseCode);
}
}
WatchUi.requestUpdate();
}
//! Construct the GET request to convert the optional glance template to text for display.
//
function fetchGlanceContent() as Void {
if (mGlanceTemplate != null) {
// https://developers.home-assistant.io/docs/api/native-app-integration/sending-data/#render-templates
Communications.makeWebRequest(
Settings.getApiUrl() + "/webhook/" + Settings.getWebhookId(),
{
"type" => "render_template",
"data" => {
"glanceTemplate" => {
"template" => mGlanceTemplate
}
}
},
{
:method => Communications.HTTP_REQUEST_METHOD_POST,
:headers => Settings.augmentHttpHeaders({
"Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON
}),
:responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON
},
method(:onReturnFetchGlanceContent)
);
}
}
//! Record the API status result.
//!
//! @param s A string describing the API status
//
function setApiStatus(s as Lang.String) { function setApiStatus(s as Lang.String) {
mApiStatus = s; mApiStatus = s;
} }
(:glance) //! Return the API status result.
//!
//! @return A string describing the API status
//
function getApiStatus() as Lang.String { function getApiStatus() as Lang.String {
return mApiStatus; return mApiStatus;
} }
(:glance) //! Return the Menu status result.
//!
//! @return A string describing the Menu status
//
function getMenuStatus() as Lang.String { function getMenuStatus() as Lang.String {
return mMenuStatus; return mMenuStatus;
} }
//! Return the optional glance text that overrides the default glance content. This
//! is derived from the glance template.
//!
//! @return A string derived from the glance template (or null)
//
function getGlanceText() as Lang.String? {
return mGlanceText;
}
//! Return the Menu construction status.
//!
//! @return A Boolean indicating if the menu is loaded into the application.
//
function isHomeAssistantMenuLoaded() as Lang.Boolean { function isHomeAssistantMenuLoaded() as Lang.Boolean {
return mHaMenu != null; return mHaMenu != null;
} }
//! Make the menu visible on the watch face.
//
function pushHomeAssistantMenuView() as Void { function pushHomeAssistantMenuView() as Void {
WatchUi.pushView(mHaMenu, new HomeAssistantViewDelegate(true), WatchUi.SLIDE_IMMEDIATE); WatchUi.pushView(mHaMenu, new HomeAssistantViewDelegate(true), WatchUi.SLIDE_IMMEDIATE);
} }
// Only call this function if Settings.getPollDelay() > 0. This must be tested locally as it is then efficient to take //! Force status updates. Only take action if `Settings.getPollDelay() > 0`. This must be tested
// alternative action if the test fails. //! locally as it is then efficient to take alternative action if the test fails.
//
function forceStatusUpdates() as Void { function forceStatusUpdates() as Void {
// Don't mess with updates unless we are using a timer. // Don't mess with updates unless we are using a timer.
if (Settings.getPollDelay() > 0) { if (Settings.getPollDelay() > 0) {
@@ -539,45 +784,83 @@ class HomeAssistantApp extends Application.AppBase {
} }
} }
//! Return the timer used to quit the application.
//!
//! @return Timer object
//
function getQuitTimer() as QuitTimer { function getQuitTimer() as QuitTimer {
return mQuitTimer; return mQuitTimer;
} }
//! Return the glance view.
//!
//! @return The glance view
//
function getGlanceView() as [ WatchUi.GlanceView ] or [ WatchUi.GlanceView, WatchUi.GlanceViewDelegate ] or Null { function getGlanceView() as [ WatchUi.GlanceView ] or [ WatchUi.GlanceView, WatchUi.GlanceViewDelegate ] or Null {
mIsGlance = true; mIsApp = false; // A bit unnecessary given the default
mApiStatus = WatchUi.loadResource($.Rez.Strings.Checking) as Lang.String; mApiStatus = WatchUi.loadResource($.Rez.Strings.Checking) as Lang.String;
mMenuStatus = WatchUi.loadResource($.Rez.Strings.Checking) as Lang.String; mMenuStatus = WatchUi.loadResource($.Rez.Strings.Checking) as Lang.String;
Settings.update(); Settings.update();
updateStatus(); updateStatus();
mGlanceTimer = new Timer.Timer(); mGlanceTimer = new Timer.Timer();
mGlanceTimer.start(method(:updateStatus), Globals.scApiBackoff, true); mGlanceTimer.start(method(:updateStatus), Globals.scApiBackoffMs, true);
return [new HomeAssistantGlanceView(self)]; return [new HomeAssistantGlanceView(self)];
} }
// Required for the Glance update timer. //! Return the glance theme.
//!
//! @return The glance colour
//
function getGlanceTheme() as Application.AppBase.GlanceTheme {
return Application.AppBase.GLANCE_THEME_LIGHT_BLUE;
}
//! Update the menu and API statuses. Required for the Glance update timer.
//
function updateStatus() as Void { function updateStatus() as Void {
mGlanceTimer = null; mGlanceTimer = null;
fetchMenuConfig(); fetchMenuConfig();
fetchApiStatus(); fetchApiStatus();
if (!Settings.getWebhookId().equals("") && !Settings.getClearWebhookId()) {
fetchGlanceContent();
}
} }
//! Code for when the application settings are updated.
//
function onSettingsChanged() as Void { function onSettingsChanged() as Void {
// System.println("HomeAssistantApp onSettingsChanged()"); // System.println("HomeAssistantApp onSettingsChanged()");
Settings.update(); Settings.update();
} }
// Called each time the Registered Temporal Event is to be invoked. So the object is created each time on request and //! Called each time the Registered Temporal Event is to be invoked. So the object is created each time
// then destroyed on completion (to save resources). //! on request and then destroyed on completion (to save resources).
//
function getServiceDelegate() as [ System.ServiceDelegate ] { function getServiceDelegate() as [ System.ServiceDelegate ] {
return [new BackgroundServiceDelegate()]; return [new BackgroundServiceDelegate()];
} }
//! Determine is we are a glance or the full application. Glances should be considered to be separate applications.
//!
//! @return We are an application (if not we're a glance)
//
function getIsApp() as Lang.Boolean { function getIsApp() as Lang.Boolean {
return mIsApp; return mIsApp;
} }
//! Returns a SyncDelegate for this App
//!
//! @return a SyncDelegate or null
//
public function getSyncDelegate() as Communications.SyncDelegate? {
return new HomeAssistantSyncDelegate();
}
} }
//! Global function to return the application object.
//!
//! @return The application object.
//
(:glance, :background) (:glance, :background)
function getApp() as HomeAssistantApp { function getApp() as HomeAssistantApp {
return Application.getApp() as HomeAssistantApp; return Application.getApp() as HomeAssistantApp;

View File

@@ -9,12 +9,7 @@
// tested on a Venu 2 device. The source code is provided at: // tested on a Venu 2 device. The source code is provided at:
// https://github.com/house-of-abbey/GarminHomeAssistant. // https://github.com/house-of-abbey/GarminHomeAssistant.
// //
// P A Abbey & J D Abbey & Someone0nEarth, 19 November 2023 // P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 19 November 2023
//
//
// Description:
//
// Calling a Home Assistant confirmation dialogue view.
// //
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
@@ -25,43 +20,98 @@ using Toybox.WatchUi;
using Toybox.Timer; using Toybox.Timer;
using Toybox.Application.Properties; using Toybox.Application.Properties;
//! Calling a Home Assistant confirmation dialogue view.
//
class HomeAssistantConfirmation extends WatchUi.Confirmation { class HomeAssistantConfirmation extends WatchUi.Confirmation {
//! Class Constructor
//
function initialize() { function initialize() {
WatchUi.Confirmation.initialize(WatchUi.loadResource($.Rez.Strings.Confirm) as Lang.String); WatchUi.Confirmation.initialize(WatchUi.loadResource($.Rez.Strings.Confirm) as Lang.String);
} }
} }
//! Delegate to respond to the confirmation request.
//
class HomeAssistantConfirmationDelegate extends WatchUi.ConfirmationDelegate { class HomeAssistantConfirmationDelegate extends WatchUi.ConfirmationDelegate {
private static var mTimer as Timer.Timer?;
private var mConfirmMethod as Method(state as Lang.Boolean) as Void; private var mConfirmMethod as Method(state as Lang.Boolean) as Void;
private var mTimer as Timer.Timer or Null;
private var mState as Lang.Boolean; private var mState as Lang.Boolean;
private var mToggleMethod as Method(state as Lang.Boolean) as Void or Null;
private var mConfirmationView as WatchUi.Confirmation;
//! Class Constructor
//!
//! @param options A dictionary describing the following options:<br>
//! `{`<br>
//! &emsp; `:callback as Method(state as Lang.Boolean) as Void,` // Method to call on confirmation.<br>
//! &emsp; `:confirmationView as WatchUi.Confirmation,` // Confirmation the delegate is active for<br>
//! &emsp; `:state as Lang.Boolean,` // Wanted state of a toggle button.<br>
//! &emsp; `:toggle as Method(state as Lang.Boolean)?` // Optional setEnabled method to untoggle ToggleItem.<br>
//! `}`
//
function initialize(
options as {
:callback as Method(state as Lang.Boolean) as Void,
:confirmationView as WatchUi.Confirmation,
:state as Lang.Boolean,
:toggleMethod as Method(state as Lang.Boolean)?
}
) {
if (mTimer != null) {
mTimer.stop();
}
function initialize(callback as Method(state as Lang.Boolean) as Void, state as Lang.Boolean) {
WatchUi.ConfirmationDelegate.initialize(); WatchUi.ConfirmationDelegate.initialize();
mConfirmMethod = callback; mConfirmMethod = options[:callback];
mState = state; mConfirmationView = options[:confirmationView];
mState = options[:state];
mToggleMethod = options[:toggleMethod];
var timeout = Settings.getConfirmTimeout(); // ms var timeout = Settings.getConfirmTimeout(); // ms
if (timeout > 0) { if (timeout > 0) {
if (mTimer == null) {
mTimer = new Timer.Timer(); mTimer = new Timer.Timer();
}
mTimer.start(method(:onTimeout), timeout, true); mTimer.start(method(:onTimeout), timeout, true);
} }
} }
function onResponse(response) as Lang.Boolean { //! Respond to the confirmation event.
//!
//! @param response response code
//! @return Required to meet the function prototype, but the base class does not indicate a definition.
//
function onResponse(response as WatchUi.Confirm) as Lang.Boolean {
getApp().getQuitTimer().reset(); getApp().getQuitTimer().reset();
if (mTimer != null) { if (mTimer != null) {
mTimer.stop(); mTimer.stop();
} }
if (response == WatchUi.CONFIRM_YES) { if (response == WatchUi.CONFIRM_YES) {
mConfirmMethod.invoke(mState); mConfirmMethod.invoke(mState);
} else {
// Undo the toggle, if we have one
if (mToggleMethod != null) {
mToggleMethod.invoke(!mState);
}
} }
return true; return true;
} }
//! Function supplied to a timer in order to limit the time for which the confirmation can be provided.
//
function onTimeout() as Void { function onTimeout() as Void {
mTimer.stop(); mTimer.stop();
// Undo the toggle, if we have one
if (mToggleMethod != null) {
mToggleMethod.invoke(!mState);
}
var getCurrentView = WatchUi.getCurrentView();
if (getCurrentView[0] == mConfirmationView) {
WatchUi.popView(WatchUi.SLIDE_RIGHT); WatchUi.popView(WatchUi.SLIDE_RIGHT);
} }
}
} }

View File

@@ -11,29 +11,49 @@
// //
// P A Abbey & J D Abbey & Someone0nEarth, 23 November 2023 // P A Abbey & J D Abbey & Someone0nEarth, 23 November 2023
// //
//
// Description:
//
// Glance view for GarminHomeAssistant
//
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
using Toybox.Lang; using Toybox.Lang;
using Toybox.WatchUi; using Toybox.WatchUi;
using Toybox.Graphics; using Toybox.Graphics;
//! Glance view for GarminHomeAssistant
//
(:glance) (:glance)
class HomeAssistantGlanceView extends WatchUi.GlanceView { class HomeAssistantGlanceView extends WatchUi.GlanceView {
private static const scLeftMargin = 5; // in pixels //! Margin left of the filled rectangle in pixels.
private static const scMidSep = 10; // Middle Separator "text:_text" in pixels private static const scLeftRectMargin = 5;
//! Filled rectangle width in pixels.
private static const scRectWidth = 20;
//! Margin right of the filled rectangle in pixels.
private static const scRightRectMargin = 5;
//! Separator between the first column of text and the second in pixels.
//! i.e. Middle Separator "text:_text"
private static const scMidSep = 10;
//! Margin on the right side of the glance in pixels.
private static const scRightGlanceMargin = 15;
//! Internal margin for the custom template between the border and the text in pixels.
private static const scIntCustMargin = 5;
//! Margin top and bottom of the rectangles in pixels.
private static const scVertMargin = 5;
//! Size of the rounded rectangle corners in pixels.
private static const scRectRadius = 5;
//! Dynamically scale the width of the first column of text based on the
//! language selection for the word "Menu".
private var mTextWidth as Lang.Number = 0;
// Re-usable text items for drawing
private var mApp as HomeAssistantApp; private var mApp as HomeAssistantApp;
private var mTitle as WatchUi.Text or Null; private var mTitle as WatchUi.Text?;
private var mApiText as WatchUi.Text or Null; private var mApiText as WatchUi.Text?;
private var mApiStatus as WatchUi.Text or Null; private var mApiStatus as WatchUi.Text?;
private var mMenuText as WatchUi.Text or Null; private var mMenuText as WatchUi.Text?;
private var mMenuStatus as WatchUi.Text or Null; private var mMenuStatus as WatchUi.Text?;
private var mGlanceContent as WatchUi.TextArea?;
private var mAntiAlias as Lang.Boolean = false; private var mAntiAlias as Lang.Boolean = false;
//! Class Constructor
//
function initialize(app as HomeAssistantApp) { function initialize(app as HomeAssistantApp) {
GlanceView.initialize(); GlanceView.initialize();
mApp = app; mApp = app;
@@ -42,16 +62,21 @@ class HomeAssistantGlanceView extends WatchUi.GlanceView {
} }
} }
//! Construct the view.
//!
//! @param dc Device context
//
function onLayout(dc as Graphics.Dc) as Void { function onLayout(dc as Graphics.Dc) as Void {
var h = dc.getHeight(); var h = dc.getHeight();
var tw = dc.getTextWidthInPixels(WatchUi.loadResource($.Rez.Strings.GlanceMenu) as Lang.String, Graphics.FONT_XTINY);
mTextWidth = dc.getTextWidthInPixels(WatchUi.loadResource($.Rez.Strings.GlanceMenu) as Lang.String + ":", Graphics.FONT_XTINY);
mTitle = new WatchUi.Text({ mTitle = new WatchUi.Text({
:text => WatchUi.loadResource($.Rez.Strings.AppName) as Lang.String, :text => WatchUi.loadResource($.Rez.Strings.AppName) as Lang.String,
:color => Graphics.COLOR_WHITE, :color => Graphics.COLOR_WHITE,
:font => Graphics.FONT_TINY, :font => Graphics.FONT_TINY,
:justification => Graphics.TEXT_JUSTIFY_LEFT | Graphics.TEXT_JUSTIFY_VCENTER, :justification => Graphics.TEXT_JUSTIFY_LEFT | Graphics.TEXT_JUSTIFY_VCENTER,
:locX => scLeftMargin, :locX => scLeftRectMargin,
:locY => 1 * h / 6 :locY => 1 * h / 6
}); });
@@ -60,7 +85,7 @@ class HomeAssistantGlanceView extends WatchUi.GlanceView {
:color => Graphics.COLOR_WHITE, :color => Graphics.COLOR_WHITE,
:font => Graphics.FONT_XTINY, :font => Graphics.FONT_XTINY,
:justification => Graphics.TEXT_JUSTIFY_LEFT | Graphics.TEXT_JUSTIFY_VCENTER, :justification => Graphics.TEXT_JUSTIFY_LEFT | Graphics.TEXT_JUSTIFY_VCENTER,
:locX => scLeftMargin, :locX => scLeftRectMargin + scRectWidth + scRightRectMargin,
:locY => 3 * h / 6 :locY => 3 * h / 6
}); });
mApiStatus = new WatchUi.Text({ mApiStatus = new WatchUi.Text({
@@ -68,15 +93,16 @@ class HomeAssistantGlanceView extends WatchUi.GlanceView {
:color => Graphics.COLOR_WHITE, :color => Graphics.COLOR_WHITE,
:font => Graphics.FONT_XTINY, :font => Graphics.FONT_XTINY,
:justification => Graphics.TEXT_JUSTIFY_LEFT | Graphics.TEXT_JUSTIFY_VCENTER, :justification => Graphics.TEXT_JUSTIFY_LEFT | Graphics.TEXT_JUSTIFY_VCENTER,
:locX => scLeftMargin + scMidSep + tw, :locX => scLeftRectMargin + scRectWidth + scRightRectMargin + scMidSep + mTextWidth,
:locY => 3 * h / 6 :locY => 3 * h / 6
}); });
mMenuText = new WatchUi.Text({ mMenuText = new WatchUi.Text({
:text => WatchUi.loadResource($.Rez.Strings.GlanceMenu) as Lang.String + ":", :text => WatchUi.loadResource($.Rez.Strings.GlanceMenu) as Lang.String + ":",
:color => Graphics.COLOR_WHITE, :color => Graphics.COLOR_WHITE,
:font => Graphics.FONT_XTINY, :font => Graphics.FONT_XTINY,
:justification => Graphics.TEXT_JUSTIFY_LEFT | Graphics.TEXT_JUSTIFY_VCENTER, :justification => Graphics.TEXT_JUSTIFY_LEFT | Graphics.TEXT_JUSTIFY_VCENTER,
:locX => scLeftMargin, :locX => scLeftRectMargin + scRectWidth + scRightRectMargin,
:locY => 5 * h / 6 :locY => 5 * h / 6
}); });
mMenuStatus = new WatchUi.Text({ mMenuStatus = new WatchUi.Text({
@@ -84,14 +110,38 @@ class HomeAssistantGlanceView extends WatchUi.GlanceView {
:color => Graphics.COLOR_WHITE, :color => Graphics.COLOR_WHITE,
:font => Graphics.FONT_XTINY, :font => Graphics.FONT_XTINY,
:justification => Graphics.TEXT_JUSTIFY_LEFT | Graphics.TEXT_JUSTIFY_VCENTER, :justification => Graphics.TEXT_JUSTIFY_LEFT | Graphics.TEXT_JUSTIFY_VCENTER,
:locX => scLeftMargin + scMidSep + tw, :locX => scLeftRectMargin + scRectWidth + scRightRectMargin + scMidSep + mTextWidth,
:locY => 5 * h / 6 :locY => 5 * h / 6
}); });
mGlanceContent = new WatchUi.TextArea({
:text => "A longer piece of text to wrap.",
:color => Graphics.COLOR_WHITE,
:font => Graphics.FONT_XTINY,
:justification => Graphics.TEXT_JUSTIFY_LEFT | Graphics.TEXT_JUSTIFY_VCENTER,
:locX => scLeftRectMargin + scRectWidth + scRightRectMargin + scIntCustMargin,
:locY => (2 * h / 6) + scVertMargin,
:width => dc.getWidth() - scLeftRectMargin - scRectWidth - scRightRectMargin - (2 * scIntCustMargin) - scRightGlanceMargin,
:height => (4 * h / 6) - (2 * scVertMargin)
});
} }
//! Update the view with the latest status text.
//!
//! @param dc Device context
//
function onUpdate(dc as Graphics.Dc) as Void { function onUpdate(dc as Graphics.Dc) as Void {
var h = dc.getHeight();
var w = dc.getWidth() - scLeftRectMargin - scRightGlanceMargin;
var apiStatus = mApp.getApiStatus();
var menuStatus = mApp.getMenuStatus();
var glanceText = mApp.getGlanceText();
var apiCol;
var menuCol;
// System.println("HomeAssistantGlanceView onUpdate() glanceText=" + glanceText);
GlanceView.onUpdate(dc); GlanceView.onUpdate(dc);
if(mAntiAlias) { if (mAntiAlias) {
dc.setAntiAlias(true); dc.setAntiAlias(true);
} }
dc.setColor( dc.setColor(
@@ -99,12 +149,60 @@ class HomeAssistantGlanceView extends WatchUi.GlanceView {
Graphics.COLOR_TRANSPARENT Graphics.COLOR_TRANSPARENT
); );
dc.clear(); dc.clear();
mTitle.setColor(Graphics.COLOR_BLUE);
mTitle.draw(dc); mTitle.draw(dc);
if (apiStatus.equals(WatchUi.loadResource($.Rez.Strings.Checking))) {
apiCol = Graphics.COLOR_YELLOW;
} else if (apiStatus.equals(WatchUi.loadResource($.Rez.Strings.Available))) {
apiCol = Graphics.COLOR_GREEN;
} else {
apiCol = Graphics.COLOR_RED;
}
if (menuStatus.equals(WatchUi.loadResource($.Rez.Strings.Checking))) {
menuCol = Graphics.COLOR_YELLOW;
} else if (menuStatus.equals(WatchUi.loadResource($.Rez.Strings.Available))) {
menuCol = Graphics.COLOR_GREEN;
} else if (menuStatus.equals(WatchUi.loadResource($.Rez.Strings.Cached))) {
menuCol = Graphics.COLOR_GREEN;
} else {
menuCol = Graphics.COLOR_RED;
}
if (glanceText == null) {
// Default Glance View
mApiText.draw(dc); mApiText.draw(dc);
mApiStatus.setText(mApp.getApiStatus()); mApiStatus.setText(apiStatus);
mApiStatus.setColor(apiCol);
dc.setColor(apiCol, apiCol);
dc.drawRoundedRectangle(scLeftRectMargin, 2 * h / 6 + scVertMargin, w, 2 * h / 6 - (2 * scVertMargin), scRectRadius);
dc.fillRoundedRectangle(scLeftRectMargin, 2 * h / 6 + scVertMargin, scRectWidth, 2 * h / 6 - (2 * scVertMargin), scRectRadius);
mApiStatus.draw(dc); mApiStatus.draw(dc);
mMenuText.draw(dc); mMenuText.draw(dc);
mMenuStatus.setText(mApp.getMenuStatus()); mMenuStatus.setText(menuStatus);
mMenuStatus.setColor(menuCol);
dc.setColor(menuCol, menuCol);
dc.drawRoundedRectangle(scLeftRectMargin, 4 * h / 6 + scVertMargin, w, 2 * h / 6 - (2 * scVertMargin), scRectRadius);
dc.fillRoundedRectangle(scLeftRectMargin, 4 * h / 6 + scVertMargin, scRectWidth, 2 * h / 6 - (2 * scVertMargin), scRectRadius);
mMenuStatus.draw(dc); mMenuStatus.draw(dc);
} else {
// Customised Glance View
dc.setColor(Graphics.COLOR_BLUE, Graphics.COLOR_BLUE);
dc.drawRoundedRectangle(
scLeftRectMargin + scRectWidth + scRightRectMargin,
2 * h / 6 + scVertMargin,
w - scRectWidth - scRightRectMargin,
4 * h / 6 - (2 * scVertMargin),
scRectRadius
);
dc.setColor(apiCol, apiCol);
dc.fillRoundedRectangle(scLeftRectMargin, 2 * h / 6 + scVertMargin, scRectWidth, 2 * h / 6 - (2 * scVertMargin), scRectRadius);
dc.setColor(menuCol, menuCol);
dc.fillRoundedRectangle(scLeftRectMargin, 4 * h / 6 + scVertMargin, scRectWidth, 2 * h / 6 - (2 * scVertMargin), scRectRadius);
mGlanceContent.setText(glanceText);
mGlanceContent.draw(dc);
}
} }
} }

View File

@@ -11,27 +11,26 @@
// //
// P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 // P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023
// //
//
// Description:
//
// Menu button with an icon that opens a sub-menu, i.e. group, and optionally renders
// a Home Assistant Template.
//
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
using Toybox.Lang; using Toybox.Lang;
using Toybox.WatchUi; using Toybox.WatchUi;
//! Menu button with an icon that opens a sub-menu, i.e. group, and optionally renders
//! a Home Assistant Template.
//
class HomeAssistantGroupMenuItem extends HomeAssistantMenuItem { class HomeAssistantGroupMenuItem extends HomeAssistantMenuItem {
private var mMenu as HomeAssistantView; private var mMenu as HomeAssistantView;
//! Class Constructor
//
function initialize( function initialize(
definition as Lang.Dictionary, definition as Lang.Dictionary,
template as Lang.String, template as Lang.String,
icon as WatchUi.Drawable, icon as WatchUi.Drawable,
options as { options as {
:alignment as WatchUi.MenuItem.Alignment :alignment as WatchUi.MenuItem.Alignment
} or Null }?
) { ) {
if (options != null) { if (options != null) {
options.put(:icon, icon); options.put(:icon, icon);
@@ -48,6 +47,8 @@ class HomeAssistantGroupMenuItem extends HomeAssistantMenuItem {
mMenu = new HomeAssistantView(definition, null); mMenu = new HomeAssistantView(definition, null);
} }
//! Return the submenu for this group menu item.
//
function getMenuView() as HomeAssistantView { function getMenuView() as HomeAssistantView {
return mMenu; return mMenu;
} }

View File

@@ -11,47 +11,63 @@
// //
// P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023 // P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023
// //
//
// Description:
//
// Generic menu button with an icon that optionally renders a Home Assistant Template.
//
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
using Toybox.Lang; using Toybox.Lang;
using Toybox.WatchUi; using Toybox.WatchUi;
using Toybox.Graphics; using Toybox.Graphics;
//! Generic menu button with an icon that optionally renders a Home Assistant Template.
//
class HomeAssistantMenuItem extends WatchUi.IconMenuItem { class HomeAssistantMenuItem extends WatchUi.IconMenuItem {
private var mTemplate as Lang.String or Null; private var mTemplate as Lang.String?;
//! Class Constructor
//!
//! @param label Menu item label
//! @param template Menu item template
//! @param options Menu item options to be passed on.
//
function initialize( function initialize(
label as Lang.String or Lang.Symbol, label as Lang.String or Lang.Symbol,
template as Lang.String, template as Lang.String,
options as { options as {
:alignment as WatchUi.MenuItem.Alignment, :alignment as WatchUi.MenuItem.Alignment,
:icon as Graphics.BitmapType or WatchUi.Drawable or Lang.Symbol :icon as Graphics.BitmapType or WatchUi.Drawable or Lang.Symbol
} or Null }?
) { ) {
WatchUi.IconMenuItem.initialize( WatchUi.IconMenuItem.initialize(
label, label,
null, null,
null, null,
options.get(:icon), options[:icon],
options options
); );
mTemplate = template; mTemplate = template;
} }
//! Does this menu item use a template?
//!
//! @return True if the menu has a defined template else false.
//
function hasTemplate() as Lang.Boolean { function hasTemplate() as Lang.Boolean {
return mTemplate != null; return mTemplate != null;
} }
function buildTemplate() as Lang.String or Null { //! Return the menu item's template.
//!
//! @return A string with the menu item's template definition (or null).
//
function getTemplate() as Lang.String? {
return mTemplate; return mTemplate;
} }
function updateState(data as Lang.String or Lang.Dictionary or Null) as Void { //! Update the menu item's sub label to display the template rendered by Home Assistant.
//!
//! @param data The rendered template (typically a string) to be placed in the sub label. This may
//! unusually be a number if the SDK interprets the JSON returned by Home Assistant as such.
//
function updateState(data as Lang.String or Lang.Dictionary or Lang.Number or Lang.Float or Null) as Void {
if (data == null) { if (data == null) {
setSubLabel($.Rez.Strings.Empty); setSubLabel($.Rez.Strings.Empty);
} else if(data instanceof Lang.String) { } else if(data instanceof Lang.String) {

View File

@@ -11,17 +11,14 @@
// //
// P A Abbey & J D Abbey & Someone0nEarth, 17 November 2023 // P A Abbey & J D Abbey & Someone0nEarth, 17 November 2023
// //
//
// Description:
//
// MenuItems Factory.
//
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
using Toybox.Application; using Toybox.Application;
using Toybox.Lang; using Toybox.Lang;
using Toybox.WatchUi; using Toybox.WatchUi;
//! MenuItems Factory class.
//
class HomeAssistantMenuItemFactory { class HomeAssistantMenuItemFactory {
private var mMenuItemOptions as Lang.Dictionary; private var mMenuItemOptions as Lang.Dictionary;
private var mTapTypeIcon as WatchUi.Bitmap; private var mTapTypeIcon as WatchUi.Bitmap;
@@ -31,6 +28,8 @@ class HomeAssistantMenuItemFactory {
private static var instance; private static var instance;
//! Class Constructor
//
private function initialize() { private function initialize() {
mMenuItemOptions = { mMenuItemOptions = {
:alignment => Settings.getMenuAlignment() :alignment => Settings.getMenuAlignment()
@@ -57,6 +56,8 @@ class HomeAssistantMenuItemFactory {
mHomeAssistantService = new HomeAssistantService(); mHomeAssistantService = new HomeAssistantService();
} }
//! Create the one and only instance of this class.
//
static function create() as HomeAssistantMenuItemFactory { static function create() as HomeAssistantMenuItemFactory {
if (instance == null) { if (instance == null) {
instance = new HomeAssistantMenuItemFactory(); instance = new HomeAssistantMenuItemFactory();
@@ -64,69 +65,98 @@ class HomeAssistantMenuItemFactory {
return instance; return instance;
} }
//! Toggle menu item.
//!
//! @param label Menu item label.
//! @param entity_id Home Assistant Entity ID (optional)
//! @param template Template for Home Assistant to render (optional)
//! @param options Menu item options to be passed on, including both SDK and menu options, e.g. exit, confirm & pin.
//
function toggle( function toggle(
label as Lang.String or Lang.Symbol, label as Lang.String or Lang.Symbol,
entity_id as Lang.String or Null, entity_id as Lang.String?,
template as Lang.String or Null, template as Lang.String?,
confirm as Lang.Boolean, options as {
pin as Lang.Boolean :exit as Lang.Boolean,
:confirm as Lang.Boolean,
:pin as Lang.Boolean
}
) as WatchUi.MenuItem { ) as WatchUi.MenuItem {
var keys = mMenuItemOptions.keys();
for (var i = 0; i < keys.size(); i++) {
options.put(keys[i], mMenuItemOptions.get(keys[i]));
}
return new HomeAssistantToggleMenuItem( return new HomeAssistantToggleMenuItem(
label, label,
template, template,
confirm,
pin,
{ "entity_id" => entity_id }, { "entity_id" => entity_id },
mMenuItemOptions options
); );
} }
//! Tap menu item.
//!
//! @param label Menu item label.
//! @param entity_id Home Assistant Entity ID (optional)
//! @param template Template for Home Assistant to render (optional)
//! @param service Template for Home Assistant to render (optional)
//! @param data Sourced from the menu JSON, this is the `data` field from the `tap_action` field.
//! @param options Menu item options to be passed on, including both SDK and menu options, e.g. exit, confirm & pin.
//
function tap( function tap(
label as Lang.String or Lang.Symbol, label as Lang.String or Lang.Symbol,
entity as Lang.String or Null, entity_id as Lang.String?,
template as Lang.String or Null, template as Lang.String?,
service as Lang.String or Null, service as Lang.String?,
confirm as Lang.Boolean, data as Lang.Dictionary?,
pin as Lang.Boolean, options as {
data as Lang.Dictionary or Null :exit as Lang.Boolean,
) as WatchUi.MenuItem { :confirm as Lang.Boolean,
if (entity != null) { :pin as Lang.Boolean
if (data == null) {
data = { "entity_id" => entity };
} else {
data.put("entity_id", entity);
} }
) as WatchUi.MenuItem {
if (entity_id != null) {
if (data == null) {
data = { "entity_id" => entity_id };
} else {
data.put("entity_id", entity_id);
}
}
var keys = mMenuItemOptions.keys();
for (var i = 0; i < keys.size(); i++) {
options.put(keys[i], mMenuItemOptions.get(keys[i]));
} }
if (service != null) { if (service != null) {
options.put(:icon, mTapTypeIcon);
return new HomeAssistantTapMenuItem( return new HomeAssistantTapMenuItem(
label, label,
template, template,
service, service,
confirm,
pin,
data, data,
mTapTypeIcon, options,
mMenuItemOptions,
mHomeAssistantService mHomeAssistantService
); );
} else { } else {
options.put(:icon, mInfoTypeIcon);
return new HomeAssistantTapMenuItem( return new HomeAssistantTapMenuItem(
label, label,
template, template,
service, null,
confirm,
pin,
data, data,
mInfoTypeIcon, options,
mMenuItemOptions,
mHomeAssistantService mHomeAssistantService
); );
} }
} }
//! Group menu item.
//!
//! @param definition Items array from the JSON that defines this sub menu.
//! @param template Template for Home Assistant to render (optional)
//
function group( function group(
definition as Lang.Dictionary, definition as Lang.Dictionary,
template as Lang.String or Null template as Lang.String?
) as WatchUi.MenuItem { ) as WatchUi.MenuItem {
return new HomeAssistantGroupMenuItem( return new HomeAssistantGroupMenuItem(
definition, definition,

View File

@@ -9,27 +9,30 @@
// tested on a Venu 2 device. The source code is provided at: // tested on a Venu 2 device. The source code is provided at:
// https://github.com/house-of-abbey/GarminHomeAssistant. // https://github.com/house-of-abbey/GarminHomeAssistant.
// //
// P A Abbey & J D Abbey & Someone0nEarth & moesterheld, 31 October 2023 // P A Abbey & J D Abbey & Someone0nEarth & moesterheld & vincentezw, 31 October 2023
//
//
// Description:
//
// Pin Confirmation dialog and logic.
// //
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
import Toybox.Graphics; using Toybox.Graphics;
import Toybox.Lang; using Toybox.Lang;
import Toybox.WatchUi; using Toybox.WatchUi;
import Toybox.Timer; using Toybox.Timer;
import Toybox.Attention; using Toybox.Attention;
import Toybox.Time; using Toybox.Time;
//! Pin digit used for number 0..9
//
class PinDigit extends WatchUi.Selectable { class PinDigit extends WatchUi.Selectable {
private var mDigit as Number; private var mDigit as Lang.Number;
function initialize(digit as Number, stepX as Number, stepY as Number) { //! Class Constructor
//!
//! @param digit The digit this instance of the class represents and to display.
//! @param stepX Horizontal spacing.
//! @param stepY Vertical spacing.
//
function initialize(digit as Lang.Number, stepX as Lang.Number, stepY as Lang.Number) {
var marginX = stepX * 0.05; // 5% margin on all sides var marginX = stepX * 0.05; // 5% margin on all sides
var marginY = stepY * 0.05; var marginY = stepY * 0.05;
var x = (digit == 0) ? stepX : stepX * ((digit+2) % 3); // layout '0' in 2nd col, others ltr in 3 columns var x = (digit == 0) ? stepX : stepX * ((digit+2) % 3); // layout '0' in 2nd col, others ltr in 3 columns
@@ -42,7 +45,8 @@ class PinDigit extends WatchUi.Selectable {
var button = new PinDigitButton({ var button = new PinDigitButton({
:width => width, :width => width,
:height => height, :height => height,
:label => digit :label => digit,
:touched => false
}); });
var buttonTouched = new PinDigitButton({ var buttonTouched = new PinDigitButton({
@@ -63,24 +67,47 @@ class PinDigit extends WatchUi.Selectable {
}); });
mDigit = digit; mDigit = digit;
} }
function getDigit() as Number { //! Return the digit 0..9 represented by this button
//
function getDigit() as Lang.Number {
return mDigit; return mDigit;
} }
//! Customised drawing of a PIN digit's button.
//
class PinDigitButton extends WatchUi.Drawable { class PinDigitButton extends WatchUi.Drawable {
private var mText as Number; private var mText as Lang.Number;
private var mTouched as Boolean = false; private var mTouched as Lang.Boolean = false;
function initialize(options) { //! Class Constructor
//!
//! @param options See `Drawable.initialize()`, but with `:label` and `:touched` added.<br>
//! `{`<br>
//! &emsp; `:label as Lang.Number,` // The digit 0..9 to display<br>
//! &emsp; `:touched as Lang.Boolean,` // Should the digit be filled to indicate it has been pressed?<br>
//! &emsp; + those required by `Drawable.initialize()`<br>
//! ``}`
//
function initialize(
options as {
:width as Lang.Float,
:height as Lang.Float,
:label as Lang.Number,
:touched as Lang.Boolean
}
) {
Drawable.initialize(options); Drawable.initialize(options);
mText = options.get(:label); mText = options[:label];
mTouched = options.get(:touched); mTouched = options[:touched];
} }
function draw(dc) { //! Draw the PIN digit button.
//!
//! @param dc Device context
//
function draw(dc as Graphics.Dc) {
if (mTouched) { if (mTouched) {
dc.setColor(Graphics.COLOR_ORANGE, Graphics.COLOR_ORANGE); dc.setColor(Graphics.COLOR_ORANGE, Graphics.COLOR_ORANGE);
} else { } else {
@@ -98,17 +125,27 @@ class PinDigit extends WatchUi.Selectable {
} }
//! Pin Confirmation dialog and logic.
//
class HomeAssistantPinConfirmationView extends WatchUi.View { class HomeAssistantPinConfirmationView extends WatchUi.View {
static const MARGIN_X = 20; // margin on left & right side of screen (overall prettier and works better on round displays) //! Margin on left & right side of screen (overall prettier and works better on round displays)
static const MARGIN_X = 20;
var mPinMask as String = ""; //! Indicates how many digits have been entered so far.
var mPinMask as Lang.String = "";
//! Class Constructor
//
function initialize() { function initialize() {
View.initialize(); View.initialize();
} }
function onLayout(dc as Dc) as Void { //! Construct the view.
//!
//! @param dc Device context
//
function onLayout(dc as Graphics.Dc) as Void {
var stepX = (dc.getWidth() - MARGIN_X * 2) / 3; // three columns var stepX = (dc.getWidth() - MARGIN_X * 2) / 3; // three columns
var stepY = dc.getHeight() / 5; // five rows (first row for masked pin entry) var stepY = dc.getHeight() / 5; // five rows (first row for masked pin entry)
var digits = []; var digits = [];
@@ -119,7 +156,11 @@ class HomeAssistantPinConfirmationView extends WatchUi.View {
setLayout(digits); setLayout(digits);
} }
function onUpdate(dc as Dc) as Void { //! Update the view.
//!
//! @param dc Device context
//
function onUpdate(dc as Graphics.Dc) as Void {
View.onUpdate(dc); View.onUpdate(dc);
if (mPinMask.length() != 0) { if (mPinMask.length() != 0) {
dc.setColor(Graphics.COLOR_WHITE, Graphics.COLOR_BLACK); dc.setColor(Graphics.COLOR_WHITE, Graphics.COLOR_BLACK);
@@ -127,7 +168,11 @@ class HomeAssistantPinConfirmationView extends WatchUi.View {
} }
} }
function updatePinMask(length as Number) { //! Update the PIN mask displayed.
//!
//! @param length Number of `*` characters to use for the mask string.
//
function updatePinMask(length as Lang.Number) {
mPinMask = ""; mPinMask = "";
for (var i=0; i<length; i++) { for (var i=0; i<length; i++) {
mPinMask += "*"; mPinMask += "*";
@@ -138,17 +183,35 @@ class HomeAssistantPinConfirmationView extends WatchUi.View {
} }
//! Delegate for the HomeAssistantPinConfirmationView.
//
class HomeAssistantPinConfirmationDelegate extends WatchUi.BehaviorDelegate { class HomeAssistantPinConfirmationDelegate extends WatchUi.BehaviorDelegate {
private var mPin as String; private var mPin as Lang.String;
private var mEnteredPin as String; private var mEnteredPin as Lang.String;
private var mConfirmMethod as Method(state as Lang.Boolean) as Void; private var mConfirmMethod as Method(state as Lang.Boolean) as Void;
private var mTimer as Timer.Timer or Null; private var mTimer as Timer.Timer?;
private var mState as Lang.Boolean; private var mState as Lang.Boolean;
private var mFailures as PinFailures; private var mFailures as PinFailures;
private var mToggleMethod as Method(state as Lang.Boolean) as Void?;
private var mView as HomeAssistantPinConfirmationView; private var mView as HomeAssistantPinConfirmationView;
function initialize(callback as Method(state as Lang.Boolean) as Void, state as Lang.Boolean, pin as String, view as HomeAssistantPinConfirmationView) { //! Class Constructor
//!
//! @param options A dictionary describing the following options:
//! - callback Method to call on confirmation.
//! - pin PIN to be matched.
//! - state Wanted state of a toggle button.
//! - toggle Optional setEnabled method to untoggle ToggleItem.
//! - view PIN confirmation view.
//
function initialize(options as {
:callback as Method(state as Lang.Boolean) as Void,
:pin as Lang.String,
:state as Lang.Boolean,
:view as HomeAssistantPinConfirmationView,
:toggleMethod as (Method(state as Lang.Boolean) as Void)?,
}) {
BehaviorDelegate.initialize(); BehaviorDelegate.initialize();
mFailures = new PinFailures(); mFailures = new PinFailures();
if (mFailures.isLocked()) { if (mFailures.isLocked()) {
@@ -157,15 +220,22 @@ class HomeAssistantPinConfirmationDelegate extends WatchUi.BehaviorDelegate {
WatchUi.loadResource($.Rez.Strings.Seconds); WatchUi.loadResource($.Rez.Strings.Seconds);
WatchUi.showToast(msg, {}); WatchUi.showToast(msg, {});
} }
mPin = pin; mPin = options[:pin];
mEnteredPin = ""; mEnteredPin = "";
mConfirmMethod = callback; mConfirmMethod = options[:callback];
mState = state; mState = options[:state];
mView = view; mToggleMethod = options[:toggleMethod];
mView = options[:view];
resetTimer(); resetTimer();
} }
function onSelectable(event as SelectableEvent) as Boolean { //! Add another entered digit to the "PIN so far". When it is long enough verify the PIN is correct and the
//! invoke the supplied call back function.
//!
//! @param event The digit pressed by the user tapping the screen.
//
function onSelectable(event as WatchUi.SelectableEvent) as Lang.Boolean {
if (mFailures.isLocked()) { if (mFailures.isLocked()) {
goBack(); goBack();
} }
@@ -173,7 +243,7 @@ class HomeAssistantPinConfirmationDelegate extends WatchUi.BehaviorDelegate {
if (instance instanceof PinDigit && event.getPreviousState() == :stateSelected) { if (instance instanceof PinDigit && event.getPreviousState() == :stateSelected) {
mEnteredPin += instance.getDigit(); mEnteredPin += instance.getDigit();
createUserFeedback(); createUserFeedback();
// System.println("HomeAssitantPinConfirmationDelegate onSelectable() mEnteredPin = " + mEnteredPin); // System.println("HomeAssistantPinConfirmationDelegate onSelectable() mEnteredPin = " + mEnteredPin);
if (mEnteredPin.length() == mPin.length()) { if (mEnteredPin.length() == mPin.length()) {
if (mEnteredPin.equals(mPin)) { if (mEnteredPin.equals(mPin)) {
mFailures.reset(); mFailures.reset();
@@ -181,8 +251,13 @@ class HomeAssistantPinConfirmationDelegate extends WatchUi.BehaviorDelegate {
if (mTimer != null) { if (mTimer != null) {
mTimer.stop(); mTimer.stop();
} }
mConfirmMethod.invoke(mState);
WatchUi.popView(WatchUi.SLIDE_RIGHT); WatchUi.popView(WatchUi.SLIDE_RIGHT);
// Set the toggle, if we have one
if (mToggleMethod != null) {
mToggleMethod.invoke(!mState);
}
mConfirmMethod.invoke(mState);
} else { } else {
error(); error();
} }
@@ -193,6 +268,8 @@ class HomeAssistantPinConfirmationDelegate extends WatchUi.BehaviorDelegate {
return true; return true;
} }
//! Hepatic feedback.
//
function createUserFeedback() { function createUserFeedback() {
if (Attention has :vibrate && Settings.getVibrate()) { if (Attention has :vibrate && Settings.getVibrate()) {
Attention.vibrate([new Attention.VibeProfile(25, 25)]); Attention.vibrate([new Attention.VibeProfile(25, 25)]);
@@ -200,6 +277,9 @@ class HomeAssistantPinConfirmationDelegate extends WatchUi.BehaviorDelegate {
mView.updatePinMask(mEnteredPin.length()); mView.updatePinMask(mEnteredPin.length());
} }
//! A timer is used to clear the PIN entry view if digits are not pressed. So each time a digit is pressed the
//! timer is reset.
//
function resetTimer() { function resetTimer() {
var timeout = Settings.getConfirmTimeout(); // ms var timeout = Settings.getConfirmTimeout(); // ms
if (timeout > 0) { if (timeout > 0) {
@@ -212,25 +292,30 @@ class HomeAssistantPinConfirmationDelegate extends WatchUi.BehaviorDelegate {
} }
} }
//! Cancel PIN entry.
//
function goBack() as Void { function goBack() as Void {
if (mTimer != null) { if (mTimer != null) {
mTimer.stop(); mTimer.stop();
} }
WatchUi.popView(WatchUi.SLIDE_RIGHT); WatchUi.popView(WatchUi.SLIDE_RIGHT);
} }
//! Hepatic feedback for a wrong PIN and cancel entry.
//
function error() as Void { function error() as Void {
// System.println("HomeAssistantPinConfirmationDelegate error() Wrong PIN entered"); // System.println("HomeAssistantPinConfirmationDelegate error() Wrong PIN entered");
mFailures.addFailure(); mFailures.addFailure();
if (Attention has :vibrate && Settings.getVibrate()) { if (Attention has :vibrate && Settings.getVibrate()) {
Attention.vibrate([ Attention.vibrate([
new Attention.VibeProfile(100, 100), new Attention.VibeProfile(100, 100),
new Attention.VibeProfile(0, 200), new Attention.VibeProfile( 0, 200),
new Attention.VibeProfile(75, 100), new Attention.VibeProfile( 75, 100),
new Attention.VibeProfile(0, 200), new Attention.VibeProfile( 0, 200),
new Attention.VibeProfile(50, 100), new Attention.VibeProfile( 50, 100),
new Attention.VibeProfile(0, 200), new Attention.VibeProfile( 0, 200),
new Attention.VibeProfile(25, 100) new Attention.VibeProfile( 25, 100)
]); ]);
} }
if (WatchUi has :showToast) { if (WatchUi has :showToast) {
@@ -239,16 +324,28 @@ class HomeAssistantPinConfirmationDelegate extends WatchUi.BehaviorDelegate {
goBack(); goBack();
} }
//! Handle the back button (ESC)
//
function onBack() as Lang.Boolean {
goBack();
return true;
}
} }
//! Manage PIN entry failures to try and prevent brute force exhaustion by inserting delays in retries.
//
class PinFailures { class PinFailures {
const STORAGE_KEY_FAILURES as String = "pin_failures"; const STORAGE_KEY_FAILURES as Lang.String = "pin_failures";
const STORAGE_KEY_LOCKED as String = "pin_locked"; const STORAGE_KEY_LOCKED as Lang.String = "pin_locked";
private var mFailures as Array<Number>; private var mFailures as Lang.Array<Lang.Number>;
private var mLockedUntil as Number or Null; private var mLockedUntil as Lang.Number?;
//! Class Constructor
//
function initialize() { function initialize() {
// System.println("PinFailures initialize() Initializing PIN failures from storage"); // System.println("PinFailures initialize() Initializing PIN failures from storage");
var failures = Application.Storage.getValue(PinFailures.STORAGE_KEY_FAILURES); var failures = Application.Storage.getValue(PinFailures.STORAGE_KEY_FAILURES);
@@ -256,6 +353,8 @@ class PinFailures {
mLockedUntil = Application.Storage.getValue(PinFailures.STORAGE_KEY_LOCKED); mLockedUntil = Application.Storage.getValue(PinFailures.STORAGE_KEY_LOCKED);
} }
//! Record a PIN entry failure. If too many have occurred lock the application.
//
function addFailure() { function addFailure() {
mFailures.add(Time.now().value()); mFailures.add(Time.now().value());
// System.println("PinFailures addFailure() " + mFailures.size() + " PIN confirmation failures recorded"); // System.println("PinFailures addFailure() " + mFailures.size() + " PIN confirmation failures recorded");
@@ -268,7 +367,7 @@ class PinFailures {
mFailures = mFailures.slice(1, null); mFailures = mFailures.slice(1, null);
} else { } else {
mFailures = []; mFailures = [];
mLockedUntil = Time.now().add(new Time.Duration(Globals.scPinLockTimeMinutes * Gregorian.SECONDS_PER_MINUTE)).value(); mLockedUntil = Time.now().add(new Time.Duration(Globals.scPinLockTimeMinutes * Time.Gregorian.SECONDS_PER_MINUTE)).value();
Application.Storage.setValue(STORAGE_KEY_LOCKED, mLockedUntil); Application.Storage.setValue(STORAGE_KEY_LOCKED, mLockedUntil);
// System.println("PinFailures addFailure() Locked until " + mLockedUntil); // System.println("PinFailures addFailure() Locked until " + mLockedUntil);
} }
@@ -276,6 +375,9 @@ class PinFailures {
Application.Storage.setValue(STORAGE_KEY_FAILURES, mFailures); Application.Storage.setValue(STORAGE_KEY_FAILURES, mFailures);
} }
//! Clear the record of previous PIN entry failures, e.g. because the correct PIN has now been entered
//! within tolerance.
//
function reset() { function reset() {
// System.println("PinFailures reset() Resetting failures"); // System.println("PinFailures reset() Resetting failures");
mFailures = []; mFailures = [];
@@ -284,11 +386,18 @@ class PinFailures {
Application.Storage.deleteValue(STORAGE_KEY_LOCKED); Application.Storage.deleteValue(STORAGE_KEY_LOCKED);
} }
function getLockedUntilSeconds() as Number { //! Retrieve the remaining time the application must be locked out for.
//
function getLockedUntilSeconds() as Lang.Number {
return new Time.Moment(mLockedUntil).subtract(Time.now()).value(); return new Time.Moment(mLockedUntil).subtract(Time.now()).value();
} }
function isLocked() as Boolean { //! Is the application currently locked out? If the application is no longer locked out, then clear the
//! stored values used to determine this state.
//!
//! @return Boolean indicating if the application is currently locked out.
//
function isLocked() as Lang.Boolean {
if (mLockedUntil == null) { if (mLockedUntil == null) {
return false; return false;
} }

View File

@@ -9,12 +9,7 @@
// tested on a Venu 2 device. The source code is provided at: // tested on a Venu 2 device. The source code is provided at:
// https://github.com/house-of-abbey/GarminHomeAssistant. // https://github.com/house-of-abbey/GarminHomeAssistant.
// //
// P A Abbey & J D Abbey & Someone0nEarth, 19 November 2023 // P A Abbey & J D Abbey & Someone0nEarth & vincentezw, 19 November 2023
//
//
// Description:
//
// Calling a Home Assistant Service.
// //
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
@@ -23,27 +18,40 @@ using Toybox.WatchUi;
using Toybox.Graphics; using Toybox.Graphics;
using Toybox.Application.Properties; using Toybox.Application.Properties;
//! Calling a Home Assistant Service.
//
class HomeAssistantService { class HomeAssistantService {
private var mHasToast as Lang.Boolean = false; private var mHasToast as Lang.Boolean = false;
private var mHasVibrate as Lang.Boolean = false; private var mHasVibrate as Lang.Boolean = false;
//! Class Constructor
//
function initialize() { function initialize() {
if (WatchUi has :showToast) { mHasToast = WatchUi has :showToast;
mHasToast = true;
}
if (Attention has :vibrate) { if (Attention has :vibrate) {
mHasVibrate = true; mHasVibrate = true;
} }
} }
// Callback function after completing the POST request to call a service. //! Callback function after completing the POST request to call a service.
//!
//! @param responseCode Response code.
//! @param data Response data.
//! @param context An `entity_id` supplied in the GET request `options` `Lang.Dictionary` `context` field.
// //
function onReturnCall( function onReturnCall(
responseCode as Lang.Number, responseCode as Lang.Number,
data as Null or Lang.Dictionary or Lang.String, data as Null or Lang.Dictionary or Lang.String,
context as Lang.Object context as Lang.Object
) as Void { ) as Void {
var entity_id = context as Lang.String or Null; var c = context as Lang.Dictionary;
var entity_id;
var exit = false;
if (c != null) {
entity_id = c[:entity_id] as Lang.String;
exit = c[:exit] as Lang.Boolean;
}
// System.println("HomeAssistantService onReturnCall() Response Code: " + responseCode); // System.println("HomeAssistantService onReturnCall() Response Code: " + responseCode);
// System.println("HomeAssistantService onReturnCall() Response Data: " + data); // System.println("HomeAssistantService onReturnCall() Response Data: " + data);
@@ -92,13 +100,16 @@ class HomeAssistantService {
WatchUi.showToast(toast, null); WatchUi.showToast(toast, null);
} else { } else {
new Alert({ new Alert({
:timeout => Globals.scAlertTimeout, :timeout => Globals.scAlertTimeoutMs,
:font => Graphics.FONT_MEDIUM, :font => Graphics.FONT_MEDIUM,
:text => toast, :text => toast,
:fgcolor => Graphics.COLOR_WHITE, :fgcolor => Graphics.COLOR_WHITE,
:bgcolor => Graphics.COLOR_BLACK :bgcolor => Graphics.COLOR_BLACK
}).pushView(WatchUi.SLIDE_IMMEDIATE); }).pushView(WatchUi.SLIDE_IMMEDIATE);
} }
if (exit) {
System.exit();
}
break; break;
default: default:
@@ -107,14 +118,35 @@ class HomeAssistantService {
} }
} }
//! Invoke a service call for a menu item.
//!
//! @param service The Home Assistant service to be run, e.g. from the JSON `service` field.
//! @param data Data to be supplied to the service call.
//
function call( function call(
service as Lang.String, service as Lang.String,
data as Lang.Dictionary or Null data as Lang.Dictionary?,
exit as Lang.Boolean
) as Void { ) as Void {
if (! System.getDeviceSettings().phoneConnected) { var phoneConnected = System.getDeviceSettings().phoneConnected;
var internetAvailable = System.getDeviceSettings().connectionAvailable;
if (Settings.getWifiLteExecutionEnabled() && (! phoneConnected || ! internetAvailable)) {
var dialogMsg = WatchUi.loadResource($.Rez.Strings.WifiLtePrompt) as Lang.String;
var dialog = new WatchUi.Confirmation(dialogMsg);
WatchUi.pushView(
dialog,
new WifiLteExecutionConfirmDelegate({
:type => "service",
:service => service,
:data => data,
:exit => exit,
}, dialog),
WatchUi.SLIDE_LEFT
);
} else if (! phoneConnected) {
// System.println("HomeAssistantService call(): No Phone connection, skipping API call."); // System.println("HomeAssistantService call(): No Phone connection, skipping API call.");
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String); ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String);
} else if (! System.getDeviceSettings().connectionAvailable) { } else if (! internetAvailable) {
// System.println("HomeAssistantService call(): No Internet connection, skipping API call."); // System.println("HomeAssistantService call(): No Internet connection, skipping API call.");
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoInternet) as Lang.String); ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoInternet) as Lang.String);
} else { } else {
@@ -136,12 +168,15 @@ class HomeAssistantService {
data, // Includes {"entity_id": xxxx} data, // Includes {"entity_id": xxxx}
{ {
:method => Communications.HTTP_REQUEST_METHOD_POST, :method => Communications.HTTP_REQUEST_METHOD_POST,
:headers => { :headers => Settings.augmentHttpHeaders({
"Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON, "Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON,
"Authorization" => "Bearer " + Settings.getApiKey() "Authorization" => "Bearer " + Settings.getApiKey()
}, }),
:responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON, :responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON,
:context => entity_id :context => {
:entity_id => entity_id,
:exit => exit
}
}, },
method(:onReturnCall) method(:onReturnCall)
); );

View File

@@ -0,0 +1,139 @@
//-----------------------------------------------------------------------------------
//
// 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 & vincentezw, 22 July 2025
//
//-----------------------------------------------------------------------------------
using Toybox.Communications;
using Toybox.Lang;
//! SyncDelegate to execute single command via POST request to the Home Assistant
//! server.
//
class HomeAssistantSyncDelegate extends Communications.SyncDelegate {
//! Retain the last synchronisation error.
private static var syncError as Lang.String?;
//! Class Constructor
//
public function initialize() {
SyncDelegate.initialize();
}
//! Called by the system to determine if a synchronisation is needed
//
public function isSyncNeeded() as Lang.Boolean {
return true;
}
//! Called by the system when starting a bulk synchronisation.
//
public function onStartSync() as Void {
syncError = null;
if (WifiLteExecutionConfirmDelegate.mCommandData == null) {
syncError = WatchUi.loadResource($.Rez.Strings.WifiLteExecutionDataError) as Lang.String;
onStopSync();
return;
}
var type = WifiLteExecutionConfirmDelegate.mCommandData[:type];
var data = WifiLteExecutionConfirmDelegate.mCommandData[:data];
var url;
switch (type) {
case "service":
var service = WifiLteExecutionConfirmDelegate.mCommandData[:service];
url = Settings.getApiUrl() + "/services/" + service.substring(0, service.find(".")) + "/" + service.substring(service.find(".")+1, service.length());
var entity_id = "";
if (data != null) {
entity_id = data.get("entity_id");
if (entity_id == null) {
entity_id = "";
}
}
performRequest(url, data);
break;
case "entity":
url = WifiLteExecutionConfirmDelegate.mCommandData[:url];
performRequest(url, data);
break;
}
}
//! Performs a POST request to the Home Assistant server with a given payload and URL, and calls
//! haCallback.
//!
//! @param url URL for the API call.
//! @param data Data to be supplied to the API call.
//
private function performRequest(url as Lang.String, data as Lang.Dictionary?) {
Communications.makeWebRequest(
url,
data, // May include {"entity_id": xxxx} for service calls
{
:method => Communications.HTTP_REQUEST_METHOD_POST,
:headers => Settings.augmentHttpHeaders({
"Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON,
"Authorization" => "Bearer " + Settings.getApiKey()
}),
:responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON,
},
method(:haCallback)
);
}
//! Handle callback from request
//!
//! @param responseCode Response code.
//! @param data Response data.
//
public function haCallback(code as Lang.Number, data as Lang.Dictionary?) as Void {
Communications.notifySyncProgress(100);
if (code == 200) {
syncError = null;
if (WifiLteExecutionConfirmDelegate.mCommandData[:type].equals("entity")) {
var callbackMethod = WifiLteExecutionConfirmDelegate.mCommandData[:callback];
if (callbackMethod != null) {
var d = data as Lang.Array;
callbackMethod.invoke(d);
}
}
onStopSync();
return;
}
switch(code) {
case Communications.NETWORK_REQUEST_TIMED_OUT:
syncError = WatchUi.loadResource($.Rez.Strings.TimedOut) as Lang.String;
break;
case Communications.INVALID_HTTP_BODY_IN_NETWORK_RESPONSE:
syncError = WatchUi.loadResource($.Rez.Strings.NoJson) as Lang.String;
syncError = "";
default:
var codeMsg = WatchUi.loadResource($.Rez.Strings.UnhandledHttpErr) as Lang.String;
syncError = codeMsg + code;
break;
}
onStopSync();
}
//! Clean up
//
public function onStopSync() as Void {
if (WifiLteExecutionConfirmDelegate.mCommandData[:exit]) {
System.exit();
}
Communications.cancelAllRequests();
Communications.notifySyncComplete(syncError);
}
}

View File

@@ -9,12 +9,7 @@
// tested on a Venu 2 device. The source code is provided at: // tested on a Venu 2 device. The source code is provided at:
// https://github.com/house-of-abbey/GarminHomeAssistant. // https://github.com/house-of-abbey/GarminHomeAssistant.
// //
// P A Abbey & J D Abbey & Someone0nEarth & moesterheld, 31 October 2023 // P A Abbey & J D Abbey & Someone0nEarth & moesterheld & vincentezw, 31 October 2023
//
//
// Description:
//
// Menu button that triggers a service.
// //
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
@@ -22,46 +17,63 @@ using Toybox.Lang;
using Toybox.WatchUi; using Toybox.WatchUi;
using Toybox.Graphics; using Toybox.Graphics;
//! Menu button that triggers a service.
//
class HomeAssistantTapMenuItem extends HomeAssistantMenuItem { class HomeAssistantTapMenuItem extends HomeAssistantMenuItem {
private var mHomeAssistantService as HomeAssistantService; private var mHomeAssistantService as HomeAssistantService;
private var mService as Lang.String or Null; private var mService as Lang.String?;
private var mConfirm as Lang.Boolean; private var mConfirm as Lang.Boolean;
private var mExit as Lang.Boolean;
private var mPin as Lang.Boolean; private var mPin as Lang.Boolean;
private var mData as Lang.Dictionary or Null; private var mData as Lang.Dictionary?;
//! Class Constructor
//!
//! @param label Menu item label.
//! @param template Menu item template.
//! @param service Menu item service.
//! @param data Data to supply to the service call.
//! @param exit Should the service call complete and then exit?
//! @param confirm Should the service call be confirmed to avoid accidental invocation?
//! @param pin Should the service call be protected with a PIN for some low level of security?
//! @param icon Icon to use for the menu item.
//! @param options Menu item options to be passed on, including both SDK and menu options, e.g. exit, confirm & pin.
//! @param haService Shared Home Assistant service object that will perform the required call. Only
//! one of these objects is created for all menu items to re-use.
//
function initialize( function initialize(
label as Lang.String or Lang.Symbol, label as Lang.String or Lang.Symbol,
template as Lang.String, template as Lang.String,
service as Lang.String or Null, service as Lang.String?,
confirm as Lang.Boolean, data as Lang.Dictionary?,
pin as Lang.Boolean,
data as Lang.Dictionary or Null,
icon as Graphics.BitmapType or WatchUi.Drawable,
options as { options as {
:alignment as WatchUi.MenuItem.Alignment, :alignment as WatchUi.MenuItem.Alignment,
:icon as Graphics.BitmapType or WatchUi.Drawable or Lang.Symbol :icon as Graphics.BitmapType or WatchUi.Drawable or Lang.Symbol,
} or Null, :exit as Lang.Boolean,
:confirm as Lang.Boolean,
:pin as Lang.Boolean
}?,
haService as HomeAssistantService haService as HomeAssistantService
) { ) {
if (options != null) {
options.put(:icon, icon);
} else {
options = { :icon => icon };
}
HomeAssistantMenuItem.initialize( HomeAssistantMenuItem.initialize(
label, label,
template, template,
options {
:alignment => options[:alignment],
:icon => options[:icon]
}
); );
mHomeAssistantService = haService; mHomeAssistantService = haService;
mService = service; mService = service;
mConfirm = confirm;
mPin = pin;
mData = data; mData = data;
mExit = options[:exit];
mConfirm = options[:confirm];
mPin = options[:pin];
} }
//! Call a Home Assistant service only after checks have been done for confirmation or PIN entry.
//
function callService() as Void { function callService() as Void {
var hasTouchScreen = System.getDeviceSettings().isTouchScreen; var hasTouchScreen = System.getDeviceSettings().isTouchScreen;
if (mPin && hasTouchScreen) { if (mPin && hasTouchScreen) {
@@ -70,25 +82,55 @@ class HomeAssistantTapMenuItem extends HomeAssistantMenuItem {
var pinConfirmationView = new HomeAssistantPinConfirmationView(); var pinConfirmationView = new HomeAssistantPinConfirmationView();
WatchUi.pushView( WatchUi.pushView(
pinConfirmationView, pinConfirmationView,
new HomeAssistantPinConfirmationDelegate(method(:onConfirm), false, pin, pinConfirmationView), new HomeAssistantPinConfirmationDelegate({
:callback => method(:onConfirm),
:pin => pin,
:state => false,
:view => pinConfirmationView,
}),
WatchUi.SLIDE_IMMEDIATE WatchUi.SLIDE_IMMEDIATE
); );
} }
} else if (mConfirm) { } else if (mConfirm) {
var phoneConnected = System.getDeviceSettings().phoneConnected;
var internetAvailable = System.getDeviceSettings().connectionAvailable;
if ((! phoneConnected || ! internetAvailable) && Settings.getWifiLteExecutionEnabled()) {
var dialogMsg = WatchUi.loadResource($.Rez.Strings.WifiLtePrompt) as Lang.String;
var dialog = new WatchUi.Confirmation(dialogMsg);
WatchUi.pushView( WatchUi.pushView(
new HomeAssistantConfirmation(), dialog,
new HomeAssistantConfirmationDelegate(method(:onConfirm), false), new WifiLteExecutionConfirmDelegate({
:type => "service",
:service => mService,
:data => mData,
:exit => mExit,
}, dialog),
WatchUi.SLIDE_LEFT
);
} else {
var view = new HomeAssistantConfirmation();
WatchUi.pushView(
view,
new HomeAssistantConfirmationDelegate({
:callback => method(:onConfirm),
:confirmationView => view,
:state => false,
}),
WatchUi.SLIDE_IMMEDIATE WatchUi.SLIDE_IMMEDIATE
); );
}
} else { } else {
onConfirm(false); onConfirm(false);
} }
} }
// NB. Parameter 'b' is ignored //! Callback function after the menu items selection has been (optionally) confirmed.
//!
//! @param b Ignored. It is included in order to match the expected function prototype of the callback method.
//
function onConfirm(b as Lang.Boolean) as Void { function onConfirm(b as Lang.Boolean) as Void {
if (mService != null) { if (mService != null) {
mHomeAssistantService.call(mService, mData); mHomeAssistantService.call(mService, mData, mExit);
} }
} }

View File

@@ -9,12 +9,7 @@
// tested on a Venu 2 device. The source code is provided at: // tested on a Venu 2 device. The source code is provided at:
// https://github.com/house-of-abbey/GarminHomeAssistant. // https://github.com/house-of-abbey/GarminHomeAssistant.
// //
// P A Abbey & J D Abbey & Someone0nEarth & moesterheld, 31 October 2023 // P A Abbey & J D Abbey & Someone0nEarth & moesterheld & vincentezw, 31 October 2023
//
//
// Description:
//
// Light or switch toggle button that calls the API to maintain the up to date state.
// //
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
@@ -24,40 +19,57 @@ using Toybox.Graphics;
using Toybox.Application.Properties; using Toybox.Application.Properties;
using Toybox.Timer; using Toybox.Timer;
//! Light or switch toggle menu button that calls the API to maintain the up to date state.
//
class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem { class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem {
private var mConfirm as Lang.Boolean;
private var mPin as Lang.Boolean;
private var mData as Lang.Dictionary; private var mData as Lang.Dictionary;
private var mTemplate as Lang.String; private var mTemplate as Lang.String;
private var mExit as Lang.Boolean;
private var mConfirm as Lang.Boolean;
private var mPin as Lang.Boolean;
private var mHasVibrate as Lang.Boolean = false; private var mHasVibrate as Lang.Boolean = false;
//! Class Constructor
//!
//! @param label Menu item label.
//! @param template Menu item template.
//! @param data Data to supply to the service call.
//! @param options Menu item options to be passed on, including both SDK and menu options, e.g. exit, confirm & pin.
//
function initialize( function initialize(
label as Lang.String or Lang.Symbol, label as Lang.String or Lang.Symbol,
template as Lang.String, template as Lang.String,
confirm as Lang.Boolean, data as Lang.Dictionary?,
pin as Lang.Boolean,
data as Lang.Dictionary or Null,
options as { options as {
:alignment as WatchUi.MenuItem.Alignment, :alignment as WatchUi.MenuItem.Alignment,
:icon as Graphics.BitmapType or WatchUi.Drawable or Lang.Symbol :icon as Graphics.BitmapType or WatchUi.Drawable or Lang.Symbol,
} or Null :exit as Lang.Boolean,
:confirm as Lang.Boolean,
:pin as Lang.Boolean
}?
) { ) {
WatchUi.ToggleMenuItem.initialize( WatchUi.ToggleMenuItem.initialize(
label, label,
null, null,
null, null,
false, false,
options {
:alignment => options[:alignment],
:icon => options[:icon]
}
); );
if (Attention has :vibrate) { if (Attention has :vibrate) {
mHasVibrate = true; mHasVibrate = true;
} }
mConfirm = confirm;
mPin = pin;
mData = data; mData = data;
mTemplate = template; mTemplate = template;
mExit = options[:exit];
mConfirm = options[:confirm];
mPin = options[:pin];
} }
//! Set the state of a toggle menu item.
//
private function setUiToggle(state as Null or Lang.String) as Void { private function setUiToggle(state as Null or Lang.String) as Void {
if (state != null) { if (state != null) {
if (state.equals("on") && !isEnabled()) { if (state.equals("on") && !isEnabled()) {
@@ -68,14 +80,27 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem {
} }
} }
function buildTemplate() as Lang.String or Null { //! Return the menu item's template.
//!
//! @return A string with the menu item's template definition (or null).
//
function getTemplate() as Lang.String? {
return mTemplate; return mTemplate;
} }
function buildToggleTemplate() as Lang.String or Null {
//! Return a toggle menu item's state template.
//!
//! @return A string with the menu item's template definition (or null).
//
function getToggleTemplate() as Lang.String? {
return "{{states('" + mData.get("entity_id") + "')}}"; return "{{states('" + mData.get("entity_id") + "')}}";
} }
function updateState(data as Lang.String or Lang.Dictionary or Null) as Void { //! Update the menu item's label from a recent GET request.
//!
//! @param data This should be a string, but the way the GET response is parsed, it can also be a number.
//
function updateState(data as Lang.String or Lang.Dictionary or Lang.Number or Lang.Float or Null) as Void {
if (data == null) { if (data == null) {
setSubLabel(null); setSubLabel(null);
} else if(data instanceof Lang.String) { } else if(data instanceof Lang.String) {
@@ -100,6 +125,10 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem {
WatchUi.requestUpdate(); WatchUi.requestUpdate();
} }
//! Update the menu item's toggle state from a recent GET request.
//!
//! @param data This should be a string of either "on" or "off".
//
function updateToggleState(data as Lang.String or Lang.Dictionary or Null) as Void { function updateToggleState(data as Lang.String or Lang.Dictionary or Null) as Void {
if (data == null) { if (data == null) {
setUiToggle("off"); setUiToggle("off");
@@ -126,9 +155,15 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem {
WatchUi.requestUpdate(); WatchUi.requestUpdate();
} }
// Callback function after completing the POST request to set the status. //! Callback function after completing the POST request to set the status.
//!
//! @param responseCode Response code.
//! @param data Response data.
// //
function onReturnSetState(responseCode as Lang.Number, data as Null or Lang.Dictionary or Lang.String) as Void { function onReturnSetState(
responseCode as Lang.Number,
data as Null or Lang.Dictionary or Lang.String
) as Void {
// System.println("HomeAssistantToggleMenuItem onReturnSetState() Response Code: " + responseCode); // System.println("HomeAssistantToggleMenuItem onReturnSetState() Response Code: " + responseCode);
// System.println("HomeAssistantToggleMenuItem onReturnSetState() Response Data: " + data); // System.println("HomeAssistantToggleMenuItem onReturnSetState() Response Data: " + data);
@@ -163,16 +198,8 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem {
case 200: case 200:
// System.println("HomeAssistantToggleMenuItem onReturnSetState(): Service executed."); // System.println("HomeAssistantToggleMenuItem onReturnSetState(): Service executed.");
getApp().forceStatusUpdates(); getApp().forceStatusUpdates();
var state;
var d = data as Lang.Array; var d = data as Lang.Array;
for(var i = 0; i < d.size(); i++) { setToggleStateWithData(d);
if ((d[i].get("entity_id") as Lang.String).equals(mData.get("entity_id"))) {
state = d[i].get("state") as Lang.String;
// System.println((d[i].get("attributes") as Lang.Dictionary).get("friendly_name") + " State=" + state);
setUiToggle(state);
WatchUi.requestUpdate();
}
}
status = WatchUi.loadResource($.Rez.Strings.Available) as Lang.String; status = WatchUi.loadResource($.Rez.Strings.Available) as Lang.String;
break; break;
@@ -181,28 +208,59 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem {
ErrorView.show(WatchUi.loadResource($.Rez.Strings.UnhandledHttpErr) as Lang.String + responseCode); ErrorView.show(WatchUi.loadResource($.Rez.Strings.UnhandledHttpErr) as Lang.String + responseCode);
} }
getApp().setApiStatus(status); getApp().setApiStatus(status);
if (mExit) {
System.exit();
}
} }
function setState(s as Lang.Boolean) as Void { //! Handles the response from a Home Assistant service or state call and updates the toggle UI.
// Toggle the UI back, we'll wait for confirmation from the Home Assistant //!
//! @param data An array of dictionaries, each representing a Home Assistant entity state.
//
function setToggleStateWithData(data as Lang.Array) {
// If there's no response body, let's assume that what we did actually happened and flip the toggle.
if (data.size() == 0) {
setEnabled(!isEnabled()); setEnabled(!isEnabled());
if (! System.getDeviceSettings().phoneConnected) { }
else {
for(var i = 0; i < data.size(); i++) {
if ((data[i].get("entity_id") as Lang.String).equals(mData.get("entity_id"))) {
var state = data[i].get("state") as Lang.String;
// System.println((d[i].get("attributes") as Lang.Dictionary).get("friendly_name") + " State=" + state);
setUiToggle(state);
WatchUi.requestUpdate();
}
}
}
}
//! Set the state of the toggle menu item.
//!
//! @param s Boolean indicating the desired state of the toggle switch.
//
function setState(s as Lang.Boolean) as Void {
var phoneConnected = System.getDeviceSettings().phoneConnected;
var internetAvailable = System.getDeviceSettings().connectionAvailable;
if (! phoneConnected && ! Settings.getWifiLteExecutionEnabled()) {
// System.println("HomeAssistantToggleMenuItem getState(): No Phone connection, skipping API call."); // System.println("HomeAssistantToggleMenuItem getState(): No Phone connection, skipping API call.");
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String); ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String);
} else if (! System.getDeviceSettings().connectionAvailable) { } else if (! internetAvailable && ! Settings.getWifiLteExecutionEnabled()) {
// System.println("HomeAssistantToggleMenuItem getState(): No Internet connection, skipping API call."); // System.println("HomeAssistantToggleMenuItem getState(): No Internet connection, skipping API call.");
// Toggle the UI back // Toggle the UI back
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoInternet) as Lang.String); ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoInternet) as Lang.String);
} else { } else {
// Updated SDK and got a new error
// ERROR: venu: Cannot find symbol ':substring' on type 'PolyType<Null or $.Toybox.Lang.Object>'.
var id = mData.get("entity_id") as Lang.String; var id = mData.get("entity_id") as Lang.String;
var url = Settings.getApiUrl() + "/services/"; var url = getUrl(id, s);
if (s) {
url = url + id.substring(0, id.find(".")) + "/turn_on"; if ((! phoneConnected || ! internetAvailable) && Settings.getWifiLteExecutionEnabled()) {
} else { // Undo the toggle
url = url + id.substring(0, id.find(".")) + "/turn_off"; setEnabled(!isEnabled());
wifiPrompt(s);
return;
} }
// System.println("HomeAssistantToggleMenuItem setState() URL = " + url); // System.println("HomeAssistantToggleMenuItem setState() URL = " + url);
// System.println("HomeAssistantToggleMenuItem setState() entity_id = " + id); // System.println("HomeAssistantToggleMenuItem setState() entity_id = " + id);
Communications.makeWebRequest( Communications.makeWebRequest(
@@ -210,10 +268,10 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem {
mData, mData,
{ {
:method => Communications.HTTP_REQUEST_METHOD_POST, :method => Communications.HTTP_REQUEST_METHOD_POST,
:headers => { :headers => Settings.augmentHttpHeaders({
"Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON, "Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON,
"Authorization" => "Bearer " + Settings.getApiKey() "Authorization" => "Bearer " + Settings.getApiKey()
}, }),
:responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON :responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON
}, },
method(:onReturnSetState) method(:onReturnSetState)
@@ -228,31 +286,101 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem {
} }
} }
//! Call a Home Assistant service only after checks have been done for confirmation or PIN entry.
//
function callService(b as Lang.Boolean) as Void { function callService(b as Lang.Boolean) as Void {
var hasTouchScreen = System.getDeviceSettings().isTouchScreen; var hasTouchScreen = System.getDeviceSettings().isTouchScreen;
if (mPin && hasTouchScreen) { if (mPin && hasTouchScreen) {
// Undo the toggle
setEnabled(!isEnabled());
var pin = Settings.getPin(); var pin = Settings.getPin();
if (pin != null) { if (pin != null) {
var pinConfirmationView = new HomeAssistantPinConfirmationView(); var pinConfirmationView = new HomeAssistantPinConfirmationView();
WatchUi.pushView( WatchUi.pushView(
pinConfirmationView, pinConfirmationView,
new HomeAssistantPinConfirmationDelegate(method(:onConfirm), b, pin, pinConfirmationView), new HomeAssistantPinConfirmationDelegate({
:callback => method(:onConfirm),
:pin => pin,
:state => b,
:toggleMethod => method(:setEnabled),
:view => pinConfirmationView,
}),
WatchUi.SLIDE_IMMEDIATE WatchUi.SLIDE_IMMEDIATE
); );
} }
} else if (mConfirm) { } else if (mConfirm) {
// Undo the toggle
setEnabled(!isEnabled());
var phoneConnected = System.getDeviceSettings().phoneConnected;
var internetAvailable = System.getDeviceSettings().connectionAvailable;
if ((! phoneConnected || ! internetAvailable) && Settings.getWifiLteExecutionEnabled()) {
wifiPrompt(b);
} else {
var confirmationView = new HomeAssistantConfirmation();
WatchUi.pushView( WatchUi.pushView(
new HomeAssistantConfirmation(), confirmationView,
new HomeAssistantConfirmationDelegate(method(:onConfirm), b), new HomeAssistantConfirmationDelegate({
:callback => method(:onConfirm),
:confirmationView => confirmationView,
:state => b,
:toggleMethod => method(:setEnabled),
}),
WatchUi.SLIDE_IMMEDIATE WatchUi.SLIDE_IMMEDIATE
); );
}
} else { } else {
onConfirm(b); onConfirm(b);
} }
} }
//! Callback function to toggle state of this item after (optional) confirmation.
//!
//! @param b Desired toggle button state.
//
function onConfirm(b as Lang.Boolean) as Void { function onConfirm(b as Lang.Boolean) as Void {
setState(b); setState(b);
} }
//! Displays a confirmation dialog before executing a service call via Wi-Fi/LTE.
//!
//! @param s Desired state: `true` to turn on, `false` to turn off.
//
private function wifiPrompt(s as Lang.Boolean) as Void {
var id = mData.get("entity_id") as Lang.String;
var url = getUrl(id, s);
var dialogMsg = WatchUi.loadResource($.Rez.Strings.WifiLtePrompt) as Lang.String;
var dialog = new WatchUi.Confirmation(dialogMsg);
WatchUi.pushView(
dialog,
new WifiLteExecutionConfirmDelegate({
:type => "entity",
:url => url,
:id => id,
:data => mData,
:callback => method(:setToggleStateWithData),
:exit => mExit,
}, dialog),
WatchUi.SLIDE_LEFT
);
}
//! Constructs a Home Assistant API URL for the given entity and desired state.
//!
//! @param id The entity ID, e.g., `"switch.kitchen"`.
//! @param s Desired state: `true` for "turn_on", `false` for "turn_off".
//!
//! @return Full service URL string.
//
private static function getUrl(id as Lang.String, s as Lang.Boolean) as Lang.String {
var url = Settings.getApiUrl() + "/services/";
if (s) {
url = url + id.substring(0, id.find(".")) + "/turn_on";
} else {
url = url + id.substring(0, id.find(".")) + "/turn_off";
}
return url;
}
} }

View File

@@ -11,11 +11,6 @@
// //
// P A Abbey & J D Abbey & Someone0nEarth & moesterheld, 31 October 2023 // P A Abbey & J D Abbey & Someone0nEarth & moesterheld, 31 October 2023
// //
//
// Description:
//
// Home Assistant menu construction.
//
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
using Toybox.Application; using Toybox.Application;
@@ -24,14 +19,18 @@ using Toybox.Graphics;
using Toybox.System; using Toybox.System;
using Toybox.WatchUi; using Toybox.WatchUi;
//! Home Assistant menu construction.
//
class HomeAssistantView extends WatchUi.Menu2 { class HomeAssistantView extends WatchUi.Menu2 {
//! Class Constructor
//
function initialize( function initialize(
definition as Lang.Dictionary, definition as Lang.Dictionary,
options as { options as {
:focus as Lang.Number, :focus as Lang.Number,
:icon as Graphics.BitmapType or WatchUi.Drawable or Lang.Symbol :icon as Graphics.BitmapType or WatchUi.Drawable or Lang.Symbol
} or Null }?
) { ) {
if (options == null) { if (options == null) {
options = { :title => definition.get("title") as Lang.String }; options = { :title => definition.get("title") as Lang.String };
@@ -43,30 +42,104 @@ class HomeAssistantView extends WatchUi.Menu2 {
var items = definition.get("items") as Lang.Array<Lang.Dictionary>; var items = definition.get("items") as Lang.Array<Lang.Dictionary>;
for (var i = 0; i < items.size(); i++) { for (var i = 0; i < items.size(); i++) {
if (items[i] instanceof(Lang.Dictionary)) { if (items[i] instanceof(Lang.Dictionary)) {
var type = items[i].get("type") as Lang.String or Null; var type = items[i].get("type") as Lang.String?;
var name = items[i].get("name") as Lang.String or Null; var name = items[i].get("name") as Lang.String?;
var content = items[i].get("content") as Lang.String or Null; var content = items[i].get("content") as Lang.String?;
var entity = items[i].get("entity") as Lang.String or Null; var entity = items[i].get("entity") as Lang.String?;
var tap_action = items[i].get("tap_action") as Lang.Dictionary or Null; var tap_action = items[i].get("tap_action") as Lang.Dictionary?;
var service = items[i].get("service") as Lang.String or Null; // Deprecated schema var service = items[i].get("service") as Lang.String?; // Deprecated schema
var confirm = false as Lang.Boolean or Null; var confirm = false as Lang.Boolean?;
var pin = false as Lang.Boolean or Null; var pin = false as Lang.Boolean?;
var data = null as Lang.Dictionary or Null; var data = null as Lang.Dictionary?;
var enabled = true as Lang.Boolean?;
var exit = false as Lang.Boolean?;
if (items[i].get("enabled") != null) {
enabled = items[i].get("enabled"); // Optional
}
if (items[i].get("exit") != null) {
exit = items[i].get("exit"); // Optional
}
if (tap_action != null) { if (tap_action != null) {
service = tap_action.get("service"); service = tap_action.get("service");
confirm = tap_action.get("confirm"); // Optional
pin = tap_action.get("pin"); // Optional
data = tap_action.get("data"); // Optional data = tap_action.get("data"); // Optional
if (confirm == null) { if (tap_action.get("confirm") != null) {
confirm = false; confirm = tap_action.get("confirm"); // Optional
}
if (tap_action.get("pin") != null) {
pin = tap_action.get("pin"); // Optional
} }
} }
if (type != null && name != null) { if (type != null && name != null && enabled) {
if (type.equals("toggle") && entity != null) { if (type.equals("toggle") && entity != null) {
addItem(HomeAssistantMenuItemFactory.create().toggle(name, entity, content, confirm, pin)); addItem(HomeAssistantMenuItemFactory.create().toggle(
} else if ((type.equals("tap") && service != null) || (type.equals("info") && content != null) || (type.equals("template") && content != null)) { name,
entity,
content,
{
:exit => exit,
:confirm => confirm,
:pin => pin
}
));
} else if (type.equals("tap") && service != null) {
addItem(HomeAssistantMenuItemFactory.create().tap(
name,
entity,
content,
service,
data,
{
:exit => exit,
:confirm => confirm,
:pin => pin
}
));
} else if (type.equals("template") && content != null) {
// NB. "template" is deprecated in the schema and remains only for backward compatibility. All menu items can now use templates, so the replacement is "info". // NB. "template" is deprecated in the schema and remains only for backward compatibility. All menu items can now use templates, so the replacement is "info".
addItem(HomeAssistantMenuItemFactory.create().tap(name, entity, content, service, confirm, pin, data)); // The exit option is dependent on the type of template.
if (tap_action == null) {
// No exit from an information only item
addItem(HomeAssistantMenuItemFactory.create().tap(
name,
entity,
content,
service,
data,
{
:exit => false,
:confirm => confirm,
:pin => pin
}
));
} else {
// You may exit from template item with a 'tap_action'.
addItem(HomeAssistantMenuItemFactory.create().tap(
name,
entity,
content,
service,
data,
{
:exit => exit,
:confirm => confirm,
:pin => pin
}
));
}
} else if (type.equals("info") && content != null) {
// Cannot exit from a non-actionable information only menu item.
addItem(HomeAssistantMenuItemFactory.create().tap(
name,
entity,
content,
service,
data,
{
:exit => false,
:confirm => confirm,
:pin => pin
}
));
} else if (type.equals("group")) { } else if (type.equals("group")) {
addItem(HomeAssistantMenuItemFactory.create().group(items[i], content)); addItem(HomeAssistantMenuItemFactory.create().group(items[i], content));
} }
@@ -75,7 +148,12 @@ class HomeAssistantView extends WatchUi.Menu2 {
} }
} }
// Lang.Array.addAll() fails structural type checking without including "Null" in the return type //! Return a list of items that need to be updated within this menu structure.
//!
//! MN. Lang.Array.addAll() fails structural type checking without including "Null" in the return type
//!
//! @return An array of menu items that need to be updated periodically to reflect the latest Home Assistant state.
//
function getItemsToUpdate() as Lang.Array<HomeAssistantToggleMenuItem or HomeAssistantTapMenuItem or HomeAssistantGroupMenuItem or Null> { function getItemsToUpdate() as Lang.Array<HomeAssistantToggleMenuItem or HomeAssistantTapMenuItem or HomeAssistantGroupMenuItem or Null> {
var fullList = []; var fullList = [];
var lmi = mItems as Lang.Array<WatchUi.MenuItem>; var lmi = mItems as Lang.Array<WatchUi.MenuItem>;
@@ -102,26 +180,35 @@ class HomeAssistantView extends WatchUi.Menu2 {
return fullList; return fullList;
} }
// Called when this View is brought to the foreground. Restore //! Called when this View is brought to the foreground. Restore
// the state of this View and prepare it to be shown. This includes //! the state of this View and prepare it to be shown. This includes
// loading resources into memory. //! loading resources into memory.
function onShow() as Void {} function onShow() as Void {}
} }
// //! Delegate for the HomeAssistantView.
// Reference: https://developer.garmin.com/connect-iq/core-topics/input-handling/ //!
//! Reference: https://developer.garmin.com/connect-iq/core-topics/input-handling/
// //
class HomeAssistantViewDelegate extends WatchUi.Menu2InputDelegate { class HomeAssistantViewDelegate extends WatchUi.Menu2InputDelegate {
private var mIsRootMenuView as Lang.Boolean = false; private var mIsRootMenuView as Lang.Boolean = false;
private var mTimer as QuitTimer; private var mTimer as QuitTimer;
//! Class Constructor
//!
//! @param isRootMenuView As menus can be nested, this state marks the top level menu so that the
//! back event can exit the application completely rather than just popping
//! a menu view.
//
function initialize(isRootMenuView as Lang.Boolean) { function initialize(isRootMenuView as Lang.Boolean) {
Menu2InputDelegate.initialize(); Menu2InputDelegate.initialize();
mIsRootMenuView = isRootMenuView; mIsRootMenuView = isRootMenuView;
mTimer = getApp().getQuitTimer(); mTimer = getApp().getQuitTimer();
} }
//! Handle the back button (ESC)
//
function onBack() { function onBack() {
mTimer.reset(); mTimer.reset();
@@ -135,16 +222,22 @@ class HomeAssistantViewDelegate extends WatchUi.Menu2InputDelegate {
WatchUi.popView(WatchUi.SLIDE_RIGHT); WatchUi.popView(WatchUi.SLIDE_RIGHT);
} }
// Only for CheckboxMenu //! Only for CheckboxMenu
//
function onDone() { function onDone() {
mTimer.reset(); mTimer.reset();
} }
// Only for CustomMenu //! Only for CustomMenu
//
function onFooter() { function onFooter() {
mTimer.reset(); mTimer.reset();
} }
//! Select event
//!
//! @param item Selected menu item.
//
function onSelect(item as WatchUi.MenuItem) as Void { function onSelect(item as WatchUi.MenuItem) as Void {
mTimer.reset(); mTimer.reset();
if (item instanceof HomeAssistantToggleMenuItem) { if (item instanceof HomeAssistantToggleMenuItem) {
@@ -164,7 +257,8 @@ class HomeAssistantViewDelegate extends WatchUi.Menu2InputDelegate {
} }
} }
// Only for CustomMenu //! Only for CustomMenu
//
function onTitle() { function onTitle() {
mTimer.reset(); mTimer.reset();
} }

View File

@@ -11,11 +11,6 @@
// //
// J D Abbey & P A Abbey, 28 December 2022 // J D Abbey & P A Abbey, 28 December 2022
// //
//
// Description:
//
// Quit the application after a period of inactivity in order to save the battery.
//
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
using Toybox.Lang; using Toybox.Lang;
@@ -23,18 +18,27 @@ using Toybox.Timer;
using Toybox.Application.Properties; using Toybox.Application.Properties;
using Toybox.WatchUi; using Toybox.WatchUi;
//! Quit the application after a period of inactivity in order to save the battery.
//!
class QuitTimer extends Timer.Timer { class QuitTimer extends Timer.Timer {
//! Class Constructor
//
function initialize() { function initialize() {
Timer.Timer.initialize(); Timer.Timer.initialize();
} }
//! Can't see how to make a method object from `System.exit()` without this layer of
//! indirection. I assume this is because `System` is a static class.
//
function exitApp() as Void { function exitApp() as Void {
// System.println("QuitTimer exitApp(): Exiting"); // System.println("QuitTimer exitApp(): Exiting");
// This will exit the system cleanly from any point within an app. // This will exit the system cleanly from any point within an app.
System.exit(); System.exit();
} }
//! Kick off the quit timer.
//
function begin() { function begin() {
var api_timeout = Settings.getAppTimeout(); // ms var api_timeout = Settings.getAppTimeout(); // ms
if (api_timeout > 0) { if (api_timeout > 0) {
@@ -42,6 +46,8 @@ class QuitTimer extends Timer.Timer {
} }
} }
//! Reset the quit timer.
//
function reset() { function reset() {
// System.println("QuitTimer reset(): Restarted quit timer"); // System.println("QuitTimer reset(): Restarted quit timer");
stop(); stop();

View File

@@ -11,35 +11,36 @@
// //
// J D Abbey & P A Abbey, 28 December 2022 // J D Abbey & P A Abbey, 28 December 2022
// //
//
// Description:
//
// A view with added methods to scale from percentages of scrren size to pixels.
//
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
using Toybox.Lang; using Toybox.Lang;
using Toybox.WatchUi; using Toybox.WatchUi;
using Toybox.Math; using Toybox.Math;
//! A view that provides a common method 'pixelsForScreen' to make Views easier to layout on different
//! sized watch screens.
//
class ScalableView extends WatchUi.View { class ScalableView extends WatchUi.View {
//! Retain the local screen width for efficiency
private var mScreenWidth; private var mScreenWidth;
//! Class Constructor
//
function initialize() { function initialize() {
View.initialize(); View.initialize();
mScreenWidth = System.getDeviceSettings().screenWidth; mScreenWidth = System.getDeviceSettings().screenWidth;
} }
// Convert a fraction expressed as a percentage (%) to a number of pixels for the //! Convert a fraction expressed as a percentage (%) to a number of pixels for the
// screen's dimensions. //! screen's dimensions.
// //!
// Parameters: //! Uses screen width rather than screen height as rectangular screens tend to have
// * dc - Device context //! height > width.
// * pc - Percentage (%) expressed as a number in the range 0.0..100.0 //!
// //! @param pc Percentage (%) expressed as a number in the range 0.0..100.0
// Uses screen width rather than screen height as rectangular screens tend to have //!
// height > width. //! @return Number of pixels for the screen's dimensions for a fraction expressed as a percentage (%).
// //!
function pixelsForScreen(pc as Lang.Float) as Lang.Number { function pixelsForScreen(pc as Lang.Float) as Lang.Number {
return Math.round(pc * mScreenWidth) / 100; return Math.round(pc * mScreenWidth) / 100;
} }

View File

@@ -9,28 +9,24 @@
// tested on a Venu 2 device. The source code is provided at: // tested on a Venu 2 device. The source code is provided at:
// https://github.com/house-of-abbey/GarminHomeAssistant. // https://github.com/house-of-abbey/GarminHomeAssistant.
// //
// P A Abbey & J D Abbey, SomeoneOnEarth & moesterheld, 23 November 2023 // P A Abbey & J D Abbey, SomeoneOnEarth & moesterheld & vincentezw, 23 November 2023
//
//
// Description:
//
// Home Assistant settings.
//
// WARNING!
//
// Careful putting ErrorView.show() calls in here. They need to be guarded so that
// they do not get called when only displaying the glance view.
// //
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
using Toybox.Lang; using Toybox.Lang;
using Toybox.Application.Properties; using Toybox.Application.Properties;
using Toybox.Application.Storage;
using Toybox.WatchUi; using Toybox.WatchUi;
using Toybox.System; using Toybox.System;
// Battery Level Reporting // Battery Level Reporting
using Toybox.Background; using Toybox.Background;
using Toybox.Time; using Toybox.Time;
//! Home Assistant settings.
//!
//! <em>WARNING!</em> Careful putting ErrorView.show() calls in here. They need to be
//! guarded so that they do not get called when only displaying the glance view.
//
(:glance, :background) (:glance, :background)
class Settings { class Settings {
private static var mApiKey as Lang.String = ""; private static var mApiKey as Lang.String = "";
@@ -40,19 +36,30 @@ class Settings {
private static var mCacheConfig as Lang.Boolean = false; private static var mCacheConfig as Lang.Boolean = false;
private static var mClearCache as Lang.Boolean = false; private static var mClearCache as Lang.Boolean = false;
private static var mVibrate as Lang.Boolean = false; private static var mVibrate as Lang.Boolean = false;
private static var mAppTimeout as Lang.Number = 0; // seconds private static var mWifiLteExecution as Lang.Boolean = false;
private static var mPollDelay as Lang.Number = 0; // seconds //! seconds
private static var mConfirmTimeout as Lang.Number = 3; // seconds private static var mAppTimeout as Lang.Number = 0;
private static var mPin as Lang.String or Null = "0000"; //! seconds
private static var mPollDelay as Lang.Number = 0;
//! seconds
private static var mConfirmTimeout as Lang.Number = 3;
private static var mPin as Lang.String? = "0000";
private static var mMenuAlignment as Lang.Number = WatchUi.MenuItem.MENU_ITEM_LABEL_ALIGN_LEFT; private static var mMenuAlignment as Lang.Number = WatchUi.MenuItem.MENU_ITEM_LABEL_ALIGN_LEFT;
private static var mIsSensorsLevelEnabled as Lang.Boolean = false; private static var mIsSensorsEnabled as Lang.Boolean = false;
private static var mBatteryRefreshRate as Lang.Number = 15; // minutes //! minutes
private static var mBatteryRefreshRate as Lang.Number = 15;
//! Additional user configurable HTTP header key
private static var mUserHeaderName as Lang.String? = null;
//! Additional user configurable HTTP header value
private static var mUserHeaderValue as Lang.String? = null;
private static var mClearWebhookId as Lang.Boolean = false;
private static var mIsApp as Lang.Boolean = false; private static var mIsApp as Lang.Boolean = false;
private static var mHasService as Lang.Boolean = false; private static var mHasService as Lang.Boolean = false;
// Must keep the object so it doesn't get garbage collected. //! Must keep the object so it doesn't get garbage collected.
private static var mWebhookManager as WebhookManager or Null; private static var mWebhookManager as WebhookManager?;
// Called on application start and then whenever the settings are changed. //! Called on application start and then whenever the settings are changed.
//
static function update() { static function update() {
mIsApp = getApp().getIsApp(); mIsApp = getApp().getIsApp();
mApiKey = Properties.getValue("api_key"); mApiKey = Properties.getValue("api_key");
@@ -61,16 +68,22 @@ class Settings {
mConfigUrl = Properties.getValue("config_url"); mConfigUrl = Properties.getValue("config_url");
mCacheConfig = Properties.getValue("cache_config"); mCacheConfig = Properties.getValue("cache_config");
mClearCache = Properties.getValue("clear_cache"); mClearCache = Properties.getValue("clear_cache");
mWifiLteExecution = Properties.getValue("wifi_lte_execution");
mVibrate = Properties.getValue("enable_vibration"); mVibrate = Properties.getValue("enable_vibration");
mAppTimeout = Properties.getValue("app_timeout"); mAppTimeout = Properties.getValue("app_timeout");
mPollDelay = Properties.getValue("poll_delay_combined"); mPollDelay = Properties.getValue("poll_delay_combined");
mConfirmTimeout = Properties.getValue("confirm_timeout"); mConfirmTimeout = Properties.getValue("confirm_timeout");
mPin = validatePin(); mPin = validatePin();
mMenuAlignment = Properties.getValue("menu_alignment"); mMenuAlignment = Properties.getValue("menu_alignment");
mIsSensorsLevelEnabled = Properties.getValue("enable_battery_level"); mIsSensorsEnabled = Properties.getValue("enable_battery_level");
mBatteryRefreshRate = Properties.getValue("battery_level_refresh_rate"); mBatteryRefreshRate = Properties.getValue("battery_level_refresh_rate");
mUserHeaderName = Properties.getValue("user_http_header_name");
mUserHeaderValue = Properties.getValue("user_http_header_value");
mClearWebhookId = Properties.getValue("clear_webhook_id");
} }
//! A webhook is required for non-privileged API calls.
//
static function webhook() { static function webhook() {
if (System has :ServiceDelegate) { if (System has :ServiceDelegate) {
mHasService = true; mHasService = true;
@@ -80,6 +93,9 @@ class Settings {
if (mIsApp) { if (mIsApp) {
if (mHasService) { if (mHasService) {
if (System.getDeviceSettings().phoneConnected) { if (System.getDeviceSettings().phoneConnected) {
if (getClearWebhookId()) {
clearWebhookId();
}
mWebhookManager = new WebhookManager(); mWebhookManager = new WebhookManager();
if (getWebhookId().equals("")) { if (getWebhookId().equals("")) {
// System.println("Settings update(): Doing full webhook & sensor creation."); // System.println("Settings update(): Doing full webhook & sensor creation.");
@@ -87,9 +103,13 @@ class Settings {
} else { } else {
// System.println("Settings update(): Doing just sensor creation."); // System.println("Settings update(): Doing just sensor creation.");
// We already have a Webhook ID, so just enable or disable the sensor in Home Assistant. // We already have a Webhook ID, so just enable or disable the sensor in Home Assistant.
// Storage.getValue("sensors_enabled") returns true, false, or null
if (mIsSensorsEnabled != Storage.getValue("sensors_enabled")) {
Storage.setValue("sensors_enabled", mIsSensorsEnabled);
mWebhookManager.registerWebhookSensors(); mWebhookManager.registerWebhookSensors();
} }
if (mIsSensorsLevelEnabled) { }
if (mIsSensorsEnabled) {
// Create the timed activity // Create the timed activity
if ((Background.getTemporalEventRegisteredTime() == null) or if ((Background.getTemporalEventRegisteredTime() == null) or
(Background.getTemporalEventRegisteredTime() != (mBatteryRefreshRate * 60))) { (Background.getTemporalEventRegisteredTime() != (mBatteryRefreshRate * 60))) {
@@ -104,7 +124,7 @@ class Settings {
} else { } else {
// Explicitly disable the background event which persists when the application closes. // Explicitly disable the background event which persists when the application closes.
// If !mHasService disable the Settings option as user feedback // If !mHasService disable the Settings option as user feedback
unsetIsSensorsLevelEnabled(); unsetIsSensorsEnabled();
unsetWebhookId(); unsetWebhookId();
} }
} }
@@ -116,66 +136,152 @@ class Settings {
// } // }
} }
//! Get the API key supplied as part of the Settings.
//!
//! @return The API Key
//
static function getApiKey() as Lang.String { static function getApiKey() as Lang.String {
if (mApiKey == null) {
return "";
} else {
return mApiKey; return mApiKey;
} }
static function getWebhookId() as Lang.String {
return mWebhookId;
} }
//! Get the Webhook ID supplied as part of the Settings.
//!
//! @return The Webhook ID
//
static function getWebhookId() as Lang.String {
if (mWebhookId == null) {
return "";
} else {
return mWebhookId;
}
}
//! Set the Webhook ID supplied as part of the Settings.
//!
//! @param webhookId The Webhook ID value to be saved.
//
static function setWebhookId(webhookId as Lang.String) { static function setWebhookId(webhookId as Lang.String) {
mWebhookId = webhookId; mWebhookId = webhookId;
Properties.setValue("webhook_id", mWebhookId); Properties.setValue("webhook_id", mWebhookId);
} }
//! Delete the Webhook ID saved as part of the Settings.
//
static function unsetWebhookId() { static function unsetWebhookId() {
mWebhookId = ""; mWebhookId = "";
Properties.setValue("webhook_id", mWebhookId); Properties.setValue("webhook_id", mWebhookId);
} }
//! Get the API URL supplied as part of the Settings.
//!
//! @return The API URL
//
static function getApiUrl() as Lang.String { static function getApiUrl() as Lang.String {
if (mApiUrl == null) {
return "";
} else {
return mApiUrl; return mApiUrl;
} }
static function getConfigUrl() as Lang.String {
return mConfigUrl;
} }
//! Get the menu configuration URL supplied as part of the Settings.
//!
//! @return The menu configuration URL
//
static function getConfigUrl() as Lang.String {
if (mConfigUrl == null) {
return "";
} else {
return mConfigUrl;
}
}
//! Get the menu cache Boolean option supplied as part of the Settings.
//!
//! @return Boolean for whether the menu should be cached to save application
//! start up time.
//
static function getCacheConfig() as Lang.Boolean { static function getCacheConfig() as Lang.Boolean {
return mCacheConfig; return mCacheConfig;
} }
//! Get the clear cache Boolean option supplied as part of the Settings.
//!
//! @return Boolean for whether the cache should be cleared next time the
//! application is started, forcing a menu refresh.
//
static function getClearCache() as Lang.Boolean { static function getClearCache() as Lang.Boolean {
return mClearCache; return mClearCache;
} }
//! Unset the clear cache Boolean option supplied as part of the Settings.
//
static function unsetClearCache() { static function unsetClearCache() {
mClearCache = false; mClearCache = false;
Properties.setValue("clear_cache", mClearCache); Properties.setValue("clear_cache", mClearCache);
} }
//! Get the value of the Wi-Fi/LTE toggle in settings.
//!
//! @return The state of the toggle.
//
static function getWifiLteExecutionEnabled() as Lang.Boolean {
// Wi-Fi/LTE sync execution on a cached menu
if (!mCacheConfig) {
return false;
}
return mWifiLteExecution;
}
//! Get the vibration Boolean option supplied as part of the Settings.
//!
//! @return Boolean for whether vibration is enabled.
//
static function getVibrate() as Lang.Boolean { static function getVibrate() as Lang.Boolean {
return mVibrate; return mVibrate;
} }
//! Get the application timeout value supplied as part of the Settings.
//!
//! @return The application timeout in milliseconds.
//
static function getAppTimeout() as Lang.Number { static function getAppTimeout() as Lang.Number {
return mAppTimeout * 1000; // Convert to milliseconds return mAppTimeout * 1000; // Convert to milliseconds
} }
//! Get the application API polling interval supplied as part of the Settings.
//!
//! @return The application API polling interval in milliseconds.
//
static function getPollDelay() as Lang.Number { static function getPollDelay() as Lang.Number {
return mPollDelay * 1000; // Convert to milliseconds return mPollDelay * 1000; // Convert to milliseconds
} }
//! Get the menu item confirmation delay supplied as part of the Settings.
//!
//! @return The menu item confirmation delay in milliseconds.
//
static function getConfirmTimeout() as Lang.Number { static function getConfirmTimeout() as Lang.Number {
return mConfirmTimeout * 1000; // Convert to milliseconds return mConfirmTimeout * 1000; // Convert to milliseconds
} }
static function getPin() as Lang.String or Null { //! Get the menu item security PIN supplied as part of the Settings.
//!
//! @return The menu item security PIN.
//
static function getPin() as Lang.String? {
return mPin; return mPin;
} }
private static function validatePin() as Lang.String or Null { //! Check the user selected PIN confirms to 4 digits as a string.
//!
//! @return The validated 4 digit string.
//
private static function validatePin() as Lang.String? {
var pin = Properties.getValue("pin"); var pin = Properties.getValue("pin");
if (pin.toNumber() == null || pin.length() != 4) { if (pin.toNumber() == null || pin.length() != 4) {
return null; return null;
@@ -183,21 +289,64 @@ class Settings {
return pin; return pin;
} }
//! Get the menu item alignment as part of the Settings.
//!
//! @return The menu item alignment.
//
static function getMenuAlignment() as Lang.Number { static function getMenuAlignment() as Lang.Number {
return mMenuAlignment; // Either WatchUi.MenuItem.MENU_ITEM_LABEL_ALIGN_RIGHT or WatchUi.MenuItem.MENU_ITEM_LABEL_ALIGN_LEFT return mMenuAlignment; // Either WatchUi.MenuItem.MENU_ITEM_LABEL_ALIGN_RIGHT or WatchUi.MenuItem.MENU_ITEM_LABEL_ALIGN_LEFT
} }
static function isSensorsLevelEnabled() as Lang.Boolean { //! Is logging of the watch sensors enabled? E.g. battery, activity etc.
return mIsSensorsLevelEnabled; //!
//! @return Boolean for whether logging of the watch sensors is enabled.
//
static function IsSensorsEnabled() as Lang.Boolean {
return mIsSensorsEnabled;
} }
static function unsetIsSensorsLevelEnabled() { //! Disable logging of the watch's sensors.
mIsSensorsLevelEnabled = false; //
Properties.setValue("enable_battery_level", mIsSensorsLevelEnabled); static function unsetIsSensorsEnabled() {
mIsSensorsEnabled = false;
Properties.setValue("enable_battery_level", mIsSensorsEnabled);
if (mHasService and (Background.getTemporalEventRegisteredTime() != null)) { if (mHasService and (Background.getTemporalEventRegisteredTime() != null)) {
Background.deleteTemporalEvent(); Background.deleteTemporalEvent();
Background.deleteActivityCompletedEvent(); Background.deleteActivityCompletedEvent();
} }
} }
//! Augment the HTTP header options passed in with the user configurable HTTP header key and value.
//!
//! @param options The HTTP header options to augment.
//!
//! @return The augmented HTTP header options.
//
static function augmentHttpHeaders(options as Lang.Dictionary) {
// Use 'm.length() > 0' here in preference to 'm != ""' or '.equals("")'. They make the App crash on device but not in simulation.
if (mUserHeaderName != null && mUserHeaderName.length() > 0 && mUserHeaderValue != null && mUserHeaderValue.length() > 0) {
options[mUserHeaderName] = mUserHeaderValue;
}
return options;
}
//! Get the clear cache Boolean option supplied as part of the Settings.
//!
//! @return Boolean for whether the cache should be cleared next time the
//! application is started, forcing a menu refresh.
//
static function getClearWebhookId() as Lang.Boolean {
return mClearWebhookId;
}
//! Unset the clear Webhook ID Boolean option supplied and the Webhook ID string as part of
//! the Settings.
//
static function clearWebhookId() {
mClearWebhookId = false;
mWebhookId = "";
Properties.setValue("clear_webhook_id", mClearWebhookId);
Properties.setValue("webhook_id", mWebhookId);
}
} }

View File

@@ -11,88 +11,99 @@
// //
// J D Abbey & P A Abbey, 28 December 2022 // J D Abbey & P A Abbey, 28 December 2022
// //
//
// Description:
//
// WebLog provides a logging and hence debugging aid for when the application is
// deployed to the watch. This is only used for development and use of it must not
// persist into a deployed version. It uses a string buffer to group log entries into
// larger submissions in order to prevent overflow of the blue tooth stack.
//
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
//
// Usage:
// wl = new WebLog();
// wl.clear();
// wl.println("Debug Message");
// wl.flush();
//
// https://domain.name/path/log.php
//
// <?php
// $myfile = fopen("log", "a");
// $queries = array();
// parse_str($_SERVER['QUERY_STRING'], $queries);
// 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, "");
// print "Success";
// ?>
using Toybox.Communications; using Toybox.Communications;
using Toybox.Lang; using Toybox.Lang;
using Toybox.System; using Toybox.System;
//! WebLog provides a logging and hence debugging aid for when the application is
//! deployed to the watch. This is only used for development and use of it must not
//! persist into a deployed version. It uses a string buffer to group log entries into
//! larger submissions in order to prevent overflow of the Bluetooth stack.
//!
//! Usage:
//! <pre>
//! wl = new WebLog();
//! wl.clear();
//! wl.println("Debug Message");
//! wl.flush();
//! </pre>
//!
//! File: https://domain.name/path/log.php
//!
//! <pre>
//! &lt;?php
//! $myfile = fopen("log", "a");
//! $queries = array();
//! parse_str($_SERVER['QUERY_STRING'], $queries);
//! fwrite($myfile, $queries['log']);
//! print "Success";
//! ?&gt;
//! </pre>
//!
//! Logs published to https://domain.name/path/log.
//!
//! File: https://domain.name/path/log_clear.php
//!
//! <pre>
//! &lt;?php
//! $myfile = fopen("log", "w");
//! fwrite($myfile, "");
//! print "Success";
//! ?&gt;
//! </pre>
//
(:glance, :background) (:glance, :background)
class WebLog { class WebLog {
private var callsbuffer = 4 as Lang.Number; private var callsBuffer = 4 as Lang.Number;
private var numCalls = 0 as Lang.Number; private var numCalls = 0 as Lang.Number;
private var buffer = "" as Lang.String; private var buffer = "" as Lang.String;
// Set the number of calls to print() before sending the buffer to the online //! Set the number of calls to print() before sending the buffer to the online
// logger. //! logger.
//!
//! @param l The number of log calls to buffer before writing to the online service.
// //
function setCallsBuffer(l as Lang.Number) { function setCallsBuffer(l as Lang.Number) {
callsbuffer = l; callsBuffer = l;
} }
// Get the number of calls to print() before sending the buffer to the online //! Get the number of calls to print() before sending the buffer to the online
// logger. //! logger.
//!
//! @return The number of log calls to buffer before writing to the online service.
// //
function getCallsBuffer() as Lang.Number { function getCallsBuffer() as Lang.Number {
return callsbuffer; return callsBuffer;
} }
// Create a debug log over the Internet to keep track of the watch's runtime //! Create a debug log over the Internet to keep track of the watch's runtime
// execution. //! execution.
//!
//! @param str The string to log.
// //
function print(str as Lang.String) { function print(str as Lang.String) {
var myTime = System.getClockTime(); var myTime = System.getClockTime();
buffer += myTime.hour.format("%02d") + ":" + myTime.min.format("%02d") + ":" + myTime.sec.format("%02d") + " " + str; buffer += myTime.hour.format("%02d") + ":" + myTime.min.format("%02d") + ":" + myTime.sec.format("%02d") + " " + str;
numCalls++; numCalls++;
// System.println("WebLog print() str = " + str); // System.println("WebLog print() str = " + str);
if (numCalls >= callsbuffer) { if (numCalls >= callsBuffer) {
doPrint(); doPrint();
} }
} }
// Create a debug log over the Internet to keep track of the watch's runtime //! Create a debug log over the Internet to keep track of the watch's runtime
// execution. Add a new line character to the end. //! execution. Add a new line character to the end.
//!
//! @param str The string to log.
// //
function println(str as Lang.String) { function println(str as Lang.String) {
print(str + "\n"); print(str + "\n");
} }
// Flush the current buffer to the online logger even if it has not reach the //! Flush the current buffer to the online logger even if it has not reach the
// submission level set by 'callsbuffer'. //! submission level set by 'callsBuffer'.
// //
function flush() { function flush() {
// System.println("WebLog flush()"); // System.println("WebLog flush()");
@@ -101,7 +112,7 @@ class WebLog {
} }
} }
// Perform the submission to the online logger. //! Perform the submission to the online logger.
// //
function doPrint() { function doPrint() {
// System.println("WebLog doPrint()"); // System.println("WebLog doPrint()");
@@ -122,8 +133,8 @@ class WebLog {
buffer = ""; buffer = "";
} }
// Clear the debug log over the Internet to start a new track of the watch's runtime //! Clear the debug log over the Internet to start a new track of the watch's runtime
// execution. //! execution.
// //
function clear() { function clear() {
// System.println("WebLog clear()"); // System.println("WebLog clear()");
@@ -143,7 +154,10 @@ class WebLog {
buffer = ""; buffer = "";
} }
// Callback function to print the outcome of a doPrint() method. //! Callback function to print the outcome of a doPrint() method. Typically used for debugging this class.
//!
//! @param responseCode Response code.
//! @param data Response data.
// //
function onLog(responseCode as Lang.Number, data as Null or Lang.Dictionary or Lang.String) as Void { function onLog(responseCode as Lang.Number, data as Null or Lang.Dictionary or Lang.String) as Void {
// if (responseCode != 200) { // if (responseCode != 200) {
@@ -153,7 +167,10 @@ class WebLog {
// } // }
} }
// Callback function to print the outcome of a clear() method. //! Callback function to print the outcome of a clear() method. Typically used for debugging this class.
//!
//! @param responseCode Response code.
//! @param data Response data.
// //
function onClear(responseCode as Lang.Number, data as Null or Lang.Dictionary or Lang.String) as Void { function onClear(responseCode as Lang.Number, data as Null or Lang.Dictionary or Lang.String) as Void {
// if (responseCode != 200) { // if (responseCode != 200) {

View File

@@ -11,14 +11,6 @@
// //
// P A Abbey & J D Abbey, 10 January 2024 // P A Abbey & J D Abbey, 10 January 2024
// //
//
// Description:
//
// Home Assistant Webhook creation.
//
// Reference:
// * https://developers.home-assistant.io/docs/api/native-app-integration
//
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
using Toybox.Lang; using Toybox.Lang;
@@ -26,10 +18,26 @@ using Toybox.Communications;
using Toybox.System; using Toybox.System;
using Toybox.WatchUi; using Toybox.WatchUi;
// Can use push view so must never be run in a glance context //! Home Assistant Webhook creation.
//!
//! NB. Because we can use push view (E.g. `ErrorView.show()`) this class must never
//! be run in a glance context.
//!
//! Reference: https://developers.home-assistant.io/docs/api/native-app-integration
//
(:glance)
class WebhookManager { class WebhookManager {
private var mSensors as Lang.Array<Lang.Object> = [];
function onReturnRequestWebhookId(responseCode as Lang.Number, data as Null or Lang.Dictionary or Lang.String) as Void { //! Callback for requesting a Webhook ID.
//!
//! @param responseCode Response code
//! @param data Return data
//
function onReturnRequestWebhookId(
responseCode as Lang.Number,
data as Null or Lang.Dictionary or Lang.String
) as Void {
switch (responseCode) { switch (responseCode) {
case Communications.BLE_HOST_TIMEOUT: case Communications.BLE_HOST_TIMEOUT:
case Communications.BLE_CONNECTION_UNAVAILABLE: case Communications.BLE_CONNECTION_UNAVAILABLE:
@@ -53,37 +61,39 @@ class WebhookManager {
break; break;
case Communications.INVALID_HTTP_BODY_IN_NETWORK_RESPONSE: case Communications.INVALID_HTTP_BODY_IN_NETWORK_RESPONSE:
// 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.unsetIsSensorsLevelEnabled(); Settings.unsetIsSensorsEnabled();
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + WatchUi.loadResource($.Rez.Strings.NoJson) as Lang.String); ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + WatchUi.loadResource($.Rez.Strings.NoJson) as Lang.String);
break; break;
case 404: case 404:
// 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.unsetIsSensorsLevelEnabled(); Settings.unsetIsSensorsEnabled();
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + WatchUi.loadResource($.Rez.Strings.ApiUrlNotFound) as Lang.String); ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + WatchUi.loadResource($.Rez.Strings.ApiUrlNotFound) as Lang.String);
break; break;
case 200: case 200:
case 201: case 201:
var id = data.get("webhook_id") as Lang.String or Null; var id = data.get("webhook_id") as Lang.String?;
if (id != null) { if (id != null) {
Settings.setWebhookId(id); Settings.setWebhookId(id);
// System.println("WebhookManager onReturnRegisterWebhookSensor(): Registering first sensor: Battery Level"); // System.println("WebhookManager onReturnRegisterWebhookSensor(): Registering first sensor: Battery Level");
registerWebhookSensors(); registerWebhookSensors();
} else { } else {
// System.println("WebhookManager onReturnRequestWebhookId(): No webhook id in response data."); // System.println("WebhookManager onReturnRequestWebhookId(): No webhook id in response data.");
Settings.unsetIsSensorsLevelEnabled(); Settings.unsetIsSensorsEnabled();
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "."); ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + ".");
} }
break; break;
default: default:
// System.println("WebhookManager onReturnRequestWebhookId(): Unhandled HTTP response code = " + responseCode); // System.println("WebhookManager onReturnRequestWebhookId(): Unhandled HTTP response code = " + responseCode);
Settings.unsetIsSensorsLevelEnabled(); Settings.unsetIsSensorsEnabled();
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + WatchUi.loadResource($.Rez.Strings.UnhandledHttpErr) as Lang.String + responseCode); ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + WatchUi.loadResource($.Rez.Strings.UnhandledHttpErr) as Lang.String + responseCode);
} }
} }
//! Request a Webhook ID from Home Assistant for use in this application.
//
function requestWebhookId() { function requestWebhookId() {
var deviceSettings = System.getDeviceSettings(); var deviceSettings = System.getDeviceSettings();
// System.println("WebhookManager requestWebhookId(): Requesting webhook id for device = " + deviceSettings.uniqueIdentifier); // System.println("WebhookManager requestWebhookId(): Requesting webhook id for device = " + deviceSettings.uniqueIdentifier);
@@ -105,17 +115,24 @@ class WebhookManager {
}, },
{ {
:method => Communications.HTTP_REQUEST_METHOD_POST, :method => Communications.HTTP_REQUEST_METHOD_POST,
:headers => { :headers => Settings.augmentHttpHeaders({
"Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON, "Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON,
"Authorization" => "Bearer " + Settings.getApiKey() "Authorization" => "Bearer " + Settings.getApiKey()
}, }),
:responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON :responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON
}, },
method(:onReturnRequestWebhookId) method(:onReturnRequestWebhookId)
); );
} }
function onReturnRegisterWebhookSensor(responseCode as Lang.Number, data as Null or Lang.Dictionary or Lang.String, sensors as Lang.Array<Lang.Object>) as Void { //! Callback function for the POST request to register the watch's sensors on the Home Assistant instance.
//!
//! @param responseCode Response code.
//! @param data Response data.
//! @param sensors The remaining sensors to be processed. The list of sensors is iterated through
//! until empty. Each POST request creating one sensor on the local Home Assistant.
//
function onReturnRegisterWebhookSensor(responseCode as Lang.Number, data as Null or Lang.Dictionary or Lang.String) as Void {
switch (responseCode) { switch (responseCode) {
case Communications.BLE_HOST_TIMEOUT: case Communications.BLE_HOST_TIMEOUT:
case Communications.BLE_CONNECTION_UNAVAILABLE: case Communications.BLE_CONNECTION_UNAVAILABLE:
@@ -158,17 +175,18 @@ class WebhookManager {
case 201: case 201:
if (data instanceof Lang.Dictionary) { if (data instanceof Lang.Dictionary) {
var d = data as Lang.Dictionary; var d = data as Lang.Dictionary;
var b = d.get("success") as Lang.Boolean or Null; var b = d.get("success") as Lang.Boolean?;
if (b != null and b != false) { if (b != null and b != false) {
if (sensors.size() == 0) { mSensors = mSensors.slice(1, null);
if (mSensors.size() == 0) {
getApp().startUpdates(); getApp().startUpdates();
} else { } else {
registerWebhookSensor(sensors); registerWebhookSensor();
} }
} else { } else {
// System.println("WebhookManager onReturnRegisterWebhookSensor(): Failure, no 'success'."); // System.println("WebhookManager onReturnRegisterWebhookSensor(): Failure, no 'success'.");
Settings.unsetWebhookId(); Settings.unsetWebhookId();
Settings.unsetIsSensorsLevelEnabled(); Settings.unsetIsSensorsEnabled();
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "."); ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + ".");
} }
} else { } else {
@@ -176,7 +194,7 @@ class WebhookManager {
// System.println("WebhookManager onReturnRegisterWebhookSensor(): Failure, not a Lang.Dict"); // System.println("WebhookManager onReturnRegisterWebhookSensor(): Failure, not a Lang.Dict");
// Webhook ID might have been deleted on Home Assistant server and a Lang.String is trying to tell us an error message // Webhook ID might have been deleted on Home Assistant server and a Lang.String is trying to tell us an error message
Settings.unsetWebhookId(); Settings.unsetWebhookId();
Settings.unsetIsSensorsLevelEnabled(); Settings.unsetIsSensorsEnabled();
if (data == null) { if (data == null) {
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\nNull data"); ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\nNull data");
} else { } else {
@@ -189,12 +207,15 @@ class WebhookManager {
default: default:
// System.println("WebhookManager onReturnRequestWebhookId(): Unhandled HTTP response code = " + responseCode); // System.println("WebhookManager onReturnRequestWebhookId(): Unhandled HTTP response code = " + responseCode);
Settings.unsetWebhookId(); Settings.unsetWebhookId();
Settings.unsetIsSensorsLevelEnabled(); Settings.unsetIsSensorsEnabled();
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + WatchUi.loadResource($.Rez.Strings.UnhandledHttpErr) as Lang.String + " " + responseCode); ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + WatchUi.loadResource($.Rez.Strings.UnhandledHttpErr) as Lang.String + " " + responseCode);
} }
} }
function registerWebhookSensor(sensors as Lang.Array<Lang.Object>) { //! Local method to send the POST request to register a number of sensors. The sensors are taken from the class variable
//! mSensors created by registerWebhookSensors().
//
private function registerWebhookSensor() {
var url = Settings.getApiUrl() + "/webhook/" + Settings.getWebhookId(); var url = Settings.getApiUrl() + "/webhook/" + Settings.getWebhookId();
// System.println("WebhookManager registerWebhookSensor(): Registering webhook sensor: " + sensor.toString()); // System.println("WebhookManager registerWebhookSensor(): Registering webhook sensor: " + sensor.toString());
// System.println("WebhookManager registerWebhookSensor(): URL=" + url); // System.println("WebhookManager registerWebhookSensor(): URL=" + url);
@@ -203,24 +224,25 @@ class WebhookManager {
url, url,
{ {
"type" => "register_sensor", "type" => "register_sensor",
"data" => sensors[0] "data" => mSensors[0]
}, },
{ {
:method => Communications.HTTP_REQUEST_METHOD_POST, :method => Communications.HTTP_REQUEST_METHOD_POST,
:headers => { :headers => Settings.augmentHttpHeaders({
"Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON "Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON
}, }),
:responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON, :responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON
:context => sensors.slice(1, null)
}, },
method(:onReturnRegisterWebhookSensor) method(:onReturnRegisterWebhookSensor)
); );
} }
//! Request the creation of all the supported watch sensors on the Home Assistant instance.
//
function registerWebhookSensors() { function registerWebhookSensors() {
var heartRate = Activity.getActivityInfo().currentHeartRate; var heartRate = Activity.getActivityInfo().currentHeartRate;
var sensors = [ mSensors = [
{ {
"device_class" => "battery", "device_class" => "battery",
"name" => "Battery Level", "name" => "Battery Level",
@@ -231,7 +253,7 @@ class WebhookManager {
"unit_of_measurement" => "%", "unit_of_measurement" => "%",
"state_class" => "measurement", "state_class" => "measurement",
"entity_category" => "diagnostic", "entity_category" => "diagnostic",
"disabled" => !Settings.isSensorsLevelEnabled() "disabled" => !Settings.IsSensorsEnabled()
}, },
{ {
"device_class" => "battery_charging", "device_class" => "battery_charging",
@@ -241,7 +263,7 @@ class WebhookManager {
"unique_id" => "battery_is_charging", "unique_id" => "battery_is_charging",
"icon" => System.getSystemStats().charging ? "mdi:battery-plus" : "mdi:battery-minus", "icon" => System.getSystemStats().charging ? "mdi:battery-plus" : "mdi:battery-minus",
"entity_category" => "diagnostic", "entity_category" => "diagnostic",
"disabled" => !Settings.isSensorsLevelEnabled() "disabled" => !Settings.IsSensorsEnabled()
}, },
{ {
"name" => "Heart rate", "name" => "Heart rate",
@@ -251,49 +273,49 @@ class WebhookManager {
"icon" => "mdi:heart-pulse", "icon" => "mdi:heart-pulse",
"unit_of_measurement" => "bpm", "unit_of_measurement" => "bpm",
"state_class" => "measurement", "state_class" => "measurement",
"disabled" => !Settings.isSensorsLevelEnabled() "disabled" => !Settings.IsSensorsEnabled()
} }
]; ];
if (Toybox has :ActivityMonitor) { if (Toybox has :ActivityMonitor) {
// System.println("WebhookManager registerWebhookSensors(): has ActivityMonitor class"); // System.println("WebhookManager registerWebhookSensors(): has ActivityMonitor class");
var activityInfo = ActivityMonitor.getInfo(); var activityInfo = ActivityMonitor.getInfo();
sensors.add({ mSensors.add({
"name" => "Steps today", "name" => "Steps today",
"state" => activityInfo.steps == null ? "unknown" : activityInfo.steps, "state" => activityInfo.steps == null ? "unknown" : activityInfo.steps,
"type" => "sensor", "type" => "sensor",
"unique_id" => "steps_today", "unique_id" => "steps_today",
"icon" => "mdi:walk", "icon" => "mdi:walk",
"state_class" => "total", "state_class" => "total",
"disabled" => !Settings.isSensorsLevelEnabled() "disabled" => !Settings.IsSensorsEnabled()
}); });
if (ActivityMonitor.Info has :floorsClimbed) { if (ActivityMonitor.Info has :floorsClimbed) {
sensors.add({ mSensors.add({
"name" => "Floors climbed today", "name" => "Floors climbed today",
"state" => activityInfo.floorsClimbed == null ? "unknown" : activityInfo.floorsClimbed, "state" => activityInfo.floorsClimbed == null ? "unknown" : activityInfo.floorsClimbed,
"type" => "sensor", "type" => "sensor",
"unique_id" => "floors_climbed_today", "unique_id" => "floors_climbed_today",
"icon" => "mdi:stairs-up", "icon" => "mdi:stairs-up",
"state_class" => "total", "state_class" => "total",
"disabled" => !Settings.isSensorsLevelEnabled() "disabled" => !Settings.IsSensorsEnabled()
}); });
} }
if (ActivityMonitor.Info has :floorsDescended) { if (ActivityMonitor.Info has :floorsDescended) {
sensors.add({ mSensors.add({
"name" => "Floors descended today", "name" => "Floors descended today",
"state" => activityInfo.floorsDescended == null ? "unknown" : activityInfo.floorsDescended, "state" => activityInfo.floorsDescended == null ? "unknown" : activityInfo.floorsDescended,
"type" => "sensor", "type" => "sensor",
"unique_id" => "floors_descended_today", "unique_id" => "floors_descended_today",
"icon" => "mdi:stairs-down", "icon" => "mdi:stairs-down",
"state_class" => "total", "state_class" => "total",
"disabled" => !Settings.isSensorsLevelEnabled() "disabled" => !Settings.IsSensorsEnabled()
}); });
} }
if (ActivityMonitor.Info has :respirationRate) { if (ActivityMonitor.Info has :respirationRate) {
sensors.add({ mSensors.add({
"name" => "Respiration rate", "name" => "Respiration rate",
"state" => activityInfo.respirationRate == null ? "unknown" : activityInfo.respirationRate, "state" => activityInfo.respirationRate == null ? "unknown" : activityInfo.respirationRate,
"type" => "sensor", "type" => "sensor",
@@ -301,7 +323,7 @@ class WebhookManager {
"icon" => "mdi:lungs", "icon" => "mdi:lungs",
"unit_of_measurement" => "bpm", "unit_of_measurement" => "bpm",
"state_class" => "measurement", "state_class" => "measurement",
"disabled" => !Settings.isSensorsLevelEnabled() "disabled" => !Settings.IsSensorsEnabled()
}); });
} }
} else { } else {
@@ -320,23 +342,23 @@ class WebhookManager {
activity = -1; activity = -1;
sub_activity = -1; sub_activity = -1;
} }
sensors.add({ mSensors.add({
"name" => "Activity", "name" => "Activity",
"state" => activity, "state" => activity,
"type" => "sensor", "type" => "sensor",
"unique_id" => "activity", "unique_id" => "activity",
"disabled" => !Settings.isSensorsLevelEnabled() "disabled" => !Settings.IsSensorsEnabled()
}); });
sensors.add({ mSensors.add({
"name" => "Sub-activity", "name" => "Sub-activity",
"state" => sub_activity, "state" => sub_activity,
"type" => "sensor", "type" => "sensor",
"unique_id" => "sub_activity", "unique_id" => "sub_activity",
"disabled" => !Settings.isSensorsLevelEnabled() "disabled" => !Settings.IsSensorsEnabled()
}); });
} }
registerWebhookSensor(sensors); registerWebhookSensor();
} }
} }

View File

@@ -0,0 +1,159 @@
//-----------------------------------------------------------------------------------
//
// 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 & vincentezw, 22 July 2025
//
//-----------------------------------------------------------------------------------
using Toybox.WatchUi;
using Toybox.System;
using Toybox.Communications;
using Toybox.Lang;
using Toybox.Timer;
//! Delegate to respond to a confirmation to execute an API request via bulk
//! synchronisation.
//
class WifiLteExecutionConfirmDelegate extends WatchUi.ConfirmationDelegate {
public static var mCommandData as {
:type as Lang.String,
:service as Lang.String?,
:data as Lang.Dictionary?,
:url as Lang.String?,
:id as Lang.Number?,
:exit as Lang.Boolean
};
private static var mTimer as Timer.Timer?;
private var mHasToast as Lang.Boolean = false;
private var mConfirmationView as WatchUi.Confirmation;
//! Initializes a confirmation delegate to confirm a Wi-Fi or LTE command execution
//!
//! @param options A dictionary describing the command to be executed:<br>
//! `{`<br>
//! &emsp; `:type: as Lang.String,` // The command type, either `"service"` or `"entity"`.<br>
//! &emsp; `:service: as Lang.String?,` // (For type `"service"`) The Home Assistant service to call (e.g., "light.turn_on").<br>
//! &emsp; `:url: as Lang.Dictionary?,` // (For type `"entity"`) The full Home Assistant entity API URL.<br>
//! &emsp; `:callback: as Lang.String?,` // (For type `"entity"`) A callback method (Method<data as Dictionary>) to handle the response.<br>
//! &emsp; `:data: as Lang.Method?,` // (Optional) A dictionary of data to send with the request.<br>
//! &emsp; `:exit: as Lang.Boolean,` // Boolean: if set to true: exit after running command.<br>
//! &rbrace;<br>
//! @param view The Confirmation view the delegate is active for
//
function initialize(
cOptions as {
:type as Lang.String,
:service as Lang.String?,
:data as Lang.Dictionary?,
:url as Lang.String?,
:callback as Lang.Method?,
:exit as Lang.Boolean,
},
view as WatchUi.Confirmation
) {
ConfirmationDelegate.initialize();
if (mTimer != null) {
mTimer.stop();
}
if (WatchUi has :showToast) {
mHasToast = true;
}
mConfirmationView = view;
mCommandData = {
:type => cOptions[:type],
:service => cOptions[:service],
:data => cOptions[:data],
:url => cOptions[:url],
:callback => cOptions[:callback],
:exit => cOptions[:exit]
};
var timeout = Settings.getConfirmTimeout(); // ms
if (timeout > 0) {
if (mTimer == null) {
mTimer = new Timer.Timer();
}
mTimer.start(method(:onTimeout), timeout, true);
}
}
//! Handles the user's response to the confirmation dialog.
//!
//! @param response The user's confirmation response as `WatchUi.Confirm`
//! @return Always returns `true` to indicate the response was handled.
//
function onResponse(response) as Lang.Boolean {
getApp().getQuitTimer().reset();
if (mTimer != null) {
mTimer.stop();
}
if (response == WatchUi.CONFIRM_YES) {
trySync();
}
return true;
}
//! Initiates a bulk sync process to execute a command, if connections are available
//
private function trySync() as Void {
var connectionInfo = System.getDeviceSettings().connectionInfo;
var keys = connectionInfo.keys();
var possibleConnection = false;
for(var i = 0; i < keys.size(); i++) {
if (keys[i] != :bluetooth) {
if (connectionInfo[keys[i]].state != System.CONNECTION_STATE_NOT_INITIALIZED) {
possibleConnection = true;
break;
}
}
}
if (possibleConnection) {
if (Communications has :startSync2) {
Communications.startSync2({
:message => WatchUi.loadResource($.Rez.Strings.WifiLteExecutionTitle) as Lang.String
});
} else {
Communications.startSync();
}
} else {
var toast = WatchUi.loadResource($.Rez.Strings.WifiLteNotAvailable) as Lang.String;
if (mHasToast) {
WatchUi.showToast(toast, null);
} else {
new Alert({
:timeout => Globals.scAlertTimeoutMs,
:font => Graphics.FONT_MEDIUM,
:text => toast,
:fgcolor => Graphics.COLOR_WHITE,
:bgcolor => Graphics.COLOR_BLACK
}).pushView(WatchUi.SLIDE_IMMEDIATE);
}
}
}
//! Function supplied to a timer in order to limit the time for which the confirmation can be provided.
//
function onTimeout() as Void {
mTimer.stop();
var getCurrentView = WatchUi.getCurrentView();
if (getCurrentView[0] == mConfirmationView) {
WatchUi.popView(WatchUi.SLIDE_RIGHT);
}
}
}

24
translate.cmd Normal file
View File

@@ -0,0 +1,24 @@
@echo off
rem -----------------------------------------------------------------------------------
rem
rem Distributed under MIT Licence
rem See https://github.com/house-of-abbey/GarminHomeAssistant/blob/main/LICENSE.
rem
rem -----------------------------------------------------------------------------------
rem
rem GarminHomeAssistant is a Garmin IQ application written in Monkey C and routinely
rem tested on a Venu 2 device. The source code is provided at:
rem https://github.com/house-of-abbey/GarminHomeAssistant.
rem
rem J D Abbey & P A Abbey, 28 December 2022
rem
rem Run the automatic translation script.
rem
rem Reference:
rem * Using Monkey C from the Command Line
rem https://developer.garmin.com/connect-iq/reference-guides/monkey-c-command-line-setup/
rem
rem -----------------------------------------------------------------------------------
python translate.py
pause

View File

@@ -1,13 +1,13 @@
#################################################################################### ####################################################################################
# #
# Distributed under MIT Licence # Distributed under MIT Licence
# See https://github.com/house-of-abbey/GarminThermoNest/blob/main/LICENSE. # See https://github.com/house-of-abbey/GarminHomeAssistant/blob/main/LICENSE.
# #
#################################################################################### ####################################################################################
# #
# ThermoNest is a Garmin IQ application written in Monkey C and routinely tested on # GarminHomeAssistant is a Garmin IQ application written in Monkey C and routinely
# a Venu 2 device. The source code is provided at: # tested on a Venu 2 device. The source code is provided at:
# https://github.com/house-of-abbey/GarminThermoNest. # https://github.com/house-of-abbey/GarminHomeAssistant.
# #
# J D Abbey & P A Abbey, 28 December 2022 # J D Abbey & P A Abbey, 28 December 2022
# #
@@ -84,28 +84,47 @@ langLength = len(languages)
exceptionIds: list[str] = ["AppName", "AppVersionTitle"] exceptionIds: list[str] = ["AppName", "AppVersionTitle"]
titleIds: list[str] = [] titleIds: list[str] = []
# def merge(curr: BeautifulSoup, prev: BeautifulSoup) -> BeautifulSoup:
# """
# Merge the current strings.xml with the previous one, overwriting
# the previous strings with the current ones if they exist.
# """
# out = prev.__copy__()
# for s in curr.find(name="strings").find_all(name="string"):
# s_prev = out.find(name="string", attrs={"id": s["id"]})
# if s_prev:
# s_prev.string = s.string
# else:
# out.find(name="strings").append(s)
# return out
i = 1 i = 1
with open("./resources/strings/strings.xml", "r") as f: with open("./resources/strings/strings.xml", "r") as f:
c = f.read().replace("\r", "") c = f.read().replace("\r", "")
for l in languages: for l in languages:
os.makedirs(f"./resources-{l[0]}/strings/", exist_ok=True) os.makedirs(f"./resources-{l[0]}/strings/", exist_ok=True)
# Old translations will not be automatically updated/removed, use removeTranslations.py
try: try:
with open(f"./resources-{l[0]}/strings/corrections.xml", "r") as r: with open(f"./resources-{l[0]}/strings/strings.xml", "r", encoding="utf-8") as r:
curr = BeautifulSoup(r.read().replace("\r", ""), prev = BeautifulSoup(r.read().replace("\r", ""), features="xml")
features="xml") except FileNotFoundError:
prev = BeautifulSoup("", features="xml")
try:
with open(f"./resources-{l[0]}/strings/corrections.xml", "r", encoding="utf-8") as r:
curr = BeautifulSoup(r.read().replace("\r", ""), features="xml")
except FileNotFoundError: except FileNotFoundError:
curr = BeautifulSoup("", features=["xml"]) curr = BeautifulSoup("", features=["xml"])
print(f"{i} of {langLength}: Translating English to {l[2]}") print(f"{i} of {langLength}: Translating English to {l[2]}")
soup = BeautifulSoup(c, features="xml") soup = BeautifulSoup(c, features="xml")
translator = GoogleTranslator(source="en", target=l[1])
soup.find(name="strings").insert_before("\n\n") soup.find(name="strings").insert_before("\n\n")
soup.find(name="strings").insert_before( soup.find(name="strings").insert_before(
Comment( Comment(
f"\n Generated by Google Translate: English to {l[2]}\n " + f"\n Generated by Google Translate: English to {l[2]}\n " +
GoogleTranslator(source="en", target=l[1]).translate( translator.translate("Generated by Google Translate from English") + "\n"))
"Generated by Google Translate from English") + "\n"))
soup.find(name="strings").insert_before("\n\n") soup.find(name="strings").insert_before("\n\n")
for s in soup.find(name="strings").findAll(name="string"): for s in soup.find(name="strings").find_all(name="string"):
s.insert_before(" ") s.insert_before(" ")
if s["id"] in exceptionIds: if s["id"] in exceptionIds:
continue continue
@@ -114,20 +133,19 @@ with open("./resources/strings/strings.xml", "r") as f:
if s_curr: if s_curr:
s.string = s_curr.string s.string = s_curr.string
else: else:
a = GoogleTranslator(source="en", s_prev = prev.find(name="string", attrs={"id": s["id"]})
target=l[1]).translate(s.string) if s_prev:
s.string = s_prev.string
else:
a = translator.translate(s.string)
if s["id"] in titleIds: if s["id"] in titleIds:
s.string = a.title() s.string = a.title()
else: else:
s.string = a s.string = a
for s in soup.find(name="strings").findAll( for s in soup.find(name="strings").find_all(
string=lambda text: isinstance(text, Comment)): string=lambda text: isinstance(text, Comment)):
s.insert_before(" ") s.insert_before(" ")
s.replace_with( s.replace_with(Comment(" " + translator.translate(s) + " "))
Comment(
" " +
GoogleTranslator(source="en", target=l[1]).translate(s) +
" "))
# print(str(soup)) # print(str(soup))
with open(f"./resources-{l[0]}/strings/strings.xml", "wb") as w: with open(f"./resources-{l[0]}/strings/strings.xml", "wb") as w:

View File

@@ -37,7 +37,8 @@
margin-left: 0.5em; margin-left: 0.5em;
filter: grayscale() invert(); filter: grayscale() invert();
} }
.template { .template,
.info {
background-image: url(../resources-icons-48/info_type.svg); background-image: url(../resources-icons-48/info_type.svg);
background-size: contain; background-size: contain;
margin-left: 0.5em; margin-left: 0.5em;
@@ -63,6 +64,13 @@
margin-left: 0.5em; margin-left: 0.5em;
filter: grayscale() invert(); filter: grayscale() invert();
} }
.mdi {
margin-left: 0.5em;
}
.disabled {
opacity: 0.5;
}
:root { :root {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
@@ -285,6 +293,10 @@
background-color: var(--ctp-mocha-overlay1); background-color: var(--ctp-mocha-overlay1);
} }
</style> </style>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@mdi/font@7.4.47/css/materialdesignicons.min.css"
defer />
</head> </head>
<body> <body>
<div id="settings"> <div id="settings">
@@ -441,9 +453,10 @@ http:
</div> </div>
</dialog> </dialog>
<script src="https://www.unpkg.com/monaco-editor@0.45.0/min/vs/loader.js"></script> <script src="https://www.unpkg.com/monaco-editor@0.52.2/min/vs/loader.js"></script>
<script src="https://www.unpkg.com/json-ast-comments@1.1.1/lib/json.js"></script> <script src="https://www.unpkg.com/json-ast-comments@1.1.1/lib/json.js"></script>
<script src="https://www.unpkg.com/toastify-js@1.12.0/src/toastify.js"></script> <script src="https://www.unpkg.com/toastify-js@1.12.0/src/toastify.js"></script>
<script src="https://code.iconify.design/1/1.0.6/iconify.min.js"></script>
<script type="module" src="./main.js"></script> <script type="module" src="./main.js"></script>
</body> </body>
</html> </html>

View File

@@ -11,7 +11,7 @@ let api_token = localStorage.getItem('api_token') ?? '';
/** /**
* Get all entities in HomeAssistant. * Get all entities in HomeAssistant.
* @returns {Promise<Record<string, string>>} [id, name] * @returns {Promise<Record<string, { name: string, icon?: string }>>} [id, name]
*/ */
async function get_entities() { async function get_entities() {
try { try {
@@ -21,7 +21,7 @@ async function get_entities() {
Authorization: `Bearer ${api_token}`, Authorization: `Bearer ${api_token}`,
}, },
mode: 'cors', mode: 'cors',
body: `{"template":"[{% for entity in states %}[\\"{{ entity.entity_id }}\\",\\"{{ entity.name }}\\"]{% if not loop.last %},{% endif %}{% endfor %}]"}`, body: `{"template":"[{% for entity in states %}[\\"{{ entity.entity_id }}\\",\\"{{ entity.name }}\\",\\"{{ entity.attributes.icon }}\\"]{% if not loop.last %},{% endif %}{% endfor %}]"}`,
}); });
if (res.status == 401 || res.status == 403) { if (res.status == 401 || res.status == 403) {
document.querySelector('#api_token').classList.add('invalid'); document.querySelector('#api_token').classList.add('invalid');
@@ -29,8 +29,16 @@ async function get_entities() {
} }
document.querySelector('#api_url').classList.remove('invalid'); document.querySelector('#api_url').classList.remove('invalid');
document.querySelector('#api_token').classList.remove('invalid'); document.querySelector('#api_token').classList.remove('invalid');
return Object.fromEntries(await res.json()); const data = {};
} catch { for (const [id, name, icon] of await res.json()) {
data[id] = { name };
if (icon !== '') {
data[id].icon = icon;
}
}
return data;
} catch (e) {
console.error('Error fetching entities:', e);
document.querySelector('#api_url').classList.add('invalid'); document.querySelector('#api_url').classList.add('invalid');
return {}; return {};
} }
@@ -57,7 +65,8 @@ async function get_devices() {
document.querySelector('#api_url').classList.remove('invalid'); document.querySelector('#api_url').classList.remove('invalid');
document.querySelector('#api_token').classList.remove('invalid'); document.querySelector('#api_token').classList.remove('invalid');
return Object.fromEntries(await res.json()); return Object.fromEntries(await res.json());
} catch { } catch (e) {
console.error('Error fetching devices:', e);
document.querySelector('#api_url').classList.add('invalid'); document.querySelector('#api_url').classList.add('invalid');
return {}; return {};
} }
@@ -84,7 +93,8 @@ async function get_areas() {
document.querySelector('#api_url').classList.remove('invalid'); document.querySelector('#api_url').classList.remove('invalid');
document.querySelector('#api_token').classList.remove('invalid'); document.querySelector('#api_token').classList.remove('invalid');
return Object.fromEntries(await res.json()); return Object.fromEntries(await res.json());
} catch { } catch (e) {
console.error('Error fetching areas:', e);
document.querySelector('#api_url').classList.add('invalid'); document.querySelector('#api_url').classList.add('invalid');
return {}; return {};
} }
@@ -119,7 +129,8 @@ async function get_services() {
} }
} }
return services; return services;
} catch { } catch (e) {
console.error('Error fetching services:', e);
document.querySelector('#api_url').classList.add('invalid'); document.querySelector('#api_url').classList.add('invalid');
return []; return [];
} }
@@ -370,6 +381,9 @@ async function generate_schema(entities, devices, areas, services, schema) {
confirm: { confirm: {
$ref: '#/$defs/confirm', $ref: '#/$defs/confirm',
}, },
pin: {
$ref: '#/$defs/pin',
},
data: { data: {
type: 'object', type: 'object',
properties: {}, properties: {},
@@ -724,6 +738,7 @@ require(['vs/editor/editor.main'], async () => {
var decorations = editor.createDecorationsCollection([]); var decorations = editor.createDecorationsCollection([]);
/** @type {monaco.editor.IMarkerData[]} */
let markers = []; let markers = [];
const renderTemplate = editor.addCommand( const renderTemplate = editor.addCommand(
@@ -905,6 +920,7 @@ require(['vs/editor/editor.main'], async () => {
const ast = json.parse(model.getValue()); const ast = json.parse(model.getValue());
const data = JSON.parse(model.getValue()); const data = JSON.parse(model.getValue());
markers = []; markers = [];
/** @type {monaco.editor.IModelDeltaDecoration[]} */
const glyphs = []; const glyphs = [];
async function testToggle(range, entity) { async function testToggle(range, entity) {
const res = await fetch(api_url + '/states/' + entity, { const res = await fetch(api_url + '/states/' + entity, {
@@ -983,8 +999,10 @@ require(['vs/editor/editor.main'], async () => {
* @param {import('json-ast-comments').JsonAst | * @param {import('json-ast-comments').JsonAst |
* import('json-ast-comments').JsonProperty} node * import('json-ast-comments').JsonProperty} node
* @param {string[]} path * @param {string[]} path
* @param {import('json-ast-comments').JsonAst |
* import('json-ast-comments').JsonProperty | null} parent
*/ */
function recurse(node, path) { function recurse(node, path, parent = null) {
if (node.type === 'property') { if (node.type === 'property') {
if (node.key[0].value === 'content') { if (node.key[0].value === 'content') {
templates.push([ templates.push([
@@ -1010,11 +1028,39 @@ require(['vs/editor/editor.main'], async () => {
} }
trim++; trim++;
markers.push({ markers.push({
message: entities[node.value[0].value] ?? 'Entity not found', message: entities[node.value[0].value].name ?? 'Entity not found',
severity: monaco.MarkerSeverity.Hint, severity: monaco.MarkerSeverity.Hint,
...range, ...range,
startColumn: trim, startColumn: trim,
}); });
glyphs.push({
range,
options: {
isWholeLine: true,
glyphMarginClassName:
'mdi ' +
entities[node.value[0].value]?.icon?.replace(':', '-'),
},
});
} else if (
node.key[0].value === 'enabled' &&
node.value[0].type === 'boolean' &&
!node.value[0].value
) {
glyphs.push({
range: {
startLineNumber: parent.members[0].key[0].range.start.line + 1,
startColumn: 0,
endLineNumber:
parent.members[parent.members.length - 1].value[0].range.end
.line + 1,
endColumn: 10000,
},
options: {
isWholeLine: true,
inlineClassName: 'disabled',
},
});
} else if (node.key[0].value === 'type') { } else if (node.key[0].value === 'type') {
if (node.value[0].value === 'toggle') { if (node.value[0].value === 'toggle') {
toggles.push([ toggles.push([
@@ -1041,15 +1087,15 @@ require(['vs/editor/editor.main'], async () => {
}); });
} }
} else { } else {
recurse(node.value[0], [...path, node.key[0].value]); recurse(node.value[0], [...path, node.key[0].value], node);
} }
} else if (node.type === 'array') { } else if (node.type === 'array') {
for (let i = 0; i < node.members.length; i++) { for (let i = 0; i < node.members.length; i++) {
recurse(node.members[i], [...path, i]); recurse(node.members[i], [...path, i], node);
} }
} else if (node.type === 'object') { } else if (node.type === 'object') {
for (let member of node.members) { for (let member of node.members) {
recurse(member, path); recurse(member, path, node);
} }
} }
} }

View File

@@ -10,10 +10,11 @@
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"devDependencies": { "devDependencies": {
"@types/toastify-js": "^1.12.3", "@types/toastify-js": "^1.12.4",
"@vscode/webview-ui-toolkit": "1.4.0", "@vscode/webview-ui-toolkit": "1.4.0",
"json-ast-comments": "1.1.1", "json-ast-comments": "1.1.1",
"monaco-editor": "0.45.0", "monaco-editor": "0.52.2",
"prettier": "^3.6.2",
"serve": "^14.2.1" "serve": "^14.2.1"
} }
} }

25
web/pnpm-lock.yaml generated
View File

@@ -6,8 +6,8 @@ settings:
devDependencies: devDependencies:
'@types/toastify-js': '@types/toastify-js':
specifier: ^1.12.3 specifier: ^1.12.4
version: 1.12.3 version: 1.12.4
'@vscode/webview-ui-toolkit': '@vscode/webview-ui-toolkit':
specifier: 1.4.0 specifier: 1.4.0
version: 1.4.0(react@18.2.0) version: 1.4.0(react@18.2.0)
@@ -15,8 +15,11 @@ devDependencies:
specifier: 1.1.1 specifier: 1.1.1
version: 1.1.1 version: 1.1.1
monaco-editor: monaco-editor:
specifier: 0.45.0 specifier: 0.52.2
version: 0.45.0 version: 0.52.2
prettier:
specifier: ^3.6.2
version: 3.6.2
serve: serve:
specifier: ^14.2.1 specifier: ^14.2.1
version: 14.2.1 version: 14.2.1
@@ -52,8 +55,8 @@ packages:
exenv-es6: 1.1.1 exenv-es6: 1.1.1
dev: true dev: true
/@types/toastify-js@1.12.3: /@types/toastify-js@1.12.4:
resolution: {integrity: sha512-9RjLlbAHMSaae/KZNHGv19VG4gcLIm3YjvacCXBtfMfYn26h76YP5oxXI8k26q4iKXCB9LNfv18lsoS0JnFPTg==} resolution: {integrity: sha512-zfZHU4tKffPCnZRe7pjv/eFKzTVHozKewFCKaCjZ4gFinKgJRz/t0bkZiMCXJxPhv/ZoeDGNOeRD09R0kQZ/nw==}
dev: true dev: true
/@vscode/webview-ui-toolkit@1.4.0(react@18.2.0): /@vscode/webview-ui-toolkit@1.4.0(react@18.2.0):
@@ -415,8 +418,8 @@ packages:
resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==}
dev: true dev: true
/monaco-editor@0.45.0: /monaco-editor@0.52.2:
resolution: {integrity: sha512-mjv1G1ZzfEE3k9HZN0dQ2olMdwIfaeAAjFiwNprLfYNRSz7ctv9XuCT7gPtBGrMUeV1/iZzYKj17Khu1hxoHOA==} resolution: {integrity: sha512-GEQWEZmfkOGLdd3XK8ryrfWz3AIP8YymVXiPHEdewrUq7mh0qrKrfHLNCXcbB6sTnMLnOZ3ztSiKcciFUkIJwQ==}
dev: true dev: true
/ms@2.0.0: /ms@2.0.0:
@@ -460,6 +463,12 @@ packages:
resolution: {integrity: sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==} resolution: {integrity: sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==}
dev: true dev: true
/prettier@3.6.2:
resolution: {integrity: sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==}
engines: {node: '>=14'}
hasBin: true
dev: true
/punycode@1.4.1: /punycode@1.4.1:
resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==} resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==}
dev: true dev: true