mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-06-15 19:08:40 +00:00
Compare commits
54 Commits
Author | SHA1 | Date | |
---|---|---|---|
3cebd106eb | |||
9471259181 | |||
9030a00d7d | |||
7bd5e98a1a | |||
a49dd6554f | |||
d2fc64836a | |||
fc1a0eeb6d | |||
61f6d69e64 | |||
7f31cecfb5 | |||
98af5578f0 | |||
c18736e40d | |||
822c6ccca6 | |||
a139742265 | |||
dfa4cdd9b8 | |||
1c4add693d | |||
e6544b5b20 | |||
83914e8d8d | |||
bd4b6d68a8 | |||
f4ca55d741 | |||
5d34db7b6a | |||
cfaa31d5ee | |||
52ee270788 | |||
dec38889a5 | |||
586d85e706 | |||
30b55aec3e | |||
93d672dd40 | |||
9130bc7121 | |||
a6e386c5e6 | |||
2ffd83ebf5 | |||
48b7e7efe5 | |||
7bb270aae8 | |||
ac117952d0 | |||
8f685af8ca | |||
b17d12fe54 | |||
d5c39fa7f0 | |||
b4b113f4e1 | |||
517e36cfb0 | |||
7071362656 | |||
e37b2a76aa | |||
e3f8291299 | |||
2f4c14d7d5 | |||
5b9dd6d2eb | |||
6599c22664 | |||
c66950cfb0 | |||
2a99069f48 | |||
bb9c8b1088 | |||
34e56c5da0 | |||
0a93f4f9ba | |||
eb0d0f5044 | |||
a0fe746c1d | |||
00b071c132 | |||
cacd9f856f | |||
eebf5c9dcd | |||
da645f17ad |
@ -22,3 +22,8 @@
|
||||
| 2.7 | Bug fix release: 1. Handling a settings change, 2. Avoid caching a bad menu, 3. Managing bad JSON in menu definitions. |
|
||||
| 2.8 | Separation release. The application and widget are no longer joined and now have separate source code repositories. The widget version is now in "maintenance only mode" hence will not receive new features, whilst the application version can now take advantage of not being constrained by the widget's memory limitation, which should allow new features to be added in the future. |
|
||||
| 2.9 | Added an option to enable confirmation vibration so it can be turned off by request of a user. Removed a redundant setting for the alternative Widget version that was not removed previously, and fixed a bug with dereferencing Null. |
|
||||
| 2.10 | Added a user requested feature to slow down the rate of API calls in order to reduce battery wear for a situation where the application is kept open permanently on the device for convenience. Added 4 new devices. |
|
||||
| 2.11 | Bug fix release for menu caching being turned off and language corrections (Czech & Slovenian). |
|
||||
| 2.12 | Re-enabled Edge 540 and Edge 840 devices which we are unable to support due to simulator issues, but the Edge 840 device has been confirmed as working by a @Petucky. |
|
||||
| 2.13 | Moved the template status queries to Webhooks in order to fix the situation where an account is a non-privileged user. Added telemetry update on activity completion to make automations more timely at the end of an activity. When using a polling delay, there is no longer a startup delay for status updates and an action will trigger an immediate round of updates. |
|
||||
| 2.14 | Cautionary bug fix for the background service code where refactorisation spoilt some API level guard clauses. |
|
||||
|
27
README.md
27
README.md
@ -43,7 +43,10 @@ Setup for this menu is more complicated than the Connect IQ settings menu really
|
||||
2. the file is editable within Home Assistant via "[Studio Code Server](https://my.home-assistant.io/redirect/supervisor_addon/?addon=a0d7b954_vscode)", and
|
||||
3. the schema is verifiable using [JSON Schema](https://json-schema.org/overview/what-is-jsonschema).
|
||||
|
||||
We have used `/config/www/garmin/<something>.json` on our Home Assistant's file system. That equates to a URL of `https://homeassistant.local/local/garmin/<something>.json`.
|
||||
We have used `/config/www/garmin/<something>.json` on our home brew Home Assistant's file system. That equates to a URL of `https://homeassistant.local/local/garmin/<something>.json`.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> However [recent reports](https://community.home-assistant.io/t/www-folder-location-for-local-documents/24903/16) suggest this path may no longer work on [Nabu Casa](https://www.nabucasa.com/) and you should use `/homeassistant/www/` instead of `/config/www/`. We are unable to verify this since our free trial of Nabu Casa has expired.
|
||||
|
||||
Schema verification is a big part of this design choice. If the application cannot read your menu definition, there's a limited amount of debug it can reasonably provide on a small screen. That responsibility now falls to you and the schema checker for help.
|
||||
|
||||
@ -240,7 +243,16 @@ You may choose to cache your menu definition on your device in order to reduce t
|
||||
|
||||
The application uses vibration to confirm the action has been requested, as opposed to the 'toast' appears to show the action has been successfully executed. This is enabled by default but may be turned off if you do not desire this behaviour.
|
||||
|
||||
The application timeout prevents the app running on your watch when you have forgotten to close it. It prevents the refreshing of the menu statuses and therefore excessive wear on your battery level. There is a second timeout value for confirmation views. This is intended for use with more sensitive toggles so that the confirmation view is not left open and forgotten and then confirmed accidentally without you noticing. **We cannot advise you this is safe, be careful what you toggle with the watch application!**
|
||||
The application timeout prevents the HomeAssistant App running on your watch when you have forgotten to close it. It prevents the refreshing of the menu statuses and therefore excessive wear on your battery level. For those users who prefer to keep the application open all the time for continuous use, they can reduce the battery wear by increasing the "poll delay". This inserts a user configurable number of seconds between each round of item update checks, hence reducing the API access activity. This also reduces the responsive of the statuses displayed when HA devices are switched externally, i.e. by another Home Assistant client, then the watch menu display will not update as quickly. Therefore if you only use the HomeAssistant App briefly now and then, keep this setting at the default 0 seconds. NB. To be clear, all items are updated then a configurable delay is inserted before the next round of all item updates. If your poll delay is greater than zero, then your application timeout should be set to zero, otherwise you will exit the application and negate the value of the poll delay function.
|
||||
|
||||
| Application Timeout | Poll Delay | Comment |
|
||||
|:-------------------:|:----------:|:--------|
|
||||
| 0 | 0 | Permanently open, poll as fast as possible. This is the simple default, but could drain your battery |
|
||||
| > 0 | 0 | Temporarily open, poll as fast as possible, responsive and limits battery drain by closing. |
|
||||
| 0 | > 0 | Permanently open, but poll more gently to save battery. |
|
||||
| > 0 | > 0 | Temporarily open, poll more gently to save battery, but the application closes before the benefit is realised. Not recommended. |
|
||||
|
||||
There is a second timeout value for confirmation views. This is intended for use with more sensitive toggles so that the confirmation view is not left open and forgotten and then confirmed accidentally without you noticing. **We cannot advise you this is safe, be careful what you toggle with the watch application!**
|
||||
|
||||
There is a toggle setting for "text alignment" that provides finer adjustment for right-to-left languages. Perhaps this could be made automatic based on device language?
|
||||
|
||||
@ -295,13 +307,10 @@ The `id` attribute values are taken from the same names used in [`strings.xml`](
|
||||
|
||||
3. The iPhone Connect IQ application has a bug in it we cannot be responsible for. Thanks to user [a_smart_hoome](https://community.home-assistant.io/u/a_smart_hoome) who worked the problem with the dropped Internet connection, see his explanation at https://community.home-assistant.io/t/home-assistant-app-for-garmin/637348/61 for details. Please complain to the Connect IQ application developers rather than us!
|
||||
|
||||
4. Widgets have less memory than applications. With the new template based sensor display, widgets are more likely to run out of memory. E.g. a Vivoactive 3 device has a memory limit of 60 kB runtime memory for widgets (compared with 124 kB for applications) and memory is likely to be ~90% used. This makes it very likely that a larger menu will crash the application. We cannot predict what will take the application "over the edge", but we can provide this feedback to users to raise awareness, hence the widget displays menu usage as a reminder. If the widget is crashing but the application variant is not, then your menu configuration is too big for the widget. **Please don't give the application a poor review for crashing on your excessive menu definition!**
|
||||
4. Templates can require significant definition for highly customised text. Just remember, you have the ability to crash the application by creating an excessively long menu definition. Don't be silly.
|
||||
|
||||
<img src="images/Venu_Widget_sim.png" width="200" title="Venu 2" style="margin:5px"/>
|
||||
<img src="images/app_crash.png" width="200" title="Venu 2" style="margin:5px;border: 2px solid black;"/>
|
||||
5. Parameters to tap menu items cannot have their parameter usage verified. If you get this wrong and crash the application, that's your fault not the application's. In this case, start by removing the parameters for the menu item causing the crash, and add them back one at a time until you find your fault. **Please don't give the application a poor review for your bad parameter definition!**
|
||||
|
||||
5. Templates can require significant definition for highly customised text. Just remember, you have the ability to crash the application by creating an excessively long menu definition. Don't be silly.
|
||||
6. We are unable to support Edge 540 and Edge 840 devices at this time. The simulation of both these devices has two unexpected errors when toggling or executing taps. We get both `Communications.NETWORK_RESPONSE_OUT_OF_MEMORY` and `Communications.BLE_QUEUE_FULL` even though the memory usage is about 6% of the available RAM. Based on a lead from user @Petucky, both devices are being re-enabled as testing on a real Edge 840 device has proven successful, however we remain unable to support either devices until the simulator is fixed.
|
||||
|
||||
6. Parameters to tap menu items cannot have their parameter usage verified. If you get this wrong and crash the application, that's your fault not the application's. In this case, start by removing the parameters for the menu item causing the crash, and add them back one at a time until you find your fault. **Please don't give the application a poor review for your bad parameter definition!**
|
||||
|
||||
7. We are unable to support Edge 540 and Edge 840 devices at this time. The simulation of both these devices has two unexpected errors when toggling or executing taps. We get both `Communications.NETWORK_RESPONSE_OUT_OF_MEMORY` and `Communications.BLE_QUEUE_FULL` even though the memory usage is about 6% of the available RAM. We would appreciate any leads others may have on how to solve this issue.
|
||||
7. We are unable to support HTTP without HTTPS. This is a limitation placed upon us by the Connect IQ API which for security reasons refuses to work with HTTP requests. There is nothing developers can do about this limitation. You will have to put an HTTPS proxy in front of your local Home Assistant to work with this application. See the [Trouble Shooting](TroubleShooting.md#do-it-yourself-setup) guide for an example setup. We would appreciate it if users did not leave poor reviews for the lack of this feature which is beyond our control to fix.
|
||||
|
@ -21,7 +21,7 @@ rem
|
||||
rem -----------------------------------------------------------------------------------
|
||||
|
||||
rem Check this path is correct for your Java installation
|
||||
set JAVA_PATH=C:\Program Files (x86)\Common Files\Oracle\Java\javapath
|
||||
set JAVA_PATH=C:\Program Files\Java\jdk-22\bin
|
||||
rem SDK_PATH should work for all users
|
||||
set /p SDK_PATH=<"%USERPROFILE%\AppData\Roaming\Garmin\ConnectIQ\current-sdk.cfg"
|
||||
set SDK_PATH=%SDK_PATH:~0,-1%\bin
|
||||
|
@ -5,7 +5,7 @@
|
||||
In order to provide the most functionality possible the content of the menu item comes from a user-defined template (i.e. you generate your own text). This allows you to do some pretty cool things. It also makes the configuration a bit more complicated. This page will help you understand how to use templates.
|
||||
|
||||
- In this file anything between `<` and `>` is a placeholder. Replace it with the appropriate value.
|
||||
- [Jinga2](https://palletsprojects.com/p/jinja/) syntax is used by Home Assistant [Templates](https://www.home-assistant.io/docs/configuration/templating/). Templates are used to dynamically insert values into the content. The syntax includes:
|
||||
- [Jinja2](https://palletsprojects.com/p/jinja/) syntax is used by Home Assistant [Templates](https://www.home-assistant.io/docs/configuration/templating/). Templates are used to dynamically insert values into the content. The syntax includes:
|
||||
- `{%` ... `%}` for Statements
|
||||
- `{{` ... `}}` for Expressions to print to the template output
|
||||
- `{#` ... `#}` for Comments not included in the template output
|
||||
@ -16,7 +16,6 @@ In this example we get the battery level of the device and add the percent sign.
|
||||
|
||||
```json
|
||||
{
|
||||
"entity": "sensor.<device>_battery_level",
|
||||
"name": "Phone",
|
||||
"type": "template",
|
||||
"content": "{{ states('sensor.<device>_battery_level') }}%"
|
||||
@ -29,19 +28,16 @@ The first two keep to the simple proposal above. The last combines them into a s
|
||||
|
||||
```json
|
||||
{
|
||||
"entity": "sensor.hallway_temperature",
|
||||
"name": "Hall Temp",
|
||||
"type": "template",
|
||||
"content": "{{ states('sensor.hallway_temperature') }}°C"
|
||||
},
|
||||
{
|
||||
"entity": "sensor.hallway_humidity",
|
||||
"name": "Hall Humidity",
|
||||
"type": "template",
|
||||
"content": "{{ states('sensor.hallway_humidity') }}%"
|
||||
},
|
||||
{
|
||||
"entity": "sensor.hallway_temperature",
|
||||
"name": "Hallway",
|
||||
"type": "template",
|
||||
"content": "{{ states('sensor.hallway_temperature') }}°C {{ states('sensor.hallway_humidity') }}%"
|
||||
@ -58,6 +54,23 @@ In order to keep the formatting of floating point numbers under control, you mig
|
||||
},
|
||||
```
|
||||
|
||||
Where your device supports unicode characters these example may work.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "Charge",
|
||||
"type": "template",
|
||||
"content": "☎ {{ states('sensor.my_phone_battery_level') }}%{% if is_state('binary_sensor.my_phone_is_charging', 'on') %}⚡{% endif %}, ⏳ {{ '%.0f'|format(states('sensor.my_watch_battery_level') | float) }}%{% if is_state('binary_binary_sensor.my_watch_battery_is_charging', 'on') %}⚡{% endif %}"
|
||||
},
|
||||
{
|
||||
"name": "Hallway",
|
||||
"type": "template",
|
||||
"content": "🌡{% if is_state('sensor.hallway_temperature', 'unavailable') %}-{% else %}{{ '%.1f'|format(states('sensor.hallway_temperature')|float) }}°C{% if is_state_attr('climate.hallway', 'hvac_action', 'heating') or is_state_attr('climate.hallway', 'hvac_action', 'preheating') -%}🔥{%- endif %}{% endif %}, 💧{% if is_state('sensor.hallway_humidity', 'unavailable') %}-{% else %}{{ '%.1f'|format(states('sensor.hallway_humidity')|float) }}%{% endif %}"
|
||||
}
|
||||
```
|
||||
|
||||

|
||||
|
||||
## Conditionals
|
||||
|
||||
Anything between `{%` and `%}` is a directive (`if`, `else`, `elif`, `endif`, etc.). Conditionals are used to dynamically change the content based on the state of the entity.
|
||||
@ -66,7 +79,6 @@ In this example we get the battery level of the device and add the percent sign.
|
||||
|
||||
```json
|
||||
{
|
||||
"entity": "sensor.<device>_battery_level",
|
||||
"name": "Phone",
|
||||
"type": "template",
|
||||
"content": "{{ states('sensor.<device>_battery_level') }}%{% if is_state('binary_sensor.<device>_is_charging', 'on') %}+{% endif %}"
|
||||
@ -77,13 +89,32 @@ Here we also use the else clause as well to give proper text instead of just `on
|
||||
|
||||
```json
|
||||
{
|
||||
"entity": "binary_sensor.garage_doors",
|
||||
"name": "Garage Doors",
|
||||
"type": "template",
|
||||
"content": "{% if is_state('binary_sensor.<door-0>', 'on') %}Open{% else %}Closed{% endif %} {% if is_state('binary_sensor.<door-1>', 'on') %}Open{% else %}Closed{% endif %}"
|
||||
}
|
||||
```
|
||||
|
||||
> [!IMPORTANT]
|
||||
> We advise users against adding security devices.
|
||||
|
||||
However, users are doing this **against our advice** and asking how to operate 'covers'. This is an example of toggling a garage door open and closed with confirmation. *Do this at your own risk*.
|
||||
|
||||
Note: Only when you use the `tap_action` field do you also need to include the `entity` field. This is a change to a previous version of the application, hence the presence of the `entity` field will be ignored for backwards compatibility, and the schema will provide a warning only.
|
||||
|
||||
```json
|
||||
{
|
||||
"entity": "cover.garage_door",
|
||||
"name": "Garage Door",
|
||||
"type": "template",
|
||||
"content": "{% if is_state('binary_sensor.garage_connected', 'on') %}{{state_translated('cover.garage_door')}} - {{state_attr('cover.garage_door', 'current_position')}}%{%else%}Unconnected{% endif %}",
|
||||
"tap_action": {
|
||||
"service": "cover.toggle",
|
||||
"confirm": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Advanced
|
||||
|
||||
Here we generate a bar graph of the battery level. We use the following steps to do this:
|
||||
@ -97,7 +128,6 @@ Here we generate a bar graph of the battery level. We use the following steps to
|
||||
|
||||
```json
|
||||
{
|
||||
"entity": "sensor.<device>_battery_level",
|
||||
"name": "Phone",
|
||||
"type": "template",
|
||||
"content": "{{ states('sensor.<device>_battery_level') }}%{% if is_state('binary_sensor.<device>_is_charging', 'on') %}+{% endif %} {{ '#' * (((states('sensor.<device>_battery_level') | int) / 100 * <width>) | int) }}{{ '_' * (<width> - (((states('sensor.<device>_battery_level') | int) / 100 * <width>) | int)) }}"
|
||||
@ -108,11 +138,10 @@ An example of a dimmer light with 4 brightness settings 0..3. Here our light wor
|
||||
|
||||
```json
|
||||
{
|
||||
"$schema": "./schema.json",
|
||||
"$schema": "https://raw.githubusercontent.com/house-of-abbey/GarminHomeAssistant/main/config.schema.json",
|
||||
"title": "Home",
|
||||
"items": [
|
||||
{
|
||||
"entity": "light.green_house",
|
||||
"name": "LEDs",
|
||||
"type": "template",
|
||||
"content": "{% if not (is_state('light.green_house', 'off') or is_state('light.green_house', 'unavailable')) %}{{ (((state_attr('light.green_house', 'brightness') | float) / 255 * 100) | round(0)) | int }}%{% else %}Off{% endif %}"
|
||||
@ -170,7 +199,4 @@ An example of a dimmer light with 4 brightness settings 0..3. Here our light wor
|
||||
|
||||
## Warnings
|
||||
|
||||
Just remember, **you have the ability to crash the application by creating an excessive menu definition**. Older devices running as a widget can be limited in memory such that the JSON definition causes an "Out of Memory" error. Widgets have less memory than applications. Templates can require significant definition for highly customised text. Don't be silly. With the new template based sensor display, widgets are more likely to run out of memory. E.g. a Vivoactive 3 device has a memory limit of 60 kB runtime memory for widgets (compared with 124 kB for applications) and is likely to be ~90% used. This makes it very likely that a larger menu will crash the application. We cannot predict what will take the application "over the edge", but we can provide this feedback to users to raise awareness, hence the widget displays menu usage as a reminder. If the widget is crashing but the application variant is not, then your menu configuration is too big for the widget.
|
||||
|
||||
<img src="../images/Venu_Widget_sim.png" width="200" title="Venu 2" style="margin:5px"/>
|
||||
<img src="../images/app_crash.png" width="200" title="Venu 2" style="margin:5px;border: 2px solid black;"/>
|
||||
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.
|
||||
|
@ -21,7 +21,7 @@ rem
|
||||
rem -----------------------------------------------------------------------------------
|
||||
|
||||
rem Check this path is correct for your Java installation
|
||||
set JAVA_PATH=C:\Program Files (x86)\Common Files\Oracle\Java\javapath
|
||||
set JAVA_PATH=C:\Program Files\Java\jdk-22\bin
|
||||
rem SDK_PATH should work for all users
|
||||
set /p SDK_PATH=<"%USERPROFILE%\AppData\Roaming\Garmin\ConnectIQ\current-sdk.cfg"
|
||||
set SDK_PATH=%SDK_PATH:~0,-1%\bin
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 715 KiB After Width: | Height: | Size: 697 KiB |
BIN
images/Unicode_Template.png
Normal file
BIN
images/Unicode_Template.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.7 KiB |
@ -48,14 +48,18 @@
|
||||
<iq:product id="descentg1" />
|
||||
<iq:product id="descentmk2" />
|
||||
<iq:product id="descentmk2s" />
|
||||
<iq:product id="descentmk343mm"/>
|
||||
<iq:product id="descentmk351mm"/>
|
||||
<iq:product id="edge1030" />
|
||||
<iq:product id="edge1030bontrager" />
|
||||
<iq:product id="edge1030plus" />
|
||||
<iq:product id="edge1040" />
|
||||
<iq:product id="edge520plus" />
|
||||
<iq:product id="edge530" />
|
||||
<iq:product id="edge540" />
|
||||
<iq:product id="edge820" />
|
||||
<iq:product id="edge830" />
|
||||
<iq:product id="edge840" />
|
||||
<iq:product id="edgeexplore" />
|
||||
<iq:product id="edgeexplore2" />
|
||||
<iq:product id="enduro" />
|
||||
@ -83,6 +87,8 @@
|
||||
<iq:product id="fenix7xpro" />
|
||||
<iq:product id="fenix7xpronowifi" />
|
||||
<iq:product id="fenixchronos" />
|
||||
<iq:product id="fr165"/>
|
||||
<iq:product id="fr165m"/>
|
||||
<iq:product id="fr245" />
|
||||
<iq:product id="fr245m" />
|
||||
<iq:product id="fr255" />
|
||||
|
@ -54,6 +54,10 @@ descentg1.resourcePath = $(descentg1.resourcePath);resources-launcher-62-62;reso
|
||||
descentmk2.resourcePath = $(descentmk2.resourcePath);resources-launcher-40-40;resources-icons-32
|
||||
# Screen Size 240x240 launcher icon size 40x40
|
||||
descentmk2s.resourcePath = $(descentmk2s.resourcePath);resources-launcher-40-40;resources-icons-28
|
||||
# Screen Size 390 x 390 launcher icon size 60x60
|
||||
descentmk343mm.resourcePath = $(descentmk2s.resourcePath);resources-launcher-60-60;resources-icons-46
|
||||
# Screen Size 454 x 454 launcher icon size 60x60
|
||||
descentmk351mm.resourcePath = $(descentmk2s.resourcePath);resources-launcher-60-60;resources-icons-53
|
||||
# Screen Size 282x470 launcher icon size 36x36
|
||||
edge1030.resourcePath = $(descentmk2s.resourcePath);resources-launcher-36-36;resources-icons-32
|
||||
edge1030bontrager.resourcePath = $(edge1030bontrager.resourcePath);resources-launcher-36-36;resources-icons-32
|
||||
@ -64,10 +68,12 @@ edge1040.resourcePath = $(edge1040.resourcePath);resources-launcher-40-40;resour
|
||||
edge520plus.resourcePath = $(edge520plus.resourcePath);resources-launcher-35-35;resources-icons-24
|
||||
# Screen Size 246x322 launcher icon size 35x35
|
||||
edge530.resourcePath = $(edge530.resourcePath);resources-launcher-35-35;resources-icons-28
|
||||
edge540.resourcePath = $(edge540.resourcePath);resources-launcher-35-35;resources-icons-28
|
||||
# Screen Size 200x265 launcher icon size 35x35
|
||||
edge820.resourcePath = $(edge820.resourcePath);resources-launcher-35-35;resources-icons-24
|
||||
# Screen Size 246x322 launcher icon size 35x35
|
||||
edge830.resourcePath = $(edge830.resourcePath);resources-launcher-35-35;resources-icons-28
|
||||
edge840.resourcePath = $(edge840.resourcePath);resources-launcher-35-35;resources-icons-28
|
||||
# Screen Size 240x400 launcher icon size 36x36
|
||||
edgeexplore.resourcePath = $(edgeexplore.resourcePath);resources-launcher-36-36;resources-icons-28
|
||||
edgeexplore2.resourcePath = $(edgeexplore2.resourcePath);resources-launcher-36-36;resources-icons-28
|
||||
@ -113,6 +119,10 @@ fenix7x.resourcePath = $(fenix7x.resourcePath);resources-launcher-40-40;resource
|
||||
# Screen Size 280x280 launcher icon size 40x40
|
||||
fenix7xpro.resourcePath = $(fenix7xpro.resourcePath);resources-launcher-40-40;resources-icons-32
|
||||
fenix7xpronowifi.resourcePath = $(fenix7xpronowifi.resourcePath);resources-launcher-40-40;resources-icons-32
|
||||
# Screen Size 390 x 390 launcher icon size 54x54
|
||||
fr165.resourcePath = $(descentmk2s.resourcePath);resources-launcher-54-54;resources-icons-46
|
||||
# Screen Size 390 x 390 launcher icon size 54x54
|
||||
fr165m.resourcePath = $(descentmk2s.resourcePath);resources-launcher-54-54;resources-icons-46
|
||||
# Screen Size 240x240 launcher icon size 40x40
|
||||
fr245.resourcePath = $(fr245.resourcePath);resources-launcher-40-40;resources-icons-28
|
||||
fr245m.resourcePath = $(fr245m.resourcePath);resources-launcher-40-40;resources-icons-28
|
||||
|
@ -53,6 +53,7 @@
|
||||
<string id="SettingsClearCache">هل يجب على التطبيق مسح ذاكرة التخزين المؤقت الموجودة في المرة القادمة التي يتم فيها تشغيله؟</string>
|
||||
<string id="SettingsVibration">هل يجب أن يقدم التطبيق تعليقات عبر الاهتزازات؟</string>
|
||||
<string id="SettingsAppTimeout">المهلة بالثواني. قم بالخروج من التطبيق بعد هذه الفترة من عدم النشاط لحفظ بطارية الجهاز.</string>
|
||||
<string id="SettingsPollDelay">تأخير الاستقصاء الإضافي (بالثواني). يضيف تأخيرًا بين تحديثات الحالة لجميع عناصر القائمة.</string>
|
||||
<string id="SettingsConfirmTimeout">بعد هذا الوقت (بالثواني)، يتم إغلاق مربع حوار تأكيد الإجراء تلقائيًا ويتم إلغاء الإجراء. اضبط على 0 لتعطيل المهلة.</string>
|
||||
<string id="SettingsTextAlign">محاذاة القائمة لليسار (إيقاف) أو لليمين (تشغيل).</string>
|
||||
<string id="LeftToRight">من اليسار إلى اليمين</string>
|
||||
|
@ -51,14 +51,15 @@
|
||||
<string id="SettingsConfigUrl">URL за конфигурация на менюто (JSON).</string>
|
||||
<string id="SettingsCacheConfig">Трябва ли приложението да кешира конфигурацията на менюто?</string>
|
||||
<string id="SettingsClearCache">Трябва ли приложението да изчисти съществуващия кеш при следващото стартиране?</string>
|
||||
<string id="SettingsVibration">Приложението трябва ли да предоставя обратна връзка чрез вибрации?</string>
|
||||
<string id="SettingsVibration">Трябва ли приложението да дава обратна връзка чрез вибрации?</string>
|
||||
<string id="SettingsAppTimeout">Изчакване в секунди. Излезте от приложението след този период на неактивност, за да запазите батерията на устройството.</string>
|
||||
<string id="SettingsPollDelay">Допълнително забавяне на анкетата (в секунди). Добавя забавяне между актуализацията на състоянието на всички елементи от менюто.</string>
|
||||
<string id="SettingsConfirmTimeout">След това време (в секунди) диалоговият прозорец за потвърждение на действие се затваря автоматично и действието се отменя. Задайте 0, за да деактивирате изчакването.</string>
|
||||
<string id="SettingsTextAlign">Ляво (изключено) или дясно (включено) подравняване на менюто.</string>
|
||||
<string id="LeftToRight">Отляво надясно</string>
|
||||
<string id="RightToLeft">От дясно на ляво</string>
|
||||
<string id="SettingsWidgetStart">(Само за джаджа) Автоматично стартирайте приложението от джаджата, без да чакате докосване.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Активирайте услугата на заден план, за да изпратите данните за нивото на батерията на устройството, местоположението и (ако се поддържа) за дейността до Home Assistant.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Активирайте услугата на заден план, за да изпраща данни за нивото на батерията на устройството, местоположението и (ако се поддържа) за дейността до Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Честотата на опресняване (в минути), с която фоновата услуга трябва да повтори изпращането на данни.</string>
|
||||
<string id="WebhookId">(Само за четене) Идентификационният номер на Webhook, създаден от устройството за актуализации на фонови услуги. Може да ви е необходимо това за отстраняване на грешки.</string>
|
||||
</strings>
|
||||
|
24
resources-ces/strings/corrections.xml
Normal file
24
resources-ces/strings/corrections.xml
Normal file
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
|
||||
Distributed under MIT Licence
|
||||
See https://github.com/house-of-abbey/GarminHomeAssistantWidget/blob/main/LICENSE.
|
||||
|
||||
|
||||
GarminHomeAssistantWidget is a Garmin IQ widget written in Monkey C. The source code is provided at:
|
||||
https://github.com/house-of-abbey/GarminHomeAssistantWidget.
|
||||
|
||||
P A Abbey & J D Abbey & Someone0nEarth, 15 April 2024
|
||||
|
||||
-->
|
||||
|
||||
<!--
|
||||
Corrections for the Czech language
|
||||
Opravy pro český jazyk
|
||||
-->
|
||||
|
||||
<strings>
|
||||
<string id="Confirm">Určitě?</string>
|
||||
<string id="Available">Dostupné</string>
|
||||
<string id="GlanceMenu">Menu</string>
|
||||
</strings>
|
@ -20,28 +20,28 @@
|
||||
|
||||
<strings>
|
||||
<string id="AppName" scope="glance">HomeAssistant</string>
|
||||
<string id="Confirm">Tak určitě?</string>
|
||||
<string id="Confirm">Určitě?</string>
|
||||
<string id="Executed" scope="glance">Potvrzeno</string>
|
||||
<string id="NoPhone" scope="glance">Žádné telefonní spojení</string>
|
||||
<string id="NoInternet">Žádné internetové připojení</string>
|
||||
<string id="NoResponse">Žádná odpověď, zkontrolujte připojení k internetu</string>
|
||||
<string id="NoAPIKey" scope="glance">V nastavení aplikace není žádný klíč API</string>
|
||||
<string id="NoAPIKey" scope="glance">V nastavení aplikace není klíč API</string>
|
||||
<string id="NoApiUrl" scope="glance">V nastavení aplikace není žádná adresa URL API</string>
|
||||
<string id="NoConfigUrl" scope="glance">V nastavení aplikace není žádná konfigurační URL</string>
|
||||
<string id="ApiFlood">Příliš rychlá volání API. Zpomalte prosím své požadavky.</string>
|
||||
<string id="ApiUrlNotFound">Adresa URL nenalezena. Potenciální chyba adresy URL rozhraní API v nastavení.</string>
|
||||
<string id="ConfigUrlNotFound">Adresa URL nenalezena. Potenciální chyba konfigurační adresy URL v nastavení.</string>
|
||||
<string id="ApiUrlNotFound">Adresa URL nebyla nalezena. Potenciální chyba adresy URL rozhraní API v nastavení.</string>
|
||||
<string id="ConfigUrlNotFound">Adresa URL nebyla nalezena. Potenciální chyba konfigurační adresy URL v nastavení.</string>
|
||||
<string id="NoJson">Z požadavku HTTP se nevrátil žádný JSON.</string>
|
||||
<string id="UnhandledHttpErr">Požadavek HTTP vrátil kód chyby =</string>
|
||||
<string id="TrailingSlashErr">Adresa URL rozhraní API nesmí mít koncové lomítko „/“</string>
|
||||
<string id="WebhookFailed">Registrace Webhooku se nezdařila</string>
|
||||
<string id="TemplateError">Vykreslení šablony se nezdařilo</string>
|
||||
<string id="Available" scope="glance">Dostupný</string>
|
||||
<string id="Available" scope="glance">Dostupné</string>
|
||||
<string id="Checking" scope="glance">Kontrola...</string>
|
||||
<string id="Unavailable" scope="glance">Není k dispozici</string>
|
||||
<string id="Unconfigured" scope="glance">Nenakonfigurováno</string>
|
||||
<string id="Cached" scope="glance">Uloženo do mezipaměti</string>
|
||||
<string id="GlanceMenu" scope="glance">Jídelní lístek</string>
|
||||
<string id="GlanceMenu" scope="glance">Menu</string>
|
||||
<string id="Memory" scope="glance">Paměť</string>
|
||||
<!-- Pro nastavení GUI -->
|
||||
<string id="SettingsSelect">Vybrat...</string>
|
||||
@ -53,12 +53,13 @@
|
||||
<string id="SettingsClearCache">Měla by aplikace při příštím spuštění vymazat stávající mezipaměť?</string>
|
||||
<string id="SettingsVibration">Měla by aplikace poskytovat zpětnou vazbu prostřednictvím vibrací?</string>
|
||||
<string id="SettingsAppTimeout">Časový limit v sekundách. Po této době nečinnosti aplikaci ukončete, abyste šetřili baterii zařízení.</string>
|
||||
<string id="SettingsPollDelay">Dodatečné zpoždění dotazování (v sekundách). Přidá prodlevu mezi aktualizací stavu všech položek nabídky.</string>
|
||||
<string id="SettingsConfirmTimeout">Po uplynutí této doby (v sekundách) se dialog pro potvrzení akce automaticky zavře a akce se zruší. Nastavením na 0 deaktivujete časový limit.</string>
|
||||
<string id="SettingsTextAlign">Zarovnání nabídky vlevo (vypnuto) nebo vpravo (zapnuto).</string>
|
||||
<string id="LeftToRight">Zleva do prava</string>
|
||||
<string id="RightToLeft">Zprava doleva</string>
|
||||
<string id="SettingsWidgetStart">(Pouze widget) Automaticky spusťte aplikaci z widgetu bez čekání na klepnutí.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Povolte službu na pozadí, aby odeslala údaje o stavu baterie, poloze a (pokud je podporována) aktivitě zařízení Home Assistant.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Povolte službu na pozadí pro odesílání údajů o stavu baterie, poloze a (pokud je podporováno) o aktivitě zařízení Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Obnovovací frekvence (v minutách), při které by služba na pozadí měla opakovat odesílání dat.</string>
|
||||
<string id="WebhookId">(Pouze pro čtení) ID Webhooku vytvořené zařízením pro aktualizace služby na pozadí. Možná to budete potřebovat pro ladění.</string>
|
||||
</strings>
|
||||
|
@ -53,6 +53,7 @@
|
||||
<string id="SettingsClearCache">Skal applikationen rydde den eksisterende cache næste gang den startes?</string>
|
||||
<string id="SettingsVibration">Skal applikationen give feedback via vibrationer?</string>
|
||||
<string id="SettingsAppTimeout">Timeout i sekunder. Afslut applikationen efter denne periode med inaktivitet for at spare på enhedens batteri.</string>
|
||||
<string id="SettingsPollDelay">Yderligere afstemningsforsinkelse (i sekunder). Tilføjer en forsinkelse mellem statusopdatering af alle menupunkter.</string>
|
||||
<string id="SettingsConfirmTimeout">Efter dette tidspunkt (i sekunder) lukkes en bekræftelsesdialog for en handling automatisk, og handlingen annulleres. Indstil til 0 for at deaktivere timeout.</string>
|
||||
<string id="SettingsTextAlign">Venstre (fra) eller Højre (til) menujustering.</string>
|
||||
<string id="LeftToRight">Venstre til højre</string>
|
||||
|
@ -54,6 +54,7 @@
|
||||
<string id="SettingsVibration">Soll die Anwendung über Vibrationen Feedback geben?</string>
|
||||
<string id="SettingsAppTimeout">Die App wird nach Ablauf der Zeit (in Sekunden) bei Inaktivität beendet, um den Akku
|
||||
des Geräts zu schonen.</string>
|
||||
<string id="SettingsPollDelay">Zusätzliche Abfrageverzögerung (in Sekunden). Fügt eine Verzögerung zwischen der Statusaktualisierung aller Menüelemente hinzu.</string>
|
||||
<string id="SettingsConfirmTimeout">Nach dieser Zeit (in Sekunden) wird der Bestätigungsdialog einer Aktion geschlossen und die
|
||||
Aktion abgebrochen. Auf 0 setzen, um den Timeout zu deaktivieren.</string>
|
||||
<string id="SettingsTextAlign">Menüausrichtung links (aus) oder rechts (ein).</string>
|
||||
|
@ -47,12 +47,13 @@
|
||||
<string id="SettingsSelect">Selecteer...</string>
|
||||
<string id="SettingsApiKey">API-sleutel voor HomeAssistant.</string>
|
||||
<string id="SettingsApiKeyPrompt">Toegangstoken met lange levensduur.</string>
|
||||
<string id="SettingsApiUrl">URL voor HomeAssistant-API.</string>
|
||||
<string id="SettingsApiUrl">URL voor HomeAssistant API.</string>
|
||||
<string id="SettingsConfigUrl">URL voor menuconfiguratie (JSON).</string>
|
||||
<string id="SettingsCacheConfig">Moet de applicatie de menuconfiguratie in de cache opslaan?</string>
|
||||
<string id="SettingsClearCache">Moet de applicatie de volgende keer dat deze wordt gestart de bestaande cache wissen?</string>
|
||||
<string id="SettingsVibration">Moet de applicatie feedback geven via trillingen?</string>
|
||||
<string id="SettingsAppTimeout">Time-out in seconden. Sluit de applicatie af na deze periode van inactiviteit om de batterij van het apparaat te sparen.</string>
|
||||
<string id="SettingsPollDelay">Extra poll-vertraging (in seconden). Voegt een vertraging toe tussen de statusupdate van alle menu-items.</string>
|
||||
<string id="SettingsConfirmTimeout">Na deze tijd (in seconden) wordt automatisch een bevestigingsvenster voor een actie gesloten en wordt de actie geannuleerd. Stel in op 0 om de time-out uit te schakelen.</string>
|
||||
<string id="SettingsTextAlign">Links (uit) of rechts (aan) Menu-uitlijning.</string>
|
||||
<string id="LeftToRight">Van links naar rechts</string>
|
||||
|
@ -28,10 +28,10 @@
|
||||
<string id="NoAPIKey" scope="glance">Rakenduse seadetes pole API-võtit</string>
|
||||
<string id="NoApiUrl" scope="glance">Rakenduse seadetes pole API URL-i</string>
|
||||
<string id="NoConfigUrl" scope="glance">Rakenduse seadetes pole konfiguratsiooni URL-i</string>
|
||||
<string id="ApiFlood">API-kõned liiga kiired. Palun aeglustage oma taotlusi.</string>
|
||||
<string id="ApiFlood">API-kutsed liiga kiired. Palun aeglustage oma taotlusi.</string>
|
||||
<string id="ApiUrlNotFound">URL-i ei leitud. Võimalik API URL-i viga seadetes.</string>
|
||||
<string id="ConfigUrlNotFound">URL-i ei leitud. Võimalik konfiguratsiooni URL-i viga seadetes.</string>
|
||||
<string id="NoJson">HTTP päringust ei tagastatud ühtegi JSON-i.</string>
|
||||
<string id="NoJson">HTTP-päringust ei tagastatud ühtegi JSON-i.</string>
|
||||
<string id="UnhandledHttpErr">HTTP päring tagastas veakoodi =</string>
|
||||
<string id="TrailingSlashErr">API URL-i lõpus ei tohi olla kaldkriipsu „/”</string>
|
||||
<string id="WebhookFailed">Webhaoki registreerimine ebaõnnestus</string>
|
||||
@ -53,12 +53,13 @@
|
||||
<string id="SettingsClearCache">Kas rakendus peaks järgmisel käivitamisel olemasoleva vahemälu tühjendama?</string>
|
||||
<string id="SettingsVibration">Kas rakendus peaks andma tagasisidet vibratsiooni kaudu?</string>
|
||||
<string id="SettingsAppTimeout">Aegumine sekundites. Seadme aku säästmiseks sulgege rakendus pärast seda tegevusetusperioodi.</string>
|
||||
<string id="SettingsPollDelay">Küsitluse täiendav viivitus (sekundites). Lisab viivituse kõigi menüüelementide olekuvärskenduse vahele.</string>
|
||||
<string id="SettingsConfirmTimeout">Pärast seda aega (sekundites) suletakse automaatselt toimingu kinnitusdialoog ja toiming tühistatakse. Ajalõpu keelamiseks määrake väärtusele 0.</string>
|
||||
<string id="SettingsTextAlign">Vasak (väljas) või parem (sees) menüü joondamine.</string>
|
||||
<string id="LeftToRight">Vasakult paremale</string>
|
||||
<string id="RightToLeft">Paremalt vasakule</string>
|
||||
<string id="SettingsWidgetStart">(Ainult vidin) Käivitage rakendus automaatselt vidinast ilma puudutust ootamata.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Lubage taustateenus, et saata Home Assistantile seadme aku tase, asukoht ja (kui see on toetatud) tegevusandmed.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Lubage taustteenus, et saata Home Assistantile seadme aku tase, asukoht ja (kui see on toetatud) tegevusandmed.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Värskendussagedus (minutites), millega taustateenus peaks andmete saatmist kordama.</string>
|
||||
<string id="WebhookId">(Ainult lugemiseks) Seadme loodud veebihaagi ID taustateenuste värskenduste jaoks. Võib-olla vajate seda silumiseks.</string>
|
||||
</strings>
|
||||
|
@ -53,6 +53,7 @@
|
||||
<string id="SettingsClearCache">Pitäisikö sovelluksen tyhjentää olemassa oleva välimuisti, kun se käynnistetään seuraavan kerran?</string>
|
||||
<string id="SettingsVibration">Pitäisikö sovelluksen antaa palautetta tärinän kautta?</string>
|
||||
<string id="SettingsAppTimeout">Aikakatkaisu sekunneissa. Poistu sovelluksesta tämän käyttämättömyyden jälkeen säästääksesi laitteen akkua.</string>
|
||||
<string id="SettingsPollDelay">Ylimääräinen kyselyn viive (sekunneissa). Lisää viiveen kaikkien valikkokohtien tilapäivitysten välille.</string>
|
||||
<string id="SettingsConfirmTimeout">Tämän ajan kuluttua (sekunneissa) toiminnon vahvistusikkuna suljetaan automaattisesti ja toiminto peruutetaan. Aseta arvoksi 0 poistaaksesi aikakatkaisun käytöstä.</string>
|
||||
<string id="SettingsTextAlign">Vasen (pois) tai oikea (päällä) valikon kohdistus.</string>
|
||||
<string id="LeftToRight">Vasemmalta oikealle</string>
|
||||
|
@ -53,6 +53,7 @@
|
||||
<string id="SettingsClearCache">L'application doit-elle vider le cache existant au prochain démarrage ?</string>
|
||||
<string id="SettingsVibration">L'application doit-elle fournir un retour via des vibrations ?</string>
|
||||
<string id="SettingsAppTimeout">Délai d'expiration en secondes. Quittez l'application après cette période d'inactivité pour économiser la batterie de l'appareil.</string>
|
||||
<string id="SettingsPollDelay">Délai d'interrogation supplémentaire (en secondes). Ajoute un délai entre la mise à jour du statut de tous les éléments de menu.</string>
|
||||
<string id="SettingsConfirmTimeout">Passé ce délai (en secondes), une boîte de dialogue de confirmation d'une action se ferme automatiquement et l'action est annulée. Réglez sur 0 pour désactiver le délai d'attente.</string>
|
||||
<string id="SettingsTextAlign">Alignement du menu à gauche (désactivé) ou à droite (activé).</string>
|
||||
<string id="LeftToRight">De gauche à droite</string>
|
||||
|
@ -53,6 +53,7 @@
|
||||
<string id="SettingsClearCache">Πρέπει η εφαρμογή να διαγράψει την υπάρχουσα προσωρινή μνήμη την επόμενη φορά που θα ξεκινήσει;</string>
|
||||
<string id="SettingsVibration">Πρέπει η εφαρμογή να παρέχει ανατροφοδότηση μέσω δονήσεων;</string>
|
||||
<string id="SettingsAppTimeout">Timeout σε δευτερόλεπτα. Κλείστε την εφαρμογή μετά από αυτήν την περίοδο αδράνειας για να εξοικονομήσετε την μπαταρία της συσκευής.</string>
|
||||
<string id="SettingsPollDelay">Πρόσθετη καθυστέρηση δημοσκόπησης (σε δευτερόλεπτα). Προσθέτει μια καθυστέρηση μεταξύ της ενημέρωσης κατάστασης όλων των στοιχείων μενού.</string>
|
||||
<string id="SettingsConfirmTimeout">Μετά από αυτό το χρονικό διάστημα (σε δευτερόλεπτα), ένα παράθυρο διαλόγου επιβεβαίωσης για μια ενέργεια κλείνει αυτόματα και η ενέργεια ακυρώνεται. Ορίστε στο 0 για να απενεργοποιήσετε το χρονικό όριο.</string>
|
||||
<string id="SettingsTextAlign">Αριστερά (απενεργοποίηση) ή Δεξιά (ενεργό) Ευθυγράμμιση μενού.</string>
|
||||
<string id="LeftToRight">Από αριστερά προς τα δεξιά</string>
|
||||
|
@ -27,7 +27,7 @@
|
||||
<string id="NoResponse">אין תגובה, בדוק חיבור לאינטרנט</string>
|
||||
<string id="NoAPIKey" scope="glance">אין מפתח API בהגדרות האפליקציה</string>
|
||||
<string id="NoApiUrl" scope="glance">אין כתובת API בהגדרות האפליקציה</string>
|
||||
<string id="NoConfigUrl" scope="glance">אין כתובת URL לתצורה בהגדרות האפליקציה</string>
|
||||
<string id="NoConfigUrl" scope="glance">אין כתובת אתר תצורה בהגדרות האפליקציה</string>
|
||||
<string id="ApiFlood">קריאות API מהירות מדי. נא להאט את הבקשות שלך.</string>
|
||||
<string id="ApiUrlNotFound">כתובת האתר לא נמצאה. שגיאה פוטנציאלית של כתובת ה-API בהגדרות.</string>
|
||||
<string id="ConfigUrlNotFound">כתובת האתר לא נמצאה. שגיאת כתובת אתר פוטנציאלית של תצורה בהגדרות.</string>
|
||||
@ -53,12 +53,13 @@
|
||||
<string id="SettingsClearCache">האם היישום צריך לנקות את המטמון הקיים בפעם הבאה שהוא יופעל?</string>
|
||||
<string id="SettingsVibration">האם האפליקציה צריכה לספק משוב באמצעות רעידות?</string>
|
||||
<string id="SettingsAppTimeout">פסק זמן בשניות. צא מהאפליקציה לאחר תקופה זו של חוסר פעילות כדי לחסוך בסוללת המכשיר.</string>
|
||||
<string id="SettingsConfirmTimeout">לאחר זמן זה (בשניות), תיבת דו-שיח לאישור פעולה נסגרת אוטומטית והפעולה מבוטלת. הגדר ל-0 כדי לבטל את הזמן הקצוב.</string>
|
||||
<string id="SettingsPollDelay">עיכוב נוסף בסקר (בשניות). מוסיף עיכוב בין עדכון המצב של כל פריטי התפריט.</string>
|
||||
<string id="SettingsConfirmTimeout">לאחר זמן זה (בשניות), תיבת דו-שיח לאישור פעולה נסגרת אוטומטית והפעולה מבוטלת. הגדר ל-0 כדי להשבית את הזמן הקצוב.</string>
|
||||
<string id="SettingsTextAlign">יישור תפריט שמאלה (כבוי) או ימינה (מופעל).</string>
|
||||
<string id="LeftToRight">משמאל לימין</string>
|
||||
<string id="RightToLeft">מימין לשמאל</string>
|
||||
<string id="SettingsWidgetStart">(יישומון בלבד) הפעל אוטומטית את האפליקציה מהווידג'ט מבלי לחכות להקשה.</string>
|
||||
<string id="SettingsEnableBatteryLevel">אפשר את שירות הרקע כדי לשלוח את נתוני רמת הסוללה של המכשיר, מיקום (אם נתמכים) נתוני פעילות אל Home Assistant.</string>
|
||||
<string id="SettingsEnableBatteryLevel">אפשר את שירות הרקע כדי לשלוח את נתוני רמת הסוללה של המכשיר, המיקום (אם נתמכים) ל-Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">קצב הרענון (בדקות) שבו שירות הרקע צריך לחזור על שליחת נתונים.</string>
|
||||
<string id="WebhookId">(לקריאה בלבד) מזהה ה-Webhook שנוצר על ידי המכשיר עבור עדכוני שירות ברקע. ייתכן שתדרוש זאת לצורך איתור באגים.</string>
|
||||
</strings>
|
||||
|
@ -53,6 +53,7 @@
|
||||
<string id="SettingsClearCache">Treba li aplikacija prilikom sljedećeg pokretanja očistiti postojeću predmemoriju?</string>
|
||||
<string id="SettingsVibration">Treba li aplikacija dati povratnu informaciju putem vibracija?</string>
|
||||
<string id="SettingsAppTimeout">Istek u sekundama. Izađite iz aplikacije nakon ovog razdoblja neaktivnosti kako biste uštedjeli bateriju uređaja.</string>
|
||||
<string id="SettingsPollDelay">Dodatna odgoda ankete (u sekundama). Dodaje odgodu između ažuriranja statusa svih stavki izbornika.</string>
|
||||
<string id="SettingsConfirmTimeout">Nakon tog vremena (u sekundama), dijaloški okvir za potvrdu radnje automatski se zatvara i radnja se poništava. Postavite na 0 da onemogućite vremensko ograničenje.</string>
|
||||
<string id="SettingsTextAlign">Lijevo (isključeno) ili desno (uključeno) poravnanje izbornika.</string>
|
||||
<string id="LeftToRight">S lijeva nadesno</string>
|
||||
|
@ -44,21 +44,22 @@
|
||||
<string id="GlanceMenu" scope="glance">Menü</string>
|
||||
<string id="Memory" scope="glance">memória</string>
|
||||
<!-- A beállítások GUI-hoz -->
|
||||
<string id="SettingsSelect">Válassz...</string>
|
||||
<string id="SettingsSelect">Válasszon...</string>
|
||||
<string id="SettingsApiKey">API-kulcs a HomeAssistant számára.</string>
|
||||
<string id="SettingsApiKeyPrompt">Hosszú életű hozzáférési token.</string>
|
||||
<string id="SettingsApiUrl">A HomeAssistant API URL-je.</string>
|
||||
<string id="SettingsConfigUrl">URL a menükonfigurációhoz (JSON).</string>
|
||||
<string id="SettingsCacheConfig">Az alkalmazásnak gyorsítótárba kell helyeznie a menükonfigurációt?</string>
|
||||
<string id="SettingsCacheConfig">Az alkalmazásnak gyorsítótárba kell helyeznie a menü konfigurációját?</string>
|
||||
<string id="SettingsClearCache">Törölje az alkalmazásnak a meglévő gyorsítótárat a következő indításakor?</string>
|
||||
<string id="SettingsVibration">Az alkalmazásnak rezgésekkel kell visszajelzést adnia?</string>
|
||||
<string id="SettingsAppTimeout">Időtúllépés másodpercben. Az eszköz akkumulátorának kímélése érdekében lépjen ki az alkalmazásból ezen inaktivitási időszak után.</string>
|
||||
<string id="SettingsConfirmTimeout">Ezen idő letelte után (másodpercben) a művelet megerősítő párbeszédablakja automatikusan bezárul, és a művelet megszakad. Állítsa 0-ra az időtúllépés letiltásához.</string>
|
||||
<string id="SettingsPollDelay">További lekérdezési késleltetés (másodpercben). Késleltetést ad az összes menüelem állapotfrissítése között.</string>
|
||||
<string id="SettingsConfirmTimeout">Ezen idő elteltével (másodpercben) egy művelet megerősítő párbeszédpanele automatikusan bezárul, és a művelet megszakad. Állítsa 0-ra az időtúllépés letiltásához.</string>
|
||||
<string id="SettingsTextAlign">Balra (ki) vagy Jobbra (be) Menüigazítás.</string>
|
||||
<string id="LeftToRight">Balról jobbra</string>
|
||||
<string id="RightToLeft">Jobbról balra</string>
|
||||
<string id="SettingsWidgetStart">(Csak widget) Az alkalmazás automatikus indítása a widgetről anélkül, hogy egy érintésre várna.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Engedélyezze a háttérszolgáltatást, hogy elküldje az eszköz akkumulátorszintjét, helyét és (ha támogatott) tevékenységi adatait a Home Assistantnek.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Engedélyezze a háttérszolgáltatást, hogy elküldje az eszköz akkumulátorának töltöttségi szintjét, helyét és (ha támogatott) tevékenységi adatait a Home Assistantnek.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Az a frissítési gyakoriság (percben), amellyel a háttérszolgáltatásnak meg kell ismételnie az adatok küldését.</string>
|
||||
<string id="WebhookId">(Csak olvasható) Az eszköz által a háttérszolgáltatás frissítéséhez létrehozott Webhook-azonosító. Erre szükség lehet a hibakereséshez.</string>
|
||||
</strings>
|
||||
|
@ -27,7 +27,7 @@
|
||||
<string id="NoResponse">Tidak Ada Respon, periksa koneksi Internet</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="NoConfigUrl" scope="glance">Tidak ada URL konfigurasi di pengaturan aplikasi</string>
|
||||
<string id="NoConfigUrl" scope="glance">Tidak ada URL konfigurasi dalam pengaturan aplikasi</string>
|
||||
<string id="ApiFlood">Panggilan API terlalu cepat. Harap memperlambat permintaan Anda.</string>
|
||||
<string id="ApiUrlNotFound">URL tidak ditemukan. Potensi kesalahan URL API dalam pengaturan.</string>
|
||||
<string id="ConfigUrlNotFound">URL tidak ditemukan. Potensi kesalahan URL Konfigurasi dalam pengaturan.</string>
|
||||
@ -53,6 +53,7 @@
|
||||
<string id="SettingsClearCache">Haruskah aplikasi menghapus cache yang ada saat dijalankan lagi?</string>
|
||||
<string id="SettingsVibration">Haruskah aplikasi memberikan umpan balik melalui getaran?</string>
|
||||
<string id="SettingsAppTimeout">Batas waktu dalam hitungan detik. Keluar dari aplikasi setelah periode tidak aktif ini untuk menghemat baterai perangkat.</string>
|
||||
<string id="SettingsPollDelay">Penundaan jajak pendapat tambahan (dalam hitungan detik). Menambahkan penundaan antara pembaruan status semua item menu.</string>
|
||||
<string id="SettingsConfirmTimeout">Setelah waktu ini (dalam detik), dialog konfirmasi untuk suatu tindakan secara otomatis ditutup dan tindakan tersebut dibatalkan. Setel ke 0 untuk menonaktifkan batas waktu.</string>
|
||||
<string id="SettingsTextAlign">Penyelarasan Menu Kiri (mati) atau Kanan (hidup).</string>
|
||||
<string id="LeftToRight">Kiri ke kanan</string>
|
||||
|
@ -53,12 +53,13 @@
|
||||
<string id="SettingsClearCache">L'applicazione dovrebbe svuotare la cache esistente al successivo avvio?</string>
|
||||
<string id="SettingsVibration">L'applicazione dovrebbe fornire feedback tramite vibrazioni?</string>
|
||||
<string id="SettingsAppTimeout">Timeout in secondi. Uscire dall'applicazione dopo questo periodo di inattività per risparmiare la batteria del dispositivo.</string>
|
||||
<string id="SettingsPollDelay">Ritardo polling aggiuntivo (in secondi). Aggiunge un ritardo tra l'aggiornamento dello stato di tutte le voci di menu.</string>
|
||||
<string id="SettingsConfirmTimeout">Trascorso questo tempo (in secondi), una finestra di dialogo di conferma per un'azione viene chiusa automaticamente e l'azione viene annullata. Impostare su 0 per disabilitare il timeout.</string>
|
||||
<string id="SettingsTextAlign">Allineamento del menu a sinistra (spento) o a destra (acceso).</string>
|
||||
<string id="LeftToRight">Da sinistra a destra</string>
|
||||
<string id="RightToLeft">Da destra a sinistra</string>
|
||||
<string id="SettingsWidgetStart">(Solo widget) Avvia automaticamente l'applicazione dal widget senza attendere un tocco.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Abilita il servizio in background per inviare i dati relativi al livello della batteria del dispositivo, alla posizione e (se supportato) sull'attività a Home Assistant.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Abilita il servizio in background per inviare i dati sul livello della batteria del dispositivo, sulla posizione e (se supportato) sull'attività a Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">La frequenza di aggiornamento (in minuti) alla quale il servizio in background deve ripetere l'invio dei dati.</string>
|
||||
<string id="WebhookId">(Sola lettura) L'ID webhook creato dal dispositivo per gli aggiornamenti del servizio in background. Potrebbe essere necessario per il debug.</string>
|
||||
</strings>
|
||||
|
@ -46,13 +46,14 @@
|
||||
<!-- 設定GUIの場合 -->
|
||||
<string id="SettingsSelect">選択する...</string>
|
||||
<string id="SettingsApiKey">ホームアシスタントの API キー。</string>
|
||||
<string id="SettingsApiKeyPrompt">有効期間の長いアクセス トークン。</string>
|
||||
<string id="SettingsApiKeyPrompt">有効期限の長いアクセス トークン。</string>
|
||||
<string id="SettingsApiUrl">ホームアシスタント API の URL。</string>
|
||||
<string id="SettingsConfigUrl">メニュー構成の URL (JSON)。</string>
|
||||
<string id="SettingsCacheConfig">アプリケーションはメニュー構成をキャッシュする必要がありますか?</string>
|
||||
<string id="SettingsClearCache">アプリケーションは次回起動時に既存のキャッシュをクリアする必要がありますか?</string>
|
||||
<string id="SettingsVibration">アプリケーションは振動を介してフィードバックを提供する必要がありますか?</string>
|
||||
<string id="SettingsAppTimeout">秒単位のタイムアウト。デバイスのバッテリーを節約するために、この期間非アクティブになった後はアプリケーションを終了してください。</string>
|
||||
<string id="SettingsPollDelay">追加のポーリング遅延 (秒単位)。すべてのメニュー項目のステータス更新の間に遅延を追加します。</string>
|
||||
<string id="SettingsConfirmTimeout">この時間 (秒単位) が経過すると、アクションの確認ダイアログが自動的に閉じられ、アクションがキャンセルされます。タイムアウトを無効にするには、0 に設定します。</string>
|
||||
<string id="SettingsTextAlign">左 (オフ) または右 (オン) メニューの配置。</string>
|
||||
<string id="LeftToRight">左から右へ</string>
|
||||
|
@ -53,6 +53,7 @@
|
||||
<string id="SettingsClearCache">애플리케이션이 다음에 시작될 때 기존 캐시를 지워야 합니까?</string>
|
||||
<string id="SettingsVibration">애플리케이션이 진동을 통해 피드백을 제공해야 합니까?</string>
|
||||
<string id="SettingsAppTimeout">시간 초과(초)입니다. 장치 배터리를 절약하려면 이 비활성 기간 후에 애플리케이션을 종료하십시오.</string>
|
||||
<string id="SettingsPollDelay">추가 폴링 지연(초)입니다. 모든 메뉴 항목의 상태 업데이트 사이에 지연을 추가합니다.</string>
|
||||
<string id="SettingsConfirmTimeout">이 시간(초)이 지나면 작업에 대한 확인 대화 상자가 자동으로 닫히고 작업이 취소됩니다. 시간 초과를 비활성화하려면 0으로 설정합니다.</string>
|
||||
<string id="SettingsTextAlign">왼쪽(끄기) 또는 오른쪽(켜기) 메뉴 정렬.</string>
|
||||
<string id="LeftToRight">왼쪽에서 오른쪽으로</string>
|
||||
|
@ -53,12 +53,13 @@
|
||||
<string id="SettingsClearCache">Vai lietojumprogrammai nākamajā startēšanas reizē vajadzētu notīrīt esošo kešatmiņu?</string>
|
||||
<string id="SettingsVibration">Vai lietojumprogrammai ir jāsniedz atgriezeniskā saite, izmantojot vibrācijas?</string>
|
||||
<string id="SettingsAppTimeout">Taimauts sekundēs. Pēc šī neaktivitātes perioda izejiet no lietojumprogrammas, lai taupītu ierīces akumulatoru.</string>
|
||||
<string id="SettingsPollDelay">Papildu aptaujas aizkave (sekundēs). Pievieno aizkavi starp visu izvēlnes vienumu statusa atjaunināšanu.</string>
|
||||
<string id="SettingsConfirmTimeout">Pēc šī laika (sekundēs) tiek automātiski aizvērts darbības apstiprinājuma dialoglodziņš un darbība tiek atcelta. Iestatiet uz 0, lai atspējotu taimautu.</string>
|
||||
<string id="SettingsTextAlign">Kreisā (izslēgta) vai labā (ieslēgta) izvēlnes līdzināšana.</string>
|
||||
<string id="LeftToRight">No kreisās uz labo</string>
|
||||
<string id="RightToLeft">No labās uz kreiso</string>
|
||||
<string id="SettingsWidgetStart">(tikai logrīkam) Automātiski startējiet lietojumprogrammu no logrīka, negaidot pieskārienu.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Iespējojiet fona pakalpojumu, lai Home Assistant nosūtītu ierīces akumulatora uzlādes līmeni, atrašanās vietu un (ja tiek atbalstīts) darbības datus.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Atsvaidzes intensitāte (minūtēs), ar kādu fona pakalpojumam ir jāatkārto datu sūtīšana.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Atsvaidzes biežums (minūtēs), ar kādu fona pakalpojumam ir jāatkārto datu sūtīšana.</string>
|
||||
<string id="WebhookId">(Tikai lasāms) Web aizķeres ID, ko ierīce izveidojusi fona pakalpojumu atjauninājumiem. Tas var būt nepieciešams atkļūdošanai.</string>
|
||||
</strings>
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
<strings>
|
||||
<string id="AppName" scope="glance">HomeAssistant</string>
|
||||
<string id="Confirm">Žinoma?</string>
|
||||
<string id="Confirm">Aišku?</string>
|
||||
<string id="Executed" scope="glance">Patvirtinta</string>
|
||||
<string id="NoPhone" scope="glance">Nėra telefono ryšio</string>
|
||||
<string id="NoInternet">Nėra interneto ryšio</string>
|
||||
@ -34,7 +34,7 @@
|
||||
<string id="NoJson">Joks JSON negrąžintas iš HTTP užklausos.</string>
|
||||
<string id="UnhandledHttpErr">HTTP užklausa grąžino klaidos kodą =</string>
|
||||
<string id="TrailingSlashErr">API URL pabaigoje negali būti pasvirojo brūkšnio „/“</string>
|
||||
<string id="WebhookFailed">Nepavyko užregistruoti Webhook</string>
|
||||
<string id="WebhookFailed">Nepavyko užregistruoti „Webhook“.</string>
|
||||
<string id="TemplateError">Nepavyko pateikti šablono</string>
|
||||
<string id="Available" scope="glance">Galima</string>
|
||||
<string id="Checking" scope="glance">Tikrinama...</string>
|
||||
@ -50,9 +50,10 @@
|
||||
<string id="SettingsApiUrl">„HomeAssistant“ API URL.</string>
|
||||
<string id="SettingsConfigUrl">Meniu konfigūravimo URL (JSON).</string>
|
||||
<string id="SettingsCacheConfig">Ar programa turėtų išsaugoti meniu konfigūraciją talpykloje?</string>
|
||||
<string id="SettingsClearCache">Ar programa turėtų išvalyti esamą talpyklą kitą kartą paleidus?</string>
|
||||
<string id="SettingsClearCache">Ar kitą kartą paleisdama programa turėtų išvalyti esamą talpyklą?</string>
|
||||
<string id="SettingsVibration">Ar programa turėtų teikti grįžtamąjį ryšį per vibraciją?</string>
|
||||
<string id="SettingsAppTimeout">Skirtasis laikas sekundėmis. Po šio neveiklumo laikotarpio išeikite iš programos, kad taupytumėte įrenginio akumuliatorių.</string>
|
||||
<string id="SettingsPollDelay">Papildoma apklausos delsa (sekundėmis). Prideda delsą tarp visų meniu elementų būsenos atnaujinimo.</string>
|
||||
<string id="SettingsConfirmTimeout">Praėjus šiam laikui (sekundėmis), veiksmo patvirtinimo dialogo langas automatiškai uždaromas ir veiksmas atšaukiamas. Nustatykite 0, kad išjungtumėte skirtąjį laiką.</string>
|
||||
<string id="SettingsTextAlign">Kairysis (išjungtas) arba dešinysis (įjungtas) meniu lygiavimas.</string>
|
||||
<string id="LeftToRight">Iš kairės į dešinę</string>
|
||||
|
@ -53,6 +53,7 @@
|
||||
<string id="SettingsClearCache">Bør applikasjonen tømme den eksisterende cachen neste gang den startes?</string>
|
||||
<string id="SettingsVibration">Skal applikasjonen gi tilbakemelding via vibrasjoner?</string>
|
||||
<string id="SettingsAppTimeout">Tidsavbrudd i sekunder. Avslutt applikasjonen etter denne perioden med inaktivitet for å spare enhetens batteri.</string>
|
||||
<string id="SettingsPollDelay">Ytterligere avstemningsforsinkelse (i sekunder). Legger til en forsinkelse mellom statusoppdatering av alle menyelementer.</string>
|
||||
<string id="SettingsConfirmTimeout">Etter denne tiden (i sekunder), lukkes en bekreftelsesdialog for en handling automatisk og handlingen avbrytes. Sett til 0 for å deaktivere tidsavbruddet.</string>
|
||||
<string id="SettingsTextAlign">Venstre (av) eller Høyre (på) Menyjustering.</string>
|
||||
<string id="LeftToRight">Venstre til høyre</string>
|
||||
|
@ -53,6 +53,7 @@
|
||||
<string id="SettingsClearCache">Czy aplikacja powinna wyczyścić istniejącą pamięć podręczną przy następnym uruchomieniu?</string>
|
||||
<string id="SettingsVibration">Czy aplikacja powinna przekazywać informację zwrotną za pomocą wibracji?</string>
|
||||
<string id="SettingsAppTimeout">Limit czasu w sekundach. Wyjdź z aplikacji po tym okresie bezczynności, aby oszczędzać baterię urządzenia.</string>
|
||||
<string id="SettingsPollDelay">Dodatkowe opóźnienie odpytywania (w sekundach). Dodaje opóźnienie pomiędzy aktualizacją statusu wszystkich pozycji menu.</string>
|
||||
<string id="SettingsConfirmTimeout">Po tym czasie (w sekundach) okno dialogowe z potwierdzeniem akcji zamyka się automatycznie, a akcja zostaje anulowana. Ustaw na 0, aby wyłączyć limit czasu.</string>
|
||||
<string id="SettingsTextAlign">Wyrównanie menu do lewej (wyłączone) lub do prawej (włączone).</string>
|
||||
<string id="LeftToRight">Od lewej do prawej</string>
|
||||
@ -60,5 +61,5 @@
|
||||
<string id="SettingsWidgetStart">(Tylko widget) Automatycznie uruchamiaj aplikację z widgetu, bez czekania na dotknięcie.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Włącz usługę działającą w tle, aby wysyłać dane dotyczące poziomu naładowania baterii urządzenia, lokalizacji i (jeśli są obsługiwane) do Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Częstotliwość odświeżania (w minutach), z jaką usługa działająca w tle powinna powtarzać wysyłanie danych.</string>
|
||||
<string id="WebhookId">(Tylko do odczytu) Identyfikator webhooka utworzony przez urządzenie na potrzeby aktualizacji usług w tle. Możesz tego potrzebować do debugowania.</string>
|
||||
<string id="WebhookId">(Tylko do odczytu) Identyfikator webhook utworzony przez urządzenie na potrzeby aktualizacji usług w tle. Możesz tego potrzebować do debugowania.</string>
|
||||
</strings>
|
||||
|
@ -53,6 +53,7 @@
|
||||
<string id="SettingsClearCache">O aplicativo deverá limpar o cache existente na próxima vez que for iniciado?</string>
|
||||
<string id="SettingsVibration">O aplicativo deve fornecer feedback por meio de vibrações?</string>
|
||||
<string id="SettingsAppTimeout">Tempo limite em segundos. Saia do aplicativo após esse período de inatividade para economizar bateria do aparelho.</string>
|
||||
<string id="SettingsPollDelay">Atraso de pesquisa adicional (em segundos). Adiciona um atraso entre a atualização de status de todos os itens de menu.</string>
|
||||
<string id="SettingsConfirmTimeout">Após esse tempo (em segundos), uma caixa de diálogo de confirmação de uma ação é automaticamente fechada e a ação é cancelada. Defina como 0 para desativar o tempo limite.</string>
|
||||
<string id="SettingsTextAlign">Alinhamento do menu à esquerda (desligado) ou à direita (ligado).</string>
|
||||
<string id="LeftToRight">Da esquerda para direita</string>
|
||||
|
@ -29,8 +29,8 @@
|
||||
<string id="NoApiUrl" scope="glance">Nicio adresă URL API în setările aplicației</string>
|
||||
<string id="NoConfigUrl" scope="glance">Nicio adresă URL de configurare în setările aplicației</string>
|
||||
<string id="ApiFlood">Apeluri API prea rapide. Vă rugăm să vă încetiniți solicitările.</string>
|
||||
<string id="ApiUrlNotFound">Adresa URL nu a fost găsită. Potențială eroare URL API în setări.</string>
|
||||
<string id="ConfigUrlNotFound">Adresa URL nu a fost găsită. Potențială eroare URL de configurare în setări.</string>
|
||||
<string id="ApiUrlNotFound">URL nu a fost găsit. Potențială eroare URL API în setări.</string>
|
||||
<string id="ConfigUrlNotFound">URL nu a fost găsit. Potențială eroare URL de configurare în setări.</string>
|
||||
<string id="NoJson">Niciun JSON nu a fost returnat de la solicitarea HTTP.</string>
|
||||
<string id="UnhandledHttpErr">Solicitarea HTTP a returnat codul de eroare =</string>
|
||||
<string id="TrailingSlashErr">Adresa URL API nu trebuie să aibă o bară oblică „/”</string>
|
||||
@ -53,12 +53,13 @@
|
||||
<string id="SettingsClearCache">Ar trebui aplicația să golească memoria cache existentă data viitoare când este pornită?</string>
|
||||
<string id="SettingsVibration">Ar trebui aplicația să ofere feedback prin vibrații?</string>
|
||||
<string id="SettingsAppTimeout">Timeout în secunde. Ieșiți din aplicație după această perioadă de inactivitate pentru a economisi bateria dispozitivului.</string>
|
||||
<string id="SettingsPollDelay">Întârziere suplimentară a sondajului (în secunde). Adaugă o întârziere între actualizarea stării tuturor elementelor de meniu.</string>
|
||||
<string id="SettingsConfirmTimeout">După acest timp (în secunde), un dialog de confirmare pentru o acțiune este închis automat și acțiunea este anulată. Setați la 0 pentru a dezactiva timeout-ul.</string>
|
||||
<string id="SettingsTextAlign">Alinierea meniului la stânga (dezactivată) sau la dreapta (activată).</string>
|
||||
<string id="LeftToRight">De la stânga la dreapta</string>
|
||||
<string id="RightToLeft">De la dreapta la stanga</string>
|
||||
<string id="SettingsWidgetStart">(Numai widget) Porniți automat aplicația din widget fără 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ă sunt acceptate) datele de activitate către Home Assistant.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Activați serviciul de fundal pentru a trimite datele despre nivelul bateriei dispozitivului, locația și (dacă este acceptat) datele de activitate către Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Rata de reîmprospătare (în minute) la care serviciul de fundal ar trebui să repete trimiterea datelor.</string>
|
||||
<string id="WebhookId">(Numai pentru citire) ID-ul Webhook creat de dispozitiv pentru actualizările serviciului de fundal. Este posibil să aveți nevoie de acest lucru pentru depanare.</string>
|
||||
</strings>
|
||||
|
@ -20,5 +20,11 @@
|
||||
|
||||
<strings>
|
||||
<string id="Confirm">Potvrďte</string>
|
||||
<string id="Executed" scope="glance">Spustený</string>
|
||||
<string id="Executed">Spustený</string>
|
||||
<string id="NoAPIKey">V nastaveniach aplikácie chýba kľúč API</string>
|
||||
<string id="NoApiUrl">V nastaveniach aplikácie chýba adresa URL rozhrania API</string>
|
||||
<string id="NoConfigUrl">V nastaveniach aplikácie chýba konfiguračná adresa URL</string>
|
||||
<string id="Unavailable">Nedostupné</string>
|
||||
<string id="RightToLeft">Sprava doľava</string>
|
||||
<string id="SettingsEnableBatteryLevel">Povoľte službu na pozadí, ktorá bude do Home Assistenta odosielať údaje o stave batérie zariadenia, polohe a (ak je podporované) o aktivite.</string>
|
||||
</strings>
|
||||
|
@ -25,9 +25,9 @@
|
||||
<string id="NoPhone" scope="glance">Žiadne telefónne spojenie</string>
|
||||
<string id="NoInternet">Žiadne internetové pripojenie</string>
|
||||
<string id="NoResponse">Žiadna odpoveď, skontrolujte internetové pripojenie</string>
|
||||
<string id="NoAPIKey" scope="glance">V nastaveniach aplikácie nie je žiadny kľúč API</string>
|
||||
<string id="NoApiUrl" scope="glance">V nastaveniach aplikácie nie je žiadna adresa URL rozhrania API</string>
|
||||
<string id="NoConfigUrl" scope="glance">V nastaveniach aplikácie nie je žiadna konfiguračná URL</string>
|
||||
<string id="NoAPIKey" scope="glance">V nastaveniach aplikácie chýba kľúč API</string>
|
||||
<string id="NoApiUrl" scope="glance">V nastaveniach aplikácie chýba adresa URL rozhrania API</string>
|
||||
<string id="NoConfigUrl" scope="glance">V nastaveniach aplikácie chýba konfiguračná adresa URL</string>
|
||||
<string id="ApiFlood">Volania API sú príliš rýchle. Spomaľte svoje požiadavky.</string>
|
||||
<string id="ApiUrlNotFound">Adresa URL sa nenašla. Potenciálna chyba webovej adresy rozhrania API v nastaveniach.</string>
|
||||
<string id="ConfigUrlNotFound">Adresa URL sa nenašla. Potenciálna chyba konfiguračnej adresy URL v nastaveniach.</string>
|
||||
@ -38,7 +38,7 @@
|
||||
<string id="TemplateError">Vykreslenie šablóny zlyhalo</string>
|
||||
<string id="Available" scope="glance">K dispozícii</string>
|
||||
<string id="Checking" scope="glance">Prebieha kontrola...</string>
|
||||
<string id="Unavailable" scope="glance">nedostupné</string>
|
||||
<string id="Unavailable" scope="glance">Nedostupné</string>
|
||||
<string id="Unconfigured" scope="glance">Nekonfigurované</string>
|
||||
<string id="Cached" scope="glance">Vo vyrovnávacej pamäti</string>
|
||||
<string id="GlanceMenu" scope="glance">Ponuka</string>
|
||||
@ -53,12 +53,13 @@
|
||||
<string id="SettingsClearCache">Mala by aplikácia pri ďalšom spustení vymazať existujúcu vyrovnávaciu pamäť?</string>
|
||||
<string id="SettingsVibration">Mala by aplikácia poskytovať spätnú väzbu prostredníctvom vibrácií?</string>
|
||||
<string id="SettingsAppTimeout">Časový limit v sekundách. Po tejto dobe nečinnosti ukončite aplikáciu, aby ste šetrili batériu zariadenia.</string>
|
||||
<string id="SettingsConfirmTimeout">Po tomto čase (v sekundách) sa dialógové okno s potvrdením akcie automaticky zatvorí a akcia sa zruší. Ak chcete časový limit deaktivovať, nastavte na 0.</string>
|
||||
<string id="SettingsPollDelay">Dodatočné oneskorenie hlasovania (v sekundách). Pridáva oneskorenie medzi aktualizáciou stavu všetkých položiek ponuky.</string>
|
||||
<string id="SettingsConfirmTimeout">Po tomto čase (v sekundách) sa dialógové okno s potvrdením akcie automaticky zatvorí a akcia sa zruší. Ak chcete vypnúť časový limit, nastavte na 0.</string>
|
||||
<string id="SettingsTextAlign">Zarovnanie ponuky vľavo (vypnuté) alebo vpravo (zapnuté).</string>
|
||||
<string id="LeftToRight">Zľava doprava</string>
|
||||
<string id="RightToLeft">Zprava doľava</string>
|
||||
<string id="RightToLeft">Sprava doľava</string>
|
||||
<string id="SettingsWidgetStart">(Len miniaplikácia) Automaticky spustite aplikáciu z miniaplikácie bez čakania na klepnutie.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Povoľte službu na pozadí na odosielanie údajov o stave batérie zariadenia, polohe a (ak je podporované) o aktivite domácemu asistentovi.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Povoľte službu na pozadí, ktorá bude do Home Assistenta odosielať údaje o stave batérie zariadenia, polohe a (ak je podporované) o aktivite.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Obnovovacia frekvencia (v minútach), pri ktorej by služba na pozadí mala opakovať odosielanie údajov.</string>
|
||||
<string id="WebhookId">(Len na čítanie) Webhook ID vytvorené zariadením pre aktualizácie služby na pozadí. Možno to budete potrebovať na ladenie.</string>
|
||||
</strings>
|
||||
|
@ -53,6 +53,7 @@
|
||||
<string id="SettingsClearCache">Ali naj aplikacija ob naslednjem zagonu počisti obstoječi predpomnilnik?</string>
|
||||
<string id="SettingsVibration">Ali naj aplikacija posreduje povratne informacije prek vibriranja?</string>
|
||||
<string id="SettingsAppTimeout">Časovna omejitev v sekundah. Po tem obdobju nedejavnosti zaprite aplikacijo, da prihranite baterijo naprave.</string>
|
||||
<string id="SettingsPollDelay">Dodatna zakasnitev ankete (v sekundah). Doda zakasnitev med posodobitvijo stanja vseh elementov menija.</string>
|
||||
<string id="SettingsConfirmTimeout">Po tem času (v sekundah) se potrditveno pogovorno okno za dejanje samodejno zapre in dejanje je preklicano. Nastavite na 0, da onemogočite časovno omejitev.</string>
|
||||
<string id="SettingsTextAlign">Leva (izklopljena) ali desna (vklopljena) poravnava menija.</string>
|
||||
<string id="LeftToRight">Od leve proti desni</string>
|
||||
|
@ -53,6 +53,7 @@
|
||||
<string id="SettingsClearCache">¿La aplicación debería borrar el caché existente la próxima vez que se inicie?</string>
|
||||
<string id="SettingsVibration">¿La aplicación debería proporcionar retroalimentación mediante vibraciones?</string>
|
||||
<string id="SettingsAppTimeout">Tiempo de espera en segundos. Salga de la aplicación después de este período de inactividad para ahorrar batería del dispositivo.</string>
|
||||
<string id="SettingsPollDelay">Retraso adicional en la encuesta (en segundos). Agrega un retraso entre la actualización del estado de todos los elementos del menú.</string>
|
||||
<string id="SettingsConfirmTimeout">Después de este tiempo (en segundos), se cierra automáticamente un cuadro de diálogo de confirmación de una acción y se cancela la acción. Establezca en 0 para desactivar el tiempo de espera.</string>
|
||||
<string id="SettingsTextAlign">Alineación del menú izquierda (desactivada) o derecha (activada).</string>
|
||||
<string id="LeftToRight">De izquierda a derecha</string>
|
||||
|
@ -52,7 +52,8 @@
|
||||
<string id="SettingsCacheConfig">Ska programmet cachelagra menykonfigurationen?</string>
|
||||
<string id="SettingsClearCache">Ska programmet rensa den befintliga cachen nästa gång den startas?</string>
|
||||
<string id="SettingsVibration">Ska applikationen ge feedback via vibrationer?</string>
|
||||
<string id="SettingsAppTimeout">Timeout på sekunder. Avsluta programmet efter denna period av inaktivitet för att spara enhetens batteri.</string>
|
||||
<string id="SettingsAppTimeout">Timeout i sekunder. Avsluta programmet efter denna period av inaktivitet för att spara enhetens batteri.</string>
|
||||
<string id="SettingsPollDelay">Ytterligare fördröjning (i sekunder). Lägger till en fördröjning mellan statusuppdateringen av alla menyalternativ.</string>
|
||||
<string id="SettingsConfirmTimeout">Efter denna tid (i sekunder) stängs en bekräftelsedialog för en åtgärd automatiskt och åtgärden avbryts. Ställ in på 0 för att inaktivera timeout.</string>
|
||||
<string id="SettingsTextAlign">Vänster (av) eller höger (på) menyjustering.</string>
|
||||
<string id="LeftToRight">Vänster till höger</string>
|
||||
|
@ -53,6 +53,7 @@
|
||||
<string id="SettingsClearCache">แอปพลิเคชันควรล้างแคชที่มีอยู่ในครั้งถัดไปที่เริ่มทำงานหรือไม่</string>
|
||||
<string id="SettingsVibration">แอปพลิเคชันควรให้ข้อเสนอแนะผ่านการสั่นสะเทือนหรือไม่</string>
|
||||
<string id="SettingsAppTimeout">หมดเวลาเป็นวินาที ออกจากแอปพลิเคชันหลังจากไม่มีการใช้งานเป็นระยะเวลาหนึ่งเพื่อประหยัดแบตเตอรี่ของอุปกรณ์</string>
|
||||
<string id="SettingsPollDelay">ความล่าช้าในการโพลเพิ่มเติม (เป็นวินาที) เพิ่มการหน่วงเวลาระหว่างการอัพเดตสถานะของรายการเมนูทั้งหมด</string>
|
||||
<string id="SettingsConfirmTimeout">หลังจากเวลานี้ (เป็นวินาที) กล่องโต้ตอบการยืนยันสำหรับการดำเนินการจะปิดโดยอัตโนมัติและการดำเนินการจะถูกยกเลิก ตั้งค่าเป็น 0 เพื่อปิดใช้งานการหมดเวลา</string>
|
||||
<string id="SettingsTextAlign">การจัดตำแหน่งเมนูซ้าย (ปิด) หรือขวา (เปิด)</string>
|
||||
<string id="LeftToRight">จากซ้ายไปขวา</string>
|
||||
|
@ -53,6 +53,7 @@
|
||||
<string id="SettingsClearCache">Uygulama bir sonraki başlatılışında mevcut önbelleği temizlemeli mi?</string>
|
||||
<string id="SettingsVibration">Uygulama titreşim yoluyla geri bildirim sağlamalı mı?</string>
|
||||
<string id="SettingsAppTimeout">Saniye cinsinden zaman aşımı. Cihazın pilinden tasarruf etmek için bu süre boyunca işlem yapılmadığında uygulamadan çıkın.</string>
|
||||
<string id="SettingsPollDelay">Ek anket gecikmesi (saniye cinsinden). Tüm menü öğelerinin durum güncellemesi arasına bir gecikme ekler.</string>
|
||||
<string id="SettingsConfirmTimeout">Bu sürenin sonunda (saniye olarak), bir eyleme ilişkin onay iletişim kutusu otomatik olarak kapatılır ve eylem iptal edilir. Zaman aşımını devre dışı bırakmak için 0'a ayarlayın.</string>
|
||||
<string id="SettingsTextAlign">Sol (kapalı) veya Sağ (açık) Menü Hizalaması.</string>
|
||||
<string id="LeftToRight">Soldan sağa</string>
|
||||
|
@ -53,6 +53,7 @@
|
||||
<string id="SettingsClearCache">Чи слід програмі очистити наявний кеш під час наступного запуску?</string>
|
||||
<string id="SettingsVibration">Чи має додаток надавати зворотній зв’язок за допомогою вібрації?</string>
|
||||
<string id="SettingsAppTimeout">Час очікування в секундах. Вийдіть із програми після цього періоду бездіяльності, щоб заощадити батарею пристрою.</string>
|
||||
<string id="SettingsPollDelay">Додаткова затримка опитування (у секундах). Додає затримку між оновленням статусу всіх пунктів меню.</string>
|
||||
<string id="SettingsConfirmTimeout">Після закінчення цього часу (у секундах) діалогове вікно підтвердження дії автоматично закривається, а дія скасовується. Встановіть 0, щоб вимкнути тайм-аут.</string>
|
||||
<string id="SettingsTextAlign">Ліворуч (вимкнено) або праворуч (увімкнено) вирівнювання меню.</string>
|
||||
<string id="LeftToRight">Зліва направо</string>
|
||||
@ -60,5 +61,5 @@
|
||||
<string id="SettingsWidgetStart">(Лише віджет) Автоматично запускайте програму з віджета, не чекаючи дотику.</string>
|
||||
<string id="SettingsEnableBatteryLevel">Увімкніть фонову службу, щоб надсилати дані про рівень заряду акумулятора пристрою, місцезнаходження та (якщо підтримується) дані про діяльність до Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">Частота оновлення (у хвилинах), з якою фонова служба має повторювати надсилання даних.</string>
|
||||
<string id="WebhookId">(Лише читання) Ідентифікатор Webhook, створений пристроєм для фонового оновлення служби. Це може знадобитися для налагодження.</string>
|
||||
<string id="WebhookId">(Лише для читання) Ідентифікатор Webhook, створений пристроєм для фонового оновлення служби. Це може знадобитися для налагодження.</string>
|
||||
</strings>
|
||||
|
@ -53,6 +53,7 @@
|
||||
<string id="SettingsClearCache">Ứng dụng có nên xóa bộ nhớ đệm hiện có vào lần khởi động tiếp theo không?</string>
|
||||
<string id="SettingsVibration">Ứng dụng có nên cung cấp phản hồi thông qua rung động không?</string>
|
||||
<string id="SettingsAppTimeout">Thời gian chờ tính bằng giây. Thoát khỏi ứng dụng sau khoảng thời gian không hoạt động này để tiết kiệm pin cho thiết bị.</string>
|
||||
<string id="SettingsPollDelay">Độ trễ thăm dò bổ sung (tính bằng giây). Thêm độ trễ giữa việc cập nhật trạng thái của tất cả các mục menu.</string>
|
||||
<string id="SettingsConfirmTimeout">Sau thời gian này (tính bằng giây), hộp thoại xác nhận cho một hành động sẽ tự động đóng và hành động đó sẽ bị hủy. Đặt thành 0 để tắt thời gian chờ.</string>
|
||||
<string id="SettingsTextAlign">Căn chỉnh menu Trái (tắt) hoặc Phải (bật).</string>
|
||||
<string id="LeftToRight">Trái sang phải</string>
|
||||
|
@ -53,6 +53,7 @@
|
||||
<string id="SettingsClearCache">应用程序是否应该在下次启动时清除现有缓存?</string>
|
||||
<string id="SettingsVibration">应用程序是否应该通过振动提供反馈?</string>
|
||||
<string id="SettingsAppTimeout">超时(以秒为单位)。闲置一段时间后退出应用程序以节省设备电池。</string>
|
||||
<string id="SettingsPollDelay">额外的轮询延迟(以秒为单位)。在所有菜单项的状态更新之间添加延迟。</string>
|
||||
<string id="SettingsConfirmTimeout">在此时间(以秒为单位)之后,操作的确认对话框将自动关闭并取消该操作。设置为 0 以禁用超时。</string>
|
||||
<string id="SettingsTextAlign">左(关)或右(开)菜单对齐。</string>
|
||||
<string id="LeftToRight">左到右</string>
|
||||
|
@ -53,12 +53,13 @@
|
||||
<string id="SettingsClearCache">應用程式是否應該在下次啟動時清除現有快取?</string>
|
||||
<string id="SettingsVibration">應用程式是否應該透過振動提供回饋?</string>
|
||||
<string id="SettingsAppTimeout">超時(以秒為單位)。閒置一段時間後退出應用程式以節省設備電池。</string>
|
||||
<string id="SettingsPollDelay">額外的輪詢延遲(以秒為單位)。在所有選單項目的狀態更新之間新增延遲。</string>
|
||||
<string id="SettingsConfirmTimeout">在此時間(以秒為單位)之後,操作的確認對話方塊將自動關閉並取消該操作。設定為 0 以停用逾時。</string>
|
||||
<string id="SettingsTextAlign">左(關)或右(開)選單對齊。</string>
|
||||
<string id="LeftToRight">左至右</string>
|
||||
<string id="RightToLeft">右到左</string>
|
||||
<string id="SettingsWidgetStart">(僅限小部件)從小部件自動啟動應用程序,無需等待點擊。</string>
|
||||
<string id="SettingsEnableBatteryLevel">啟用後台服務將裝置電池電量、位置和(如果支援)活動資料傳送到 Home Assistant。</string>
|
||||
<string id="SettingsEnableBatteryLevel">啟用後台服務將裝置電池電量、位置和(如果支援)活動資料傳送至 Home Assistant。</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">後台服務應重複傳送資料的更新率(以分鐘為單位)。</string>
|
||||
<string id="WebhookId">(唯讀)裝置為後台服務更新所建立的 Webhook ID。您可能需要它來進行調試。</string>
|
||||
</strings>
|
||||
|
@ -51,8 +51,9 @@
|
||||
<string id="SettingsConfigUrl">URL untuk konfigurasi menu (JSON).</string>
|
||||
<string id="SettingsCacheConfig">Sekiranya aplikasi cache konfigurasi menu?</string>
|
||||
<string id="SettingsClearCache">Patutkah aplikasi mengosongkan cache sedia ada pada kali seterusnya ia dimulakan?</string>
|
||||
<string id="SettingsVibration">Patutkah aplikasi memberikan maklum balas melalui getaran?</string>
|
||||
<string id="SettingsVibration">Sekiranya aplikasi memberikan maklum balas melalui getaran?</string>
|
||||
<string id="SettingsAppTimeout">Tamat masa dalam beberapa saat. Keluar dari aplikasi selepas tempoh tidak aktif ini untuk menjimatkan bateri peranti.</string>
|
||||
<string id="SettingsPollDelay">Kelewatan tinjauan pendapat tambahan (dalam beberapa saat). Menambah kelewatan antara kemas kini status semua item menu.</string>
|
||||
<string id="SettingsConfirmTimeout">Selepas masa ini (dalam beberapa saat), dialog pengesahan untuk tindakan ditutup secara automatik dan tindakan itu dibatalkan. Tetapkan kepada 0 untuk melumpuhkan tamat masa.</string>
|
||||
<string id="SettingsTextAlign">Penjajaran Menu Kiri (mati) atau Kanan (hidup).</string>
|
||||
<string id="LeftToRight">Kiri ke kanan</string>
|
||||
|
@ -22,37 +22,46 @@
|
||||
<property id="api_url" type="string"></property>
|
||||
|
||||
<!--
|
||||
Best be a public URL in order to work away from your
|
||||
home LAN and have a trusted HTTPS certificate
|
||||
Best be a public URL in order to work away from your home LAN and have a
|
||||
trusted HTTPS certificate.
|
||||
-->
|
||||
<property id="config_url" type="string"></property>
|
||||
|
||||
<!-- Decide if the menu configuration should be cached. -->
|
||||
<!--
|
||||
Decide if the menu configuration should be cached.
|
||||
-->
|
||||
<property id="cache_config" type="boolean">false</property>
|
||||
|
||||
<!--
|
||||
Clear the menu configuration on next application start,
|
||||
and refetch, then set this back to false
|
||||
Clear the menu configuration on next application start, and refetch, then
|
||||
set this back to false.
|
||||
-->
|
||||
<property id="clear_cache" type="boolean">false</property>
|
||||
|
||||
<!--
|
||||
Enable notification via vibrations, typically for confirmation of actions
|
||||
Enable notification via vibrations, typically for confirmation of actions.
|
||||
-->
|
||||
<property id="enable_vibration" type="boolean">true</property>
|
||||
|
||||
<!--
|
||||
Application timeout in seconds, except 0 for no
|
||||
timeout (default). After this amount of elapsed
|
||||
time with no activity, exit the application.
|
||||
Application timeout in seconds, except 0 for no timeout (default). After
|
||||
this amount of elapsed time with no activity, exit the application.
|
||||
-->
|
||||
<property id="app_timeout" type="number">0</property>
|
||||
|
||||
<!--
|
||||
After this time (in seconds), a confirmation dialog
|
||||
for an action is automatically closed and the action
|
||||
is cancelled. Set to 0 to disable the timeout.
|
||||
The default value is 3 seconds.
|
||||
Poll delay adds a user configurable delay (in seconds) to each round of
|
||||
status updates of all item in the device's menu that might be amended
|
||||
externally from the watch. A user has requested that it is possible to add
|
||||
this delayfor an "always open" mode of operation, which then drains the
|
||||
watch battery from the additional API access activity.
|
||||
-->
|
||||
<property id="poll_delay" type="number">0</property>
|
||||
|
||||
<!--
|
||||
After this time (in seconds), a confirmation dialog for an action is
|
||||
automatically closed and the action is cancelled. Set to 0 to disable the
|
||||
timeout. The default value is 3 seconds.
|
||||
-->
|
||||
<property id="confirm_timeout" type="number">3</property>
|
||||
|
||||
@ -62,7 +71,8 @@
|
||||
<property id="menu_alignment" type="number">1</property>
|
||||
|
||||
<!--
|
||||
Enable the background service to send the clock battery level to Home Assistant.
|
||||
Enable the background service to send the clock battery level to Home
|
||||
Assistant.
|
||||
-->
|
||||
<property id="enable_battery_level" type="boolean">false</property>
|
||||
|
||||
@ -73,11 +83,10 @@
|
||||
<property id="battery_level_refresh_rate" type="number">15</property>
|
||||
|
||||
<!--
|
||||
The webhook ID is the last part of the webhook URL.
|
||||
It is secret and should not be shared.
|
||||
It will not be set in settings but will be
|
||||
generated by the application and stored in
|
||||
properties, but read only for trouble shooting.
|
||||
The webhook ID is the last part of the webhook URL. It is secret and
|
||||
should not be shared. It will not be set in settings but will be
|
||||
generated by the application and stored in properties, but read only
|
||||
for trouble shooting.
|
||||
-->
|
||||
<property id="webhook_id" type="string"></property>
|
||||
|
||||
|
@ -65,6 +65,13 @@
|
||||
<settingConfig type="numeric" min="0" />
|
||||
</setting>
|
||||
|
||||
<setting
|
||||
propertyKey="@Properties.poll_delay"
|
||||
title="@Strings.SettingsPollDelay"
|
||||
>
|
||||
<settingConfig type="numeric" min="0" />
|
||||
</setting>
|
||||
|
||||
<setting
|
||||
propertyKey="@Properties.confirm_timeout"
|
||||
title="@Strings.SettingsConfirmTimeout"
|
||||
|
@ -48,6 +48,7 @@
|
||||
<string id="SettingsClearCache">Should the application clear the existing cache next time it is started?</string>
|
||||
<string id="SettingsVibration">Should the application provide feedback via vibrations?</string>
|
||||
<string id="SettingsAppTimeout">Timeout in seconds. Exit the application after this period of inactivity to save the device battery.</string>
|
||||
<string id="SettingsPollDelay">Additional poll delay (in seconds). Adds a delay between the status update of all menu items.</string>
|
||||
<string id="SettingsConfirmTimeout">After this time (in seconds), a confirmation dialog for an action is automatically closed and the action is cancelled. Set to 0 to disable the timeout.</string>
|
||||
<string id="SettingsTextAlign">Left (off) or Right (on) Menu Alignment.</string>
|
||||
<string id="LeftToRight">Left to right</string>
|
||||
|
@ -23,6 +23,7 @@ using Toybox.Lang;
|
||||
using Toybox.Application.Properties;
|
||||
using Toybox.Background;
|
||||
using Toybox.System;
|
||||
using Toybox.Activity;
|
||||
|
||||
(:background)
|
||||
class BackgroundServiceDelegate extends System.ServiceDelegate {
|
||||
@ -37,99 +38,81 @@ class BackgroundServiceDelegate extends System.ServiceDelegate {
|
||||
Background.exit(null);
|
||||
}
|
||||
|
||||
function onActivityCompleted(activity as { :sport as Activity.Sport, :subSport as Activity.SubSport }) as Void {
|
||||
if (!System.getDeviceSettings().phoneConnected) {
|
||||
// System.println("BackgroundServiceDelegate onActivityCompleted(): No Phone connection, skipping API call.");
|
||||
} else if (!System.getDeviceSettings().connectionAvailable) {
|
||||
// System.println("BackgroundServiceDelegate onActivityCompleted(): No Internet connection, skipping API call.");
|
||||
} else {
|
||||
// Ensure we're logging completion, i.e. ignore 'activity' parameter
|
||||
// System.println("BackgroundServiceDelegate onActivityCompleted(): Event triggered");
|
||||
doUpdate(-1, -1);
|
||||
}
|
||||
}
|
||||
|
||||
function onTemporalEvent() as Void {
|
||||
if (!System.getDeviceSettings().phoneConnected) {
|
||||
// System.println("BackgroundServiceDelegate onTemporalEvent(): No Phone connection, skipping API call.");
|
||||
} else if (!System.getDeviceSettings().connectionAvailable) {
|
||||
// System.println("BackgroundServiceDelegate onTemporalEvent(): No Internet connection, skipping API call.");
|
||||
} else {
|
||||
// System.println("BackgroundServiceDelegate onTemporalEvent(): Making API call.");
|
||||
var position = Position.getInfo();
|
||||
// System.println("BackgroundServiceDelegate onTemporalEvent(): gps: " + position.position.toDegrees());
|
||||
// System.println("BackgroundServiceDelegate onTemporalEvent(): speed: " + position.speed);
|
||||
// System.println("BackgroundServiceDelegate onTemporalEvent(): course: " + position.heading + "rad (" + (position.heading * 180 / Math.PI) + "°)");
|
||||
// System.println("BackgroundServiceDelegate onTemporalEvent(): altitude: " + position.altitude);
|
||||
// System.println("BackgroundServiceDelegate onTemporalEvent(): battery: " + System.getSystemStats().battery);
|
||||
// System.println("BackgroundServiceDelegate onTemporalEvent(): charging: " + System.getSystemStats().charging);
|
||||
// System.println("BackgroundServiceDelegate onTemporalEvent(): activity: " + Activity.getProfileInfo().name);
|
||||
|
||||
// Don't use Settings.* here as the object lasts < 30 secs and is recreated each time the background service is run
|
||||
|
||||
if (position.accuracy != Position.QUALITY_NOT_AVAILABLE && position.accuracy != Position.QUALITY_LAST_KNOWN) {
|
||||
var accuracy = 0;
|
||||
switch (position.accuracy) {
|
||||
case Position.QUALITY_POOR:
|
||||
accuracy = 500;
|
||||
break;
|
||||
case Position.QUALITY_USABLE:
|
||||
accuracy = 100;
|
||||
break;
|
||||
case Position.QUALITY_GOOD:
|
||||
accuracy = 10;
|
||||
break;
|
||||
}
|
||||
Communications.makeWebRequest(
|
||||
(Properties.getValue("api_url") as Lang.String) + "/webhook/" + (Properties.getValue("webhook_id") as Lang.String),
|
||||
{
|
||||
"type" => "update_location",
|
||||
"data" => {
|
||||
"gps" => position.position.toDegrees(),
|
||||
"gps_accuracy" => accuracy,
|
||||
"speed" => Math.round(position.speed),
|
||||
"course" => Math.round(position.heading * 180 / Math.PI),
|
||||
"altitude" => Math.round(position.altitude),
|
||||
}
|
||||
},
|
||||
{
|
||||
:method => Communications.HTTP_REQUEST_METHOD_POST,
|
||||
:headers => {
|
||||
"Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON
|
||||
},
|
||||
:responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON
|
||||
},
|
||||
method(:onReturnBatteryUpdate)
|
||||
);
|
||||
}
|
||||
var data = [
|
||||
{
|
||||
"state" => System.getSystemStats().battery,
|
||||
"type" => "sensor",
|
||||
"unique_id" => "battery_level"
|
||||
},
|
||||
{
|
||||
"state" => System.getSystemStats().charging,
|
||||
"type" => "binary_sensor",
|
||||
"unique_id" => "battery_is_charging"
|
||||
}
|
||||
];
|
||||
var activity = null;
|
||||
var sub_activity = null;
|
||||
if ((Activity has :getActivityInfo) and (Activity has :getProfileInfo)) {
|
||||
var activity = Activity.getProfileInfo().sport;
|
||||
var sub_activity = Activity.getProfileInfo().subSport;
|
||||
activity = Activity.getProfileInfo().sport;
|
||||
sub_activity = Activity.getProfileInfo().subSport;
|
||||
// We need to check if we are actually tracking any activity as the enumerated type does not include "No Sport".
|
||||
if ((Activity.getActivityInfo() != null) and
|
||||
((Activity.getActivityInfo().elapsedTime == null) or
|
||||
(Activity.getActivityInfo().elapsedTime == 0))) {
|
||||
(Activity.getActivityInfo().elapsedTime == 0))) {
|
||||
// Indicate no activity with -1, not part of Garmin's activity codes.
|
||||
// https://developer.garmin.com/connect-iq/api-docs/Toybox/Activity.html#Sport-module
|
||||
activity = -1;
|
||||
sub_activity = -1;
|
||||
}
|
||||
data.add({
|
||||
"state" => activity,
|
||||
"type" => "sensor",
|
||||
"unique_id" => "activity"
|
||||
});
|
||||
data.add({
|
||||
"state" => sub_activity,
|
||||
"type" => "sensor",
|
||||
"unique_id" => "sub_activity"
|
||||
});
|
||||
}
|
||||
// System.println("BackgroundServiceDelegate onTemporalEvent(): Event triggered, activity = " + activity + " sub_activity = " + sub_activity);
|
||||
doUpdate(activity, sub_activity);
|
||||
}
|
||||
}
|
||||
|
||||
private function doUpdate(activity as Lang.Number or Null, sub_activity as Lang.Number or Null) {
|
||||
// System.println("BackgroundServiceDelegate onTemporalEvent(): Making API call.");
|
||||
var position = Position.getInfo();
|
||||
// System.println("BackgroundServiceDelegate onTemporalEvent(): gps: " + position.position.toDegrees());
|
||||
// System.println("BackgroundServiceDelegate onTemporalEvent(): speed: " + position.speed);
|
||||
// System.println("BackgroundServiceDelegate onTemporalEvent(): course: " + position.heading + "rad (" + (position.heading * 180 / Math.PI) + "°)");
|
||||
// System.println("BackgroundServiceDelegate onTemporalEvent(): altitude: " + position.altitude);
|
||||
// System.println("BackgroundServiceDelegate onTemporalEvent(): battery: " + System.getSystemStats().battery);
|
||||
// System.println("BackgroundServiceDelegate onTemporalEvent(): charging: " + System.getSystemStats().charging);
|
||||
// System.println("BackgroundServiceDelegate onTemporalEvent(): activity: " + Activity.getProfileInfo().name);
|
||||
|
||||
// Don't use Settings.* here as the object lasts < 30 secs and is recreated each time the background service is run
|
||||
|
||||
if (position.accuracy != Position.QUALITY_NOT_AVAILABLE && position.accuracy != Position.QUALITY_LAST_KNOWN) {
|
||||
var accuracy = 0;
|
||||
switch (position.accuracy) {
|
||||
case Position.QUALITY_POOR:
|
||||
accuracy = 500;
|
||||
break;
|
||||
case Position.QUALITY_USABLE:
|
||||
accuracy = 100;
|
||||
break;
|
||||
case Position.QUALITY_GOOD:
|
||||
accuracy = 10;
|
||||
break;
|
||||
}
|
||||
Communications.makeWebRequest(
|
||||
(Properties.getValue("api_url") as Lang.String) + "/webhook/" + (Properties.getValue("webhook_id") as Lang.String),
|
||||
{
|
||||
"type" => "update_sensor_states",
|
||||
"data" => data
|
||||
"type" => "update_location",
|
||||
"data" => {
|
||||
"gps" => position.position.toDegrees(),
|
||||
"gps_accuracy" => accuracy,
|
||||
"speed" => Math.round(position.speed),
|
||||
"course" => Math.round(position.heading * 180 / Math.PI),
|
||||
"altitude" => Math.round(position.altitude),
|
||||
}
|
||||
},
|
||||
{
|
||||
:method => Communications.HTTP_REQUEST_METHOD_POST,
|
||||
@ -141,6 +124,47 @@ class BackgroundServiceDelegate extends System.ServiceDelegate {
|
||||
method(:onReturnBatteryUpdate)
|
||||
);
|
||||
}
|
||||
var data = [
|
||||
{
|
||||
"state" => System.getSystemStats().battery,
|
||||
"type" => "sensor",
|
||||
"unique_id" => "battery_level"
|
||||
},
|
||||
{
|
||||
"state" => System.getSystemStats().charging,
|
||||
"type" => "binary_sensor",
|
||||
"unique_id" => "battery_is_charging"
|
||||
}
|
||||
];
|
||||
if (activity != null) {
|
||||
data.add({
|
||||
"state" => activity,
|
||||
"type" => "sensor",
|
||||
"unique_id" => "activity"
|
||||
});
|
||||
}
|
||||
if (sub_activity != null) {
|
||||
data.add({
|
||||
"state" => sub_activity,
|
||||
"type" => "sensor",
|
||||
"unique_id" => "sub_activity"
|
||||
});
|
||||
}
|
||||
Communications.makeWebRequest(
|
||||
(Properties.getValue("api_url") as Lang.String) + "/webhook/" + (Properties.getValue("webhook_id") as Lang.String),
|
||||
{
|
||||
"type" => "update_sensor_states",
|
||||
"data" => data
|
||||
},
|
||||
{
|
||||
:method => Communications.HTTP_REQUEST_METHOD_POST,
|
||||
:headers => {
|
||||
"Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON
|
||||
},
|
||||
:responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON
|
||||
},
|
||||
method(:onReturnBatteryUpdate)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -27,16 +27,18 @@ using Toybox.Timer;
|
||||
|
||||
(:glance, :background)
|
||||
class HomeAssistantApp extends Application.AppBase {
|
||||
private var mApiStatus as Lang.String or Null;
|
||||
private var mMenuStatus as Lang.String or Null;
|
||||
private var mHaMenu as HomeAssistantView or Null;
|
||||
private var mQuitTimer as QuitTimer or Null;
|
||||
private var mTimer as Timer.Timer or Null;
|
||||
private var mApiStatus as Lang.String or Null;
|
||||
private var mMenuStatus as Lang.String or Null;
|
||||
private var mHaMenu as HomeAssistantView or Null;
|
||||
private var mQuitTimer as QuitTimer or Null;
|
||||
private var mGlanceTimer as Timer.Timer or Null;
|
||||
private var mUpdateTimer as Timer.Timer or Null;
|
||||
// Array initialised by onReturnFetchMenuConfig()
|
||||
private var mItemsToUpdate as Lang.Array<HomeAssistantToggleMenuItem or HomeAssistantTemplateMenuItem> or Null;
|
||||
private var mNextItemToUpdate as Lang.Number = 0; // Index into the above array
|
||||
private var mIsGlance as Lang.Boolean = false;
|
||||
private var mIsApp as Lang.Boolean = false; // Or Widget
|
||||
private var mItemsToUpdate as Lang.Array<HomeAssistantToggleMenuItem or HomeAssistantTemplateMenuItem> or Null;
|
||||
private var mNextItemToUpdate as Lang.Number = 0; // Index into the above array
|
||||
private var mIsGlance as Lang.Boolean = false;
|
||||
private var mIsApp as Lang.Boolean = false; // Or Widget
|
||||
private var mIsInitUpdateCompl as Lang.Boolean = false;
|
||||
|
||||
function initialize() {
|
||||
AppBase.initialize();
|
||||
@ -87,11 +89,11 @@ class HomeAssistantApp extends Application.AppBase {
|
||||
|
||||
// Return the initial view of your application here
|
||||
function getInitialView() as Lang.Array<WatchUi.Views or WatchUi.InputDelegates>? {
|
||||
mIsApp = true;
|
||||
mQuitTimer = new QuitTimer();
|
||||
// RezStrings.update();
|
||||
mApiStatus = WatchUi.loadResource($.Rez.Strings.Checking) as Lang.String;
|
||||
mMenuStatus = WatchUi.loadResource($.Rez.Strings.Checking) as Lang.String;
|
||||
mIsApp = true;
|
||||
mQuitTimer = new QuitTimer();
|
||||
mUpdateTimer = new Timer.Timer();
|
||||
mApiStatus = WatchUi.loadResource($.Rez.Strings.Checking) as Lang.String;
|
||||
mMenuStatus = WatchUi.loadResource($.Rez.Strings.Checking) as Lang.String;
|
||||
Settings.update();
|
||||
|
||||
if (Settings.getApiKey().length() == 0) {
|
||||
@ -203,19 +205,20 @@ class HomeAssistantApp extends Application.AppBase {
|
||||
// asynchronous and affects how the views are managed.
|
||||
(:glance)
|
||||
function fetchMenuConfig() as Lang.Boolean {
|
||||
// System.println("URL = " + Settings.getConfigUrl());
|
||||
if (Settings.getConfigUrl().equals("")) {
|
||||
mMenuStatus = WatchUi.loadResource($.Rez.Strings.Unconfigured) as Lang.String;
|
||||
WatchUi.requestUpdate();
|
||||
} else {
|
||||
var menu = Storage.getValue("menu") as Lang.Dictionary;
|
||||
if (menu != null and Settings.getClearCache()) {
|
||||
if (menu != null and (Settings.getClearCache() || !Settings.getCacheConfig())) {
|
||||
Storage.deleteValue("menu");
|
||||
menu = null;
|
||||
Settings.unsetClearCache();
|
||||
}
|
||||
if (menu == null) {
|
||||
if (! System.getDeviceSettings().phoneConnected) {
|
||||
// System.println("HomeAssistantToggleMenuItem getState(): No Phone connection, skipping API call.");
|
||||
// System.println("HomeAssistantApp getState(): No Phone connection, skipping API call.");
|
||||
if (mIsGlance) {
|
||||
WatchUi.requestUpdate();
|
||||
} else {
|
||||
@ -223,7 +226,7 @@ class HomeAssistantApp extends Application.AppBase {
|
||||
}
|
||||
mMenuStatus = WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String;
|
||||
} else if (! System.getDeviceSettings().connectionAvailable) {
|
||||
// System.println("HomeAssistantToggleMenuItem getState(): No Internet connection, skipping API call.");
|
||||
// System.println("HomeAssistantApp getState(): No Internet connection, skipping API call.");
|
||||
if (mIsGlance) {
|
||||
WatchUi.requestUpdate();
|
||||
} else {
|
||||
@ -256,11 +259,14 @@ class HomeAssistantApp extends Application.AppBase {
|
||||
private function buildMenu(menu as Lang.Dictionary) {
|
||||
mHaMenu = new HomeAssistantView(menu, null);
|
||||
mQuitTimer.begin();
|
||||
}
|
||||
|
||||
function startUpdates() {
|
||||
mItemsToUpdate = mHaMenu.getItemsToUpdate();
|
||||
// Start the continuous update process that continues for as long as the application is running.
|
||||
// The chain of functions from 'updateNextMenuItem()' calls 'updateNextMenuItem()' on completion.
|
||||
if (mItemsToUpdate.size() > 0) {
|
||||
updateNextMenuItem();
|
||||
updateNextMenuItemInternal();
|
||||
}
|
||||
}
|
||||
|
||||
@ -339,7 +345,7 @@ class HomeAssistantApp extends Application.AppBase {
|
||||
WatchUi.requestUpdate();
|
||||
} else {
|
||||
if (! System.getDeviceSettings().phoneConnected) {
|
||||
// System.println("HomeAssistantToggleMenuItem getState(): No Phone connection, skipping API call.");
|
||||
// System.println("HomeAssistantApp getState(): No Phone connection, skipping API call.");
|
||||
mApiStatus = WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String;
|
||||
if (mIsGlance) {
|
||||
WatchUi.requestUpdate();
|
||||
@ -347,7 +353,7 @@ class HomeAssistantApp extends Application.AppBase {
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String + ".");
|
||||
}
|
||||
} else if (! System.getDeviceSettings().connectionAvailable) {
|
||||
// System.println("HomeAssistantToggleMenuItem getState(): No Internet connection, skipping API call.");
|
||||
// System.println("HomeAssistantApp getState(): No Internet connection, skipping API call.");
|
||||
mApiStatus = WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String;
|
||||
if (mIsGlance) {
|
||||
WatchUi.requestUpdate();
|
||||
@ -393,15 +399,46 @@ class HomeAssistantApp extends Application.AppBase {
|
||||
WatchUi.pushView(mHaMenu, new HomeAssistantViewDelegate(true), WatchUi.SLIDE_IMMEDIATE);
|
||||
}
|
||||
|
||||
function updateNextMenuItem() as Void {
|
||||
var delay = Settings.getPollDelay();
|
||||
if (mIsInitUpdateCompl and (delay > 0) and (mNextItemToUpdate == 0)) {
|
||||
mUpdateTimer.start(method(:updateNextMenuItemInternal), delay, false);
|
||||
} else {
|
||||
updateNextMenuItemInternal();
|
||||
}
|
||||
}
|
||||
|
||||
// Only call this function if Settings.getPollDelay() > 0. This must be tested locally as it is then efficient to take
|
||||
// alternative action if the test fails.
|
||||
function forceStatusUpdates() as Void {
|
||||
// Don't mess with updates unless we are using a timer.
|
||||
if (Settings.getPollDelay() > 0) {
|
||||
mUpdateTimer.stop();
|
||||
mIsInitUpdateCompl = false;
|
||||
// Start from the beginning, or we will only get a partial round of updates before mIsInitUpdateCompl is flipped.
|
||||
mNextItemToUpdate = 0;
|
||||
// For immediate updates
|
||||
updateNextMenuItem();
|
||||
}
|
||||
}
|
||||
|
||||
// We need to spread out the API calls so as not to overload the results queue and cause Communications.BLE_QUEUE_FULL
|
||||
// (-101) error. This function is called by a timer every Globals.menuItemUpdateInterval ms.
|
||||
function updateNextMenuItem() as Void {
|
||||
function updateNextMenuItemInternal() as Void {
|
||||
var itu = mItemsToUpdate as Lang.Array<HomeAssistantToggleMenuItem>;
|
||||
if (itu != null) {
|
||||
// System.println("HomeAssistantApp updateNextMenuItemInternal(): Doing update for item " + mNextItemToUpdate + ", mIsInitUpdateCompl=" + mIsInitUpdateCompl);
|
||||
itu[mNextItemToUpdate].getState();
|
||||
mNextItemToUpdate = (mNextItemToUpdate + 1) % itu.size();
|
||||
// mNextItemToUpdate = (mNextItemToUpdate + 1) % itu.size() - But with roll-over detection
|
||||
if (mNextItemToUpdate == itu.size()-1) {
|
||||
// Last item completed return to the start of the list
|
||||
mNextItemToUpdate = 0;
|
||||
mIsInitUpdateCompl = true;
|
||||
} else {
|
||||
mNextItemToUpdate++;
|
||||
}
|
||||
// } else {
|
||||
// System.println("HomeAssistantApp updateNextMenuItem(): No menu items to update");
|
||||
// System.println("HomeAssistantApp updateNextMenuItemInternal(): No menu items to update");
|
||||
}
|
||||
}
|
||||
|
||||
@ -415,13 +452,14 @@ class HomeAssistantApp extends Application.AppBase {
|
||||
mMenuStatus = WatchUi.loadResource($.Rez.Strings.Checking) as Lang.String;
|
||||
updateStatus();
|
||||
Settings.update();
|
||||
mTimer = new Timer.Timer();
|
||||
mTimer.start(method(:updateStatus), Globals.scApiBackoff, true);
|
||||
mGlanceTimer = new Timer.Timer();
|
||||
mGlanceTimer.start(method(:updateStatus), Globals.scApiBackoff, true);
|
||||
return [new HomeAssistantGlanceView(self)];
|
||||
}
|
||||
|
||||
// Required for the Glance update timer.
|
||||
function updateStatus() as Void {
|
||||
mGlanceTimer = null;
|
||||
fetchMenuConfig();
|
||||
fetchApiStatus();
|
||||
}
|
||||
|
@ -80,6 +80,7 @@ class HomeAssistantService {
|
||||
|
||||
case 200:
|
||||
// System.println("HomeAssistantService onReturnCall(): Service executed.");
|
||||
getApp().forceStatusUpdates();
|
||||
var d = data as Lang.Array;
|
||||
var toast = WatchUi.loadResource($.Rez.Strings.Executed) as Lang.String;
|
||||
for(var i = 0; i < d.size(); i++) {
|
||||
|
@ -83,7 +83,7 @@ class HomeAssistantTemplateMenuItem extends WatchUi.IconMenuItem {
|
||||
// Terminate updating the toggle menu items via the chain of calls for a permanent network
|
||||
// error. The ErrorView cancellation will resume the call chain.
|
||||
//
|
||||
function onReturnGetState(responseCode as Lang.Number, data as Lang.String) as Void {
|
||||
function onReturnGetState(responseCode as Lang.Number, data as Null or Lang.Dictionary) as Void {
|
||||
// System.println("HomeAssistantTemplateMenuItem onReturnGetState() Response Code: " + responseCode);
|
||||
// System.println("HomeAssistantTemplateMenuItem onReturnGetState() Response Data: " + data);
|
||||
|
||||
@ -131,7 +131,7 @@ class HomeAssistantTemplateMenuItem extends WatchUi.IconMenuItem {
|
||||
|
||||
case 200:
|
||||
status = WatchUi.loadResource($.Rez.Strings.Available) as Lang.String;
|
||||
setSubLabel(data);
|
||||
setSubLabel(data.get("request"));
|
||||
requestUpdate();
|
||||
// Now this feels very "closely coupled" to the application, but it is the most reliable method instead of using a timer.
|
||||
getApp().updateNextMenuItem();
|
||||
@ -153,19 +153,28 @@ class HomeAssistantTemplateMenuItem extends WatchUi.IconMenuItem {
|
||||
// System.println("HomeAssistantTemplateMenuItem getState(): No Internet connection, skipping API call.");
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoInternet) as Lang.String + ".");
|
||||
getApp().setApiStatus(WatchUi.loadResource($.Rez.Strings.Unavailable) as Lang.String);
|
||||
} else if (Settings.getWebhookId().equals("")) {
|
||||
getApp().updateNextMenuItem();
|
||||
} else {
|
||||
var url = Settings.getApiUrl() + "/template";
|
||||
// https://developers.home-assistant.io/docs/api/native-app-integration/sending-data/#render-templates
|
||||
var url = Settings.getApiUrl() + "/webhook/" + Settings.getWebhookId();
|
||||
// System.println("HomeAssistantTemplateMenuItem getState() URL=" + url + ", Template='" + mTemplate + "'");
|
||||
Communications.makeWebRequest(
|
||||
url,
|
||||
{ "template" => mTemplate },
|
||||
{
|
||||
:method => Communications.HTTP_REQUEST_METHOD_POST,
|
||||
:headers => {
|
||||
"Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON,
|
||||
"Authorization" => "Bearer " + Settings.getApiKey()
|
||||
"type" => "render_template",
|
||||
"data" => {
|
||||
"request" => {
|
||||
"template" => mTemplate
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
:method => Communications.HTTP_REQUEST_METHOD_POST,
|
||||
:headers => {
|
||||
"Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON
|
||||
},
|
||||
:responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_TEXT_PLAIN
|
||||
:responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON
|
||||
},
|
||||
method(:onReturnGetState)
|
||||
);
|
||||
|
@ -196,6 +196,8 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem {
|
||||
break;
|
||||
|
||||
case 200:
|
||||
// System.println("HomeAssistantToggleMenuItem onReturnSetState(): Service executed.");
|
||||
getApp().forceStatusUpdates();
|
||||
var state;
|
||||
var d = data as Lang.Array;
|
||||
for(var i = 0; i < d.size(); i++) {
|
||||
|
@ -36,9 +36,10 @@ class Settings {
|
||||
private static var mClearCache as Lang.Boolean = false;
|
||||
private static var mVibrate as Lang.Boolean = false;
|
||||
private static var mAppTimeout as Lang.Number = 0; // seconds
|
||||
private static var mPollDelay as Lang.Number = 0; // seconds
|
||||
private static var mConfirmTimeout as Lang.Number = 3; // seconds
|
||||
private static var mMenuAlignment as Lang.Number = WatchUi.MenuItem.MENU_ITEM_LABEL_ALIGN_LEFT;
|
||||
private static var mIsBatteryLevelEnabled as Lang.Boolean = false;
|
||||
private static var mIsSensorsLevelEnabled as Lang.Boolean = false;
|
||||
private static var mBatteryRefreshRate as Lang.Number = 15; // minutes
|
||||
private static var mIsApp as Lang.Boolean = false;
|
||||
private static var mHasService as Lang.Boolean = false;
|
||||
@ -56,9 +57,10 @@ class Settings {
|
||||
mClearCache = Properties.getValue("clear_cache");
|
||||
mVibrate = Properties.getValue("enable_vibration");
|
||||
mAppTimeout = Properties.getValue("app_timeout");
|
||||
mPollDelay = Properties.getValue("poll_delay");
|
||||
mConfirmTimeout = Properties.getValue("confirm_timeout");
|
||||
mMenuAlignment = Properties.getValue("menu_alignment");
|
||||
mIsBatteryLevelEnabled = Properties.getValue("enable_battery_level");
|
||||
mIsSensorsLevelEnabled = Properties.getValue("enable_battery_level");
|
||||
mBatteryRefreshRate = Properties.getValue("battery_level_refresh_rate");
|
||||
|
||||
if (System has :ServiceDelegate) {
|
||||
@ -67,19 +69,42 @@ class Settings {
|
||||
|
||||
// Manage this inside the application or widget only (not a glance or background service process)
|
||||
if (mIsApp) {
|
||||
if (mIsBatteryLevelEnabled and mHasService) {
|
||||
if (mHasService) {
|
||||
mWebhookManager = new WebhookManager();
|
||||
if (getWebhookId().equals("")) {
|
||||
mWebhookManager = new WebhookManager();
|
||||
// System.println("Settings update(): Doing full webhook & sensor creation.");
|
||||
mWebhookManager.requestWebhookId();
|
||||
} else {
|
||||
// System.println("Settings update(): Doing just sensor creation.");
|
||||
// We already have a Webhook ID, so just enable or disable the sensor in Home Assistant.
|
||||
// Its a multiple step process, hence starting at step 0.
|
||||
mWebhookManager.registerWebhookSensor({
|
||||
"device_class" => "battery",
|
||||
"name" => "Battery Level",
|
||||
"state" => System.getSystemStats().battery,
|
||||
"type" => "sensor",
|
||||
"unique_id" => "battery_level",
|
||||
"unit_of_measurement" => "%",
|
||||
"state_class" => "measurement",
|
||||
"entity_category" => "diagnostic",
|
||||
"disabled" => !Settings.isSensorsLevelEnabled()
|
||||
}, 0);
|
||||
}
|
||||
if ((Background.getTemporalEventRegisteredTime() == null) or
|
||||
(Background.getTemporalEventRegisteredTime() != (mBatteryRefreshRate * 60))) {
|
||||
Background.registerForTemporalEvent(new Time.Duration(mBatteryRefreshRate * 60)); // Convert to seconds
|
||||
if (mIsSensorsLevelEnabled) {
|
||||
// Create the timed activity
|
||||
if ((Background.getTemporalEventRegisteredTime() == null) or
|
||||
(Background.getTemporalEventRegisteredTime() != (mBatteryRefreshRate * 60))) {
|
||||
Background.registerForTemporalEvent(new Time.Duration(mBatteryRefreshRate * 60)); // Convert to seconds
|
||||
Background.registerForActivityCompletedEvent();
|
||||
}
|
||||
} else if (Background.getTemporalEventRegisteredTime() != null) {
|
||||
Background.deleteTemporalEvent();
|
||||
Background.deleteActivityCompletedEvent();
|
||||
}
|
||||
} else {
|
||||
// Explicitly disable the background event which persists when the application closes.
|
||||
// If !mHasService disable the Settings option as user feedback
|
||||
unsetIsBatteryLevelEnabled();
|
||||
unsetIsSensorsLevelEnabled();
|
||||
unsetWebhookId();
|
||||
}
|
||||
}
|
||||
@ -138,6 +163,10 @@ class Settings {
|
||||
return mAppTimeout * 1000; // Convert to milliseconds
|
||||
}
|
||||
|
||||
static function getPollDelay() as Lang.Number {
|
||||
return mPollDelay * 1000; // Convert to milliseconds
|
||||
}
|
||||
|
||||
static function getConfirmTimeout() as Lang.Number {
|
||||
return mConfirmTimeout * 1000; // Convert to milliseconds
|
||||
}
|
||||
@ -146,11 +175,17 @@ class Settings {
|
||||
return mMenuAlignment; // Either WatchUi.MenuItem.MENU_ITEM_LABEL_ALIGN_RIGHT or WatchUi.MenuItem.MENU_ITEM_LABEL_ALIGN_LEFT
|
||||
}
|
||||
|
||||
static function unsetIsBatteryLevelEnabled() {
|
||||
mIsBatteryLevelEnabled = false;
|
||||
Properties.setValue("enable_battery_level", mIsBatteryLevelEnabled);
|
||||
static function isSensorsLevelEnabled() as Lang.Boolean {
|
||||
return mIsSensorsLevelEnabled;
|
||||
}
|
||||
|
||||
static function unsetIsSensorsLevelEnabled() {
|
||||
mIsSensorsLevelEnabled = false;
|
||||
Properties.setValue("enable_battery_level", mIsSensorsLevelEnabled);
|
||||
if (mHasService and (Background.getTemporalEventRegisteredTime() != null)) {
|
||||
Background.deleteTemporalEvent();
|
||||
Background.deleteActivityCompletedEvent();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -24,6 +24,7 @@
|
||||
using Toybox.Lang;
|
||||
using Toybox.Communications;
|
||||
using Toybox.System;
|
||||
using Toybox.WatchUi;
|
||||
|
||||
// Can use push view so must never be run in a glance context
|
||||
class WebhookManager {
|
||||
@ -52,13 +53,13 @@ class WebhookManager {
|
||||
break;
|
||||
case Communications.INVALID_HTTP_BODY_IN_NETWORK_RESPONSE:
|
||||
// System.println("WebhookManager onReturnRequestWebhookId() Response Code: INVALID_HTTP_BODY_IN_NETWORK_RESPONSE, check JSON is returned.");
|
||||
Settings.unsetIsBatteryLevelEnabled();
|
||||
Settings.unsetIsSensorsLevelEnabled();
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + WatchUi.loadResource($.Rez.Strings.NoJson) as Lang.String);
|
||||
break;
|
||||
|
||||
case 404:
|
||||
// System.println("WebhookManager onReturnRequestWebhookId() Response Code: 404, page not found. Check API URL setting.");
|
||||
Settings.unsetIsBatteryLevelEnabled();
|
||||
Settings.unsetIsSensorsLevelEnabled();
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + WatchUi.loadResource($.Rez.Strings.ApiUrlNotFound) as Lang.String);
|
||||
break;
|
||||
|
||||
@ -77,25 +78,25 @@ class WebhookManager {
|
||||
"unit_of_measurement" => "%",
|
||||
"state_class" => "measurement",
|
||||
"entity_category" => "diagnostic",
|
||||
"disabled" => false
|
||||
"disabled" => !Settings.isSensorsLevelEnabled()
|
||||
}, 0);
|
||||
} else {
|
||||
// System.println("WebhookManager onReturnRequestWebhookId(): No webhook id in response data.");
|
||||
Settings.unsetIsBatteryLevelEnabled();
|
||||
Settings.unsetIsSensorsLevelEnabled();
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
// System.println("WebhookManager onReturnRequestWebhookId(): Unhandled HTTP response code = " + responseCode);
|
||||
Settings.unsetIsBatteryLevelEnabled();
|
||||
Settings.unsetIsSensorsLevelEnabled();
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + WatchUi.loadResource($.Rez.Strings.UnhandledHttpErr) as Lang.String + responseCode);
|
||||
}
|
||||
}
|
||||
|
||||
function requestWebhookId() {
|
||||
// System.println("WebhookManager requestWebhookId(): Requesting webhook id");
|
||||
var deviceSettings = System.getDeviceSettings();
|
||||
// System.println("WebhookManager requestWebhookId(): Requesting webhook id for device = " + deviceSettings.uniqueIdentifier);
|
||||
Communications.makeWebRequest(
|
||||
Settings.getApiUrl() + "/mobile_app/registrations",
|
||||
{
|
||||
@ -153,21 +154,24 @@ class WebhookManager {
|
||||
|
||||
case Communications.INVALID_HTTP_BODY_IN_NETWORK_RESPONSE:
|
||||
// System.println("WebhookManager onReturnRegisterWebhookSensor() Response Code: INVALID_HTTP_BODY_IN_NETWORK_RESPONSE, check JSON is returned.");
|
||||
// Webhook ID might have been deleted on Home Assistant server
|
||||
Settings.unsetWebhookId();
|
||||
Settings.unsetIsBatteryLevelEnabled();
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + WatchUi.loadResource($.Rez.Strings.NoJson) as Lang.String);
|
||||
// System.println("WebhookManager onReturnRegisterWebhookSensor(): Webhook ID invalid, going full chain.");
|
||||
requestWebhookId();
|
||||
break;
|
||||
|
||||
case 404:
|
||||
// System.println("WebhookManager onReturnRequestWebhookId() Response Code: 404, page not found. Check API URL setting.");
|
||||
// System.println("WebhookManager onReturnRegisterWebhookSensor() Response Code: 404, page not found. Check API URL setting.");
|
||||
// Webhook ID might have been deleted on Home Assistant server
|
||||
Settings.unsetWebhookId();
|
||||
Settings.unsetIsBatteryLevelEnabled();
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + WatchUi.loadResource($.Rez.Strings.ApiUrlNotFound) as Lang.String);
|
||||
// System.println("WebhookManager onReturnRegisterWebhookSensor(): Webhook ID invalid, going full chain.");
|
||||
requestWebhookId();
|
||||
break;
|
||||
|
||||
case 200:
|
||||
case 201:
|
||||
if ((data.get("success") as Lang.Boolean or Null) != false) {
|
||||
var d = data as Lang.Dictionary;
|
||||
if ((d.get("success") as Lang.Boolean or Null) != false) {
|
||||
// System.println("WebhookManager onReturnRegisterWebhookSensor(): Success");
|
||||
switch (step) {
|
||||
case 0:
|
||||
@ -179,7 +183,7 @@ class WebhookManager {
|
||||
"type" => "binary_sensor",
|
||||
"unique_id" => "battery_is_charging",
|
||||
"entity_category" => "diagnostic",
|
||||
"disabled" => false
|
||||
"disabled" => !Settings.isSensorsLevelEnabled()
|
||||
}, 1);
|
||||
break;
|
||||
case 1:
|
||||
@ -198,12 +202,12 @@ class WebhookManager {
|
||||
"state" => activity,
|
||||
"type" => "sensor",
|
||||
"unique_id" => "activity",
|
||||
"disabled" => false
|
||||
"disabled" => !Settings.isSensorsLevelEnabled()
|
||||
}, 2);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
// System.println("WebhookManager onReturnRegisterWebhookSensor(): Registering next sensor: Activity");
|
||||
// System.println("WebhookManager onReturnRegisterWebhookSensor(): Registering next sensor: Sub-Activity");
|
||||
if (Activity has :getProfileInfo) {
|
||||
var sub_activity = Activity.getProfileInfo().subSport;
|
||||
if ((Activity.getActivityInfo() != null) and
|
||||
@ -218,16 +222,18 @@ class WebhookManager {
|
||||
"state" => sub_activity,
|
||||
"type" => "sensor",
|
||||
"unique_id" => "sub_activity",
|
||||
"disabled" => false
|
||||
"disabled" => !Settings.isSensorsLevelEnabled()
|
||||
}, 3);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
getApp().startUpdates();
|
||||
default:
|
||||
}
|
||||
} else {
|
||||
// System.println("WebhookManager onReturnRegisterWebhookSensor(): Failure");
|
||||
Settings.unsetWebhookId();
|
||||
Settings.unsetIsBatteryLevelEnabled();
|
||||
Settings.unsetIsSensorsLevelEnabled();
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String);
|
||||
}
|
||||
break;
|
||||
@ -235,15 +241,18 @@ class WebhookManager {
|
||||
default:
|
||||
// System.println("WebhookManager onReturnRequestWebhookId(): Unhandled HTTP response code = " + responseCode);
|
||||
Settings.unsetWebhookId();
|
||||
Settings.unsetIsBatteryLevelEnabled();
|
||||
Settings.unsetIsSensorsLevelEnabled();
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + WatchUi.loadResource($.Rez.Strings.UnhandledHttpErr) as Lang.String + responseCode);
|
||||
}
|
||||
}
|
||||
|
||||
function registerWebhookSensor(sensor as Lang.Object, step as Lang.Number) {
|
||||
var url = Settings.getApiUrl() + "/webhook/" + Settings.getWebhookId();
|
||||
// System.println("WebhookManager registerWebhookSensor(): Registering webhook sensor: " + sensor.toString());
|
||||
// System.println("WebhookManager registerWebhookSensor(): URL=" + url);
|
||||
// https://developers.home-assistant.io/docs/api/native-app-integration/sensors/#registering-a-sensor
|
||||
Communications.makeWebRequest(
|
||||
Settings.getApiUrl() + "/webhook/" + Settings.getWebhookId(),
|
||||
url,
|
||||
{
|
||||
"type" => "register_sensor",
|
||||
"data" => sensor
|
||||
|
Reference in New Issue
Block a user