From 79b3bc6c21bed57c7e9245c95cb68a3fd9e1c979 Mon Sep 17 00:00:00 2001 From: SomeoneOnEarth Date: Fri, 1 Dec 2023 15:36:05 +0100 Subject: [PATCH 01/18] Quick and dirty widget/glance implementation --- manifest.xml | 327 ++++++++++++------------------ source/HomeAssistantApp.mc | 64 +++--- source/HomeAssistantGlanceView.mc | 46 +++++ 3 files changed, 217 insertions(+), 220 deletions(-) create mode 100644 source/HomeAssistantGlanceView.mc diff --git a/manifest.xml b/manifest.xml index 6c011ed..1570e30 100644 --- a/manifest.xml +++ b/manifest.xml @@ -11,17 +11,17 @@ P A Abbey & J D Abbey, 31 October 2023 - Test Application id="98c36259-498a-4458-9cef-74a273ad2bc3" - Live Application id="40131e87-31ff-454b-a8e2-92276ee399d6" + Widget/Glance App id="bf69be91-5833-4d96-92ea-c5f1a9db5dcc" + Test Application id="98c36259-498a-4458-9cef-74a273ad2bc3" + Live Application id="40131e87-31ff-454b-a8e2-92276ee399d6" --> - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ara - bul - zhs - zht - hrv - ces - dan - dut - deu - gre - eng - est - fin - fre - heb - hun - ind - ita - jpn - kor - lav - lit - zsm - nob - pol - por - slo - ron - - slv - spa - swe - tha - tur - ukr - vie - - - - - \ No newline at end of file + + + diff --git a/source/HomeAssistantApp.mc b/source/HomeAssistantApp.mc index dc1651f..cfbc9e8 100644 --- a/source/HomeAssistantApp.mc +++ b/source/HomeAssistantApp.mc @@ -24,24 +24,37 @@ using Toybox.WatchUi; using Toybox.Application.Properties; class HomeAssistantApp extends Application.AppBase { - private var mHaMenu; - private var quitTimer as QuitTimer; - private var strNoApiKey as Lang.String; - private var strNoApiUrl as Lang.String; - private var strNoConfigUrl as Lang.String; - private var strNoPhone as Lang.String; - private var strNoInternet as Lang.String; - private var strNoResponse as Lang.String; - private var strNoMenu as Lang.String; - private var strApiFlood as Lang.String; - private var strConfigUrlNotFound as Lang.String; - private var strUnhandledHttpErr as Lang.String; - private var strTrailingSlashErr as Lang.String; + private var mHaMenu as HomeAssistantView or Null; + private var quitTimer as QuitTimer or Null; + private var strNoApiKey as Lang.String or Null; + private var strNoApiUrl as Lang.String or Null; + private var strNoConfigUrl as Lang.String or Null; + private var strNoPhone as Lang.String or Null; + private var strNoInternet as Lang.String or Null; + private var strNoResponse as Lang.String or Null; + private var strNoMenu as Lang.String or Null; + private var strApiFlood as Lang.String or Null; + private var strConfigUrlNotFound as Lang.String or Null; + private var strUnhandledHttpErr as Lang.String or Null; + private var strTrailingSlashErr as Lang.String or Null; private var mItemsToUpdate; // Array initialised by onReturnFetchMenuConfig() private var mNextItemToUpdate = 0; // Index into the above array function initialize() { AppBase.initialize(); + } + + // onStart() is called on application start up + function onStart(state as Lang.Dictionary?) as Void { + } + + // onStop() is called when your application is exiting + function onStop(state as Lang.Dictionary?) as Void { + } + + // Return the initial view of your application here + function getInitialView() as Lang.Array? { + strNoApiKey = WatchUi.loadResource($.Rez.Strings.NoAPIKey); strNoApiUrl = WatchUi.loadResource($.Rez.Strings.NoApiUrl); strNoConfigUrl = WatchUi.loadResource($.Rez.Strings.NoConfigUrl); @@ -54,20 +67,7 @@ class HomeAssistantApp extends Application.AppBase { strUnhandledHttpErr = WatchUi.loadResource($.Rez.Strings.UnhandledHttpErr); strTrailingSlashErr = WatchUi.loadResource($.Rez.Strings.TrailingSlashErr); quitTimer = new QuitTimer(); - } - // onStart() is called on application start up - function onStart(state as Lang.Dictionary?) as Void { - quitTimer.begin(); - } - - // onStop() is called when your application is exiting - function onStop(state as Lang.Dictionary?) as Void { - quitTimer.stop(); - } - - // Return the initial view of your application here - function getInitialView() as Lang.Array? { var api_url = Properties.getValue("api_url") as Lang.String; if ((Properties.getValue("api_key") as Lang.String).length() == 0) { @@ -100,6 +100,11 @@ class HomeAssistantApp extends Application.AppBase { System.println("HomeAssistantApp fetchMenuConfig(): No Internet connection, skipping API call."); } return [new ErrorView(strNoInternet + "."), new ErrorDelegate()] as Lang.Array; + }else if (mHaMenu != null ){ + // App.getApp().launchInitialView(); + return [mHaMenu, new WatchUi.BehaviorDelegate()] as Lang.Array; + // return mHaMenu.View; + // WatchUi.pushView(mHaMenu, new HomeAssistantViewDelegate(), WatchUi.SLIDE_IMMEDIATE); } else { fetchMenuConfig(); return [new WatchUi.View(), new WatchUi.BehaviorDelegate()] as Lang.Array; @@ -138,7 +143,8 @@ class HomeAssistantApp extends Application.AppBase { WatchUi.pushView(new ErrorView(strConfigUrlNotFound), new ErrorDelegate(), WatchUi.SLIDE_UP); } else if (responseCode == 200) { mHaMenu = new HomeAssistantView(data, null); - WatchUi.switchToView(mHaMenu, new HomeAssistantViewDelegate(), WatchUi.SLIDE_IMMEDIATE); + quitTimer.begin(); + WatchUi.pushView(mHaMenu, new HomeAssistantViewDelegate(), WatchUi.SLIDE_IMMEDIATE); 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. @@ -183,6 +189,10 @@ class HomeAssistantApp extends Application.AppBase { return quitTimer; } + (:glance) + function getGlanceView() { + return [new HomeAssistantGlanceView()]; + } } function getApp() as HomeAssistantApp { diff --git a/source/HomeAssistantGlanceView.mc b/source/HomeAssistantGlanceView.mc new file mode 100644 index 0000000..9d2237e --- /dev/null +++ b/source/HomeAssistantGlanceView.mc @@ -0,0 +1,46 @@ +//----------------------------------------------------------------------------------- +// +// Distributed under MIT Licence +// See https://github.com/house-of-abbey/GarminHomeAssistant/blob/main/LICENSE. +// +//----------------------------------------------------------------------------------- +// +// GarminHomeAssistant is a Garmin IQ application written in Monkey C and routinely +// tested on a Venu 2 device. The source code is provided at: +// https://github.com/house-of-abbey/GarminHomeAssistant. +// +// P A Abbey & J D Abbey & SomeoneOnEarth, 23 November 2023 +// +// +// Description: +// +// Application root for GarminHomeAssistant +// +//----------------------------------------------------------------------------------- + +import Toybox.WatchUi; +import Toybox.Graphics; + +(:glance) +class HomeAssistantGlanceView extends WatchUi.GlanceView { + + function initialize() { + GlanceView.initialize(); + } + + function onShow() { + } + + function onHide() { + } + + function onUpdate(dc) { + GlanceView.onUpdate(dc); + + var font = Graphics.FONT_TINY; + var text = "GarminHomeAssistant"; + + dc.setColor(Graphics.COLOR_WHITE, Graphics.COLOR_BLACK); + dc.drawText(0, dc.getHeight() / 2, font, text, Graphics.TEXT_JUSTIFY_LEFT | Graphics.TEXT_JUSTIFY_VCENTER); + } +} From 6bb9d836ac84ef756871283ad9ebc316df4fe71b Mon Sep 17 00:00:00 2001 From: SomeoneOnEarth Date: Tue, 5 Dec 2023 23:59:30 +0100 Subject: [PATCH 02/18] Introducing Loading and Exit View for Widget --- source/HomeAssistantApp.mc | 17 ++++++----- source/RootView.mc | 60 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 7 deletions(-) create mode 100644 source/RootView.mc diff --git a/source/HomeAssistantApp.mc b/source/HomeAssistantApp.mc index cfbc9e8..565ea92 100644 --- a/source/HomeAssistantApp.mc +++ b/source/HomeAssistantApp.mc @@ -100,14 +100,9 @@ class HomeAssistantApp extends Application.AppBase { System.println("HomeAssistantApp fetchMenuConfig(): No Internet connection, skipping API call."); } return [new ErrorView(strNoInternet + "."), new ErrorDelegate()] as Lang.Array; - }else if (mHaMenu != null ){ - // App.getApp().launchInitialView(); - return [mHaMenu, new WatchUi.BehaviorDelegate()] as Lang.Array; - // return mHaMenu.View; - // WatchUi.pushView(mHaMenu, new HomeAssistantViewDelegate(), WatchUi.SLIDE_IMMEDIATE); } else { fetchMenuConfig(); - return [new WatchUi.View(), new WatchUi.BehaviorDelegate()] as Lang.Array; + return [new RootView(self), new RootViewDelegate(self)] as Lang.Array; } } @@ -144,7 +139,7 @@ class HomeAssistantApp extends Application.AppBase { } else if (responseCode == 200) { mHaMenu = new HomeAssistantView(data, null); quitTimer.begin(); - WatchUi.pushView(mHaMenu, new HomeAssistantViewDelegate(), WatchUi.SLIDE_IMMEDIATE); + pushHomeAssistantMenuView(); mItemsToUpdate = mHaMenu.getItemsToUpdate(); // Start the continuous update process that continues for as long as the application is running. // The chain of functions from 'updateNextMenuItem()' calls 'updateNextMenuItem()' on completion. @@ -177,6 +172,14 @@ class HomeAssistantApp extends Application.AppBase { ); } + function homeAssistantMenuIsLoaded() as Lang.Boolean{ + return mHaMenu!=null; + } + + function pushHomeAssistantMenuView(){ + WatchUi.pushView(mHaMenu, new HomeAssistantViewDelegate(), WatchUi.SLIDE_IMMEDIATE); + } + // 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 { diff --git a/source/RootView.mc b/source/RootView.mc new file mode 100644 index 0000000..4a913cd --- /dev/null +++ b/source/RootView.mc @@ -0,0 +1,60 @@ +import Toybox.Graphics; +import Toybox.Lang; +import Toybox.WatchUi; + +class RootView extends WatchUi.View { + + var width,height; + var mApp as HomeAssistantApp; + + function initialize(app as HomeAssistantApp) { + View.initialize(); + mApp=app; + } + + function onLayout(dc as Dc) as Void { + width=dc.getWidth(); + height=dc.getHeight(); + } + + function onUpdate(dc as Dc) as Void { + dc.setColor(Graphics.COLOR_BLACK,Graphics.COLOR_BLACK); + dc.clear(); + dc.setColor(Graphics.COLOR_BLUE,Graphics.COLOR_TRANSPARENT); + if(mApp.homeAssistantMenuIsLoaded()) { + dc.drawText(width/2,height/2,Graphics.FONT_SMALL,"Hit Back to Exit\nTap to stay",Graphics.TEXT_JUSTIFY_CENTER|Graphics.TEXT_JUSTIFY_VCENTER); + } else { + dc.drawText(width/2,height/2,Graphics.FONT_SMALL,"Loading...",Graphics.TEXT_JUSTIFY_CENTER|Graphics.TEXT_JUSTIFY_VCENTER); + } + } +} + +class RootViewDelegate extends WatchUi.BehaviorDelegate { + + var mApp as HomeAssistantApp; + + function initialize(app as HomeAssistantApp ) { + BehaviorDelegate.initialize(); + mApp=app; + } + + public function onTap(evt as ClickEvent) as Boolean { + return backToMainMenu(); + } + + public function onSelect() as Boolean { + return backToMainMenu(); + } + + function onMenu(){ + return backToMainMenu(); + } + + private function backToMainMenu() as Lang.Boolean{ + if(mApp.homeAssistantMenuIsLoaded()){ + mApp.pushHomeAssistantMenuView(); + return true; + } + return false; + } +} From f5095ac97ac44431802cf4761f2d6248b2bce3a2 Mon Sep 17 00:00:00 2001 From: SomeoneOnEarth Date: Wed, 6 Dec 2023 00:51:06 +0100 Subject: [PATCH 03/18] Code cleanups --- source/HomeAssistantApp.mc | 2 +- source/HomeAssistantGlanceView.mc | 12 +++-------- source/RootView.mc | 36 ++++++++++++++++++++++++------- 3 files changed, 32 insertions(+), 18 deletions(-) diff --git a/source/HomeAssistantApp.mc b/source/HomeAssistantApp.mc index 565ea92..7c78723 100644 --- a/source/HomeAssistantApp.mc +++ b/source/HomeAssistantApp.mc @@ -176,7 +176,7 @@ class HomeAssistantApp extends Application.AppBase { return mHaMenu!=null; } - function pushHomeAssistantMenuView(){ + function pushHomeAssistantMenuView() as Void{ WatchUi.pushView(mHaMenu, new HomeAssistantViewDelegate(), WatchUi.SLIDE_IMMEDIATE); } diff --git a/source/HomeAssistantGlanceView.mc b/source/HomeAssistantGlanceView.mc index 9d2237e..f6ab6ec 100644 --- a/source/HomeAssistantGlanceView.mc +++ b/source/HomeAssistantGlanceView.mc @@ -18,8 +18,8 @@ // //----------------------------------------------------------------------------------- -import Toybox.WatchUi; -import Toybox.Graphics; +using Toybox.WatchUi; +using Toybox.Graphics; (:glance) class HomeAssistantGlanceView extends WatchUi.GlanceView { @@ -28,13 +28,7 @@ class HomeAssistantGlanceView extends WatchUi.GlanceView { GlanceView.initialize(); } - function onShow() { - } - - function onHide() { - } - - function onUpdate(dc) { + function onUpdate(dc) as Void { GlanceView.onUpdate(dc); var font = Graphics.FONT_TINY; diff --git a/source/RootView.mc b/source/RootView.mc index 4a913cd..0b1623b 100644 --- a/source/RootView.mc +++ b/source/RootView.mc @@ -1,6 +1,26 @@ -import Toybox.Graphics; -import Toybox.Lang; -import Toybox.WatchUi; +//----------------------------------------------------------------------------------- +// +// Distributed under MIT Licence +// See https://github.com/house-of-abbey/GarminHomeAssistant/blob/main/LICENSE. +// +//----------------------------------------------------------------------------------- +// +// GarminHomeAssistant is a Garmin IQ application written in Monkey C and routinely +// tested on a Venu 2 device. The source code is provided at: +// https://github.com/house-of-abbey/GarminHomeAssistant. +// +// P A Abbey & J D Abbey & SomeoneOnEarth, 5 December 2023 +// +// +// Description: +// +// Application root view for GarminHomeAssistant +// +//----------------------------------------------------------------------------------- + +using Toybox.Graphics; +using Toybox.Lang; +using Toybox.WatchUi; class RootView extends WatchUi.View { @@ -12,12 +32,12 @@ class RootView extends WatchUi.View { mApp=app; } - function onLayout(dc as Dc) as Void { + function onLayout(dc as Graphics.Dc) as Void { width=dc.getWidth(); height=dc.getHeight(); } - function onUpdate(dc as Dc) as Void { + function onUpdate(dc as Graphics.Dc) as Void { dc.setColor(Graphics.COLOR_BLACK,Graphics.COLOR_BLACK); dc.clear(); dc.setColor(Graphics.COLOR_BLUE,Graphics.COLOR_TRANSPARENT); @@ -38,15 +58,15 @@ class RootViewDelegate extends WatchUi.BehaviorDelegate { mApp=app; } - public function onTap(evt as ClickEvent) as Boolean { + function onTap(evt as WatchUi.ClickEvent) as Lang.Boolean { return backToMainMenu(); } - public function onSelect() as Boolean { + function onSelect() as Lang.Boolean { return backToMainMenu(); } - function onMenu(){ + function onMenu() as Lang.Boolean{ return backToMainMenu(); } From 39c77bb284d5cf67c1a4b564889e40bdbb086ce8 Mon Sep 17 00:00:00 2001 From: Philip Abbey Date: Fri, 8 Dec 2023 16:59:45 +0000 Subject: [PATCH 04/18] Update manifest.xml Reversing changes made by saving from the GUI manifest editor. I would like to retain the comments with the watch face properties. --- manifest.xml | 319 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 189 insertions(+), 130 deletions(-) diff --git a/manifest.xml b/manifest.xml index 1570e30..564c85b 100644 --- a/manifest.xml +++ b/manifest.xml @@ -17,7 +17,7 @@ --> - @@ -29,141 +29,200 @@ that belong to the same product category "Monkey C: Edit Products" - Lets you add or remove any product --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - ara - bul - zhs - zht - hrv - ces - dan - dut - deu - gre - eng - est - fin - fre - heb - hun - ind - ita - jpn - kor - lav - lit - zsm - nob - pol - por - slo - ron - slv - spa - swe - tha - tur - ukr - vie - - + slv + spa + swe + tha + tur + ukr + vie + + - - - + + + \ No newline at end of file From 3cc1dd88c3c63905646ac8e45bc8162e277c7815 Mon Sep 17 00:00:00 2001 From: SomeoneOnEarth Date: Tue, 12 Dec 2023 21:24:48 +0100 Subject: [PATCH 05/18] Fix for older API versions --- source/HomeAssistantService.mc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/HomeAssistantService.mc b/source/HomeAssistantService.mc index 2f371a9..3b96d2b 100644 --- a/source/HomeAssistantService.mc +++ b/source/HomeAssistantService.mc @@ -124,7 +124,7 @@ class HomeAssistantService { } WatchUi.pushView(new ErrorView(strNoInternet + "."), new ErrorDelegate(), WatchUi.SLIDE_UP); } else { - var url = (Properties.getValue("api_url") as Lang.String) + "/services/" + service.substring(0, service.find(".")) + "/" + service.substring(service.find(".")+1, null); + var url = (Properties.getValue("api_url") as Lang.String) + "/services/" + service.substring(0, service.find(".")) + "/" + service.substring(service.find(".")+1, service.length()); if (Globals.scDebug) { System.println("HomeAssistantService call() URL=" + url); System.println("HomeAssistantService call() service=" + service); From 9aa32703cc6ef2ab20212a4fc265b03ff34a5f87 Mon Sep 17 00:00:00 2001 From: SomeoneOnEarth Date: Tue, 12 Dec 2023 21:42:02 +0100 Subject: [PATCH 06/18] Directly quit w/o showing RootView (if possible) --- source/HomeAssistantApp.mc | 2 +- source/HomeAssistantView.mc | 20 +++++++++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/source/HomeAssistantApp.mc b/source/HomeAssistantApp.mc index 7c78723..49873c1 100644 --- a/source/HomeAssistantApp.mc +++ b/source/HomeAssistantApp.mc @@ -177,7 +177,7 @@ class HomeAssistantApp extends Application.AppBase { } function pushHomeAssistantMenuView() as Void{ - WatchUi.pushView(mHaMenu, new HomeAssistantViewDelegate(), WatchUi.SLIDE_IMMEDIATE); + WatchUi.pushView(mHaMenu, new HomeAssistantViewDelegate(true), WatchUi.SLIDE_IMMEDIATE); } // We need to spread out the API calls so as not to overload the results queue and cause Communications.BLE_QUEUE_FULL (-101) error. diff --git a/source/HomeAssistantView.mc b/source/HomeAssistantView.mc index 366dcac..c09a42e 100644 --- a/source/HomeAssistantView.mc +++ b/source/HomeAssistantView.mc @@ -21,6 +21,7 @@ using Toybox.Application; using Toybox.Lang; using Toybox.Graphics; +using Toybox.System; using Toybox.WatchUi; class HomeAssistantView extends WatchUi.Menu2 { @@ -103,12 +104,23 @@ class HomeAssistantView extends WatchUi.Menu2 { // class HomeAssistantViewDelegate extends WatchUi.Menu2InputDelegate { - function initialize() { + private var mIsRootMenuView = false; + + function initialize(isRootMenuView as Lang.Boolean) { Menu2InputDelegate.initialize(); + mIsRootMenuView = isRootMenuView; } function onBack() { getApp().getQuitTimer().reset(); + + if (mIsRootMenuView){ + // If its started from glance or as an activity, directly exit the widget/app + // (on widgets without glance, this exit() won`t do anything, + // so the base view will be shown instead, through the popView below this "if body") + System.exit(); + } + WatchUi.popView(WatchUi.SLIDE_RIGHT); } @@ -147,15 +159,13 @@ class HomeAssistantViewDelegate extends WatchUi.Menu2InputDelegate { if (Globals.scDebug) { System.println("Menu: " + haMenuItem.getLabel() + " " + haMenuItem.getId()); } - // No delegate state to be amended, so re-use 'self'. - WatchUi.pushView(haMenuItem.getMenuView(), self, WatchUi.SLIDE_LEFT); + WatchUi.pushView(haMenuItem.getMenuView(), new HomeAssistantViewDelegate(false), WatchUi.SLIDE_LEFT); } else if (item instanceof HomeAssistantViewIconMenuItem) { var haMenuItem = item as HomeAssistantViewIconMenuItem; if (Globals.scDebug) { System.println("IconMenu: " + haMenuItem.getLabel() + " " + haMenuItem.getId()); } - // No delegate state to be amended, so re-use 'self'. - WatchUi.pushView(haMenuItem.getMenuView(), self, WatchUi.SLIDE_LEFT); + WatchUi.pushView(haMenuItem.getMenuView(), new HomeAssistantViewDelegate(false), WatchUi.SLIDE_LEFT); } else { if (Globals.scDebug) { System.println(item.getLabel() + " " + item.getId()); From 5d8c5125ff239b8fc94ced30968b2ed9513a0451 Mon Sep 17 00:00:00 2001 From: SomeoneOnEarth Date: Fri, 15 Dec 2023 01:52:26 +0100 Subject: [PATCH 07/18] Improved initial/exit view texts + add i18n --- resources-ara/strings/strings.xml | 3 +++ resources-bul/strings/strings.xml | 3 +++ resources-ces/strings/strings.xml | 5 ++++- resources-dan/strings/strings.xml | 5 ++++- resources-deu/strings/corrections.xml | 2 ++ resources-deu/strings/strings.xml | 3 +++ resources-dut/strings/strings.xml | 3 +++ resources-est/strings/strings.xml | 5 ++++- resources-fin/strings/strings.xml | 3 +++ resources-fre/strings/strings.xml | 3 +++ resources-gre/strings/strings.xml | 3 +++ resources-heb/strings/strings.xml | 3 +++ resources-hrv/strings/strings.xml | 3 +++ resources-hun/strings/strings.xml | 3 +++ resources-ind/strings/strings.xml | 5 ++++- resources-ita/strings/strings.xml | 3 +++ resources-jpn/strings/strings.xml | 3 +++ resources-kor/strings/strings.xml | 5 ++++- resources-lav/strings/strings.xml | 3 +++ resources-lit/strings/strings.xml | 3 +++ resources-nob/strings/strings.xml | 3 +++ resources-pol/strings/strings.xml | 3 +++ resources-por/strings/strings.xml | 5 ++++- resources-ron/strings/strings.xml | 7 +++++-- resources-slo/strings/strings.xml | 3 +++ resources-slv/strings/strings.xml | 3 +++ resources-spa/strings/strings.xml | 3 +++ resources-swe/strings/strings.xml | 3 +++ resources-tha/strings/strings.xml | 3 +++ resources-tur/strings/strings.xml | 5 ++++- resources-ukr/strings/strings.xml | 5 ++++- resources-vie/strings/strings.xml | 3 +++ resources-zhs/strings/strings.xml | 3 +++ resources-zht/strings/strings.xml | 3 +++ resources-zsm/strings/strings.xml | 3 +++ resources/strings/strings.xml | 3 +++ source/RootView.mc | 16 +++++++++++++--- 37 files changed, 130 insertions(+), 13 deletions(-) diff --git a/resources-ara/strings/strings.xml b/resources-ara/strings/strings.xml index c878246..0826291 100644 --- a/resources-ara/strings/strings.xml +++ b/resources-ara/strings/strings.xml @@ -37,4 +37,7 @@ لم يتم العثور على عنوان URL. خطأ محتمل في عنوان URL للتكوين في الإعدادات. قام طلب HTTP بإرجاع رمز الخطأ = يجب ألا يحتوي عنوان URL لواجهة برمجة التطبيقات على شرطة مائلة لاحقة '/' + جارٍ جلب تكوين القائمة.. + مرّر سريعًا إلى اليمين للخروج\nانقر للبقاء + اضغط على "الرجوع للخروج"\nأدخل للبقاء \ No newline at end of file diff --git a/resources-bul/strings/strings.xml b/resources-bul/strings/strings.xml index 8704b02..a453f82 100644 --- a/resources-bul/strings/strings.xml +++ b/resources-bul/strings/strings.xml @@ -37,4 +37,7 @@ URL не е намерен. Потенциална грешка в URL адреса на конфигурацията в настройките. HTTP заявката върна код на грешка = URL адресът на API не трябва да има наклонена черта '/' в края + Извличане на конфигурацията на менюто.. + Плъзнете надясно, за да излезете\nДокоснете, за да останете + Натиснете Назад, за да излезете\nВлезте, за да останете \ No newline at end of file diff --git a/resources-ces/strings/strings.xml b/resources-ces/strings/strings.xml index 6bc14ee..2c1a731 100644 --- a/resources-ces/strings/strings.xml +++ b/resources-ces/strings/strings.xml @@ -33,8 +33,11 @@ V nastavení aplikace není žádná adresa URL API V nastavení aplikace není žádná konfigurační URL Příliš rychlá volání API. Zpomalte prosím své požadavky. - Adresa URL nenalezena. Potenciální chyba URL API v nastavení. + Adresa URL nenalezena. Potenciální chyba adresy URL rozhraní API v nastavení. Adresa URL nenalezena. Potenciální chyba konfigurační adresy URL v nastavení. Požadavek HTTP vrátil kód chyby = Adresa URL rozhraní API nesmí mít koncové lomítko „/“ + Načítání konfigurace nabídky... + Přejetím prstem doprava ukončíte\nKlepnutím zůstanete + Stisknutím Zpět ukončíte\nVstupte a zůstanete \ No newline at end of file diff --git a/resources-dan/strings/strings.xml b/resources-dan/strings/strings.xml index 066d3a4..c7035b6 100644 --- a/resources-dan/strings/strings.xml +++ b/resources-dan/strings/strings.xml @@ -28,7 +28,7 @@ Ingen telefonforbindelse Ingen internetforbindelse Intet svar, tjek internetforbindelse - Fejl ved menuhentning + Menuhentningsfejl Ingen API-nøgle i applikationsindstillingerne Ingen API-URL i applikationsindstillingerne Ingen konfigurations-URL i applikationsindstillingerne @@ -37,4 +37,7 @@ URL ikke fundet. Potentiel konfigurations-URL-fejl i indstillinger. HTTP-anmodning returnerede fejlkode = API URL må ikke have en efterfølgende skråstreg '/' + Henter menukonfiguration.. + Stryg til højre for at afslutte\nTryk for at blive + Tryk på Tilbage for at afslutte\nEnter for at blive \ No newline at end of file diff --git a/resources-deu/strings/corrections.xml b/resources-deu/strings/corrections.xml index 8d8810c..b2d307c 100644 --- a/resources-deu/strings/corrections.xml +++ b/resources-deu/strings/corrections.xml @@ -22,4 +22,6 @@ Antippen Menü Die HTTP-Anfrage gab folgenden Fehlercode zurück = + Zum Beenden nach rechts swipen\nZum Bleiben antippen + Drücke „Zurück“, um zu Beenden.\n„Enter“, um zu bleiben diff --git a/resources-deu/strings/strings.xml b/resources-deu/strings/strings.xml index a5628c4..79352e4 100644 --- a/resources-deu/strings/strings.xml +++ b/resources-deu/strings/strings.xml @@ -37,4 +37,7 @@ URL nicht gefunden. Möglicher Konfigurations-URL-Fehler in den Einstellungen. Die HTTP-Anfrage gab folgenden Fehlercode zurück = Die API-URL darf keinen abschließenden Schrägstrich „/“ enthalten. + Menükonfiguration abrufen. + Zum Verlassen nach rechts wischen\nZum Bleiben tippen + Klicken Sie auf „Zurück“, um den Ausgang zu verlassen.\nEintreten, um zu bleiben \ No newline at end of file diff --git a/resources-dut/strings/strings.xml b/resources-dut/strings/strings.xml index e3867ed..7c2b07f 100644 --- a/resources-dut/strings/strings.xml +++ b/resources-dut/strings/strings.xml @@ -37,4 +37,7 @@ URL niet gevonden. Mogelijke configuratie-URL-fout in de instellingen. HTTP-verzoek retourneerde foutcode = API-URL mag geen afsluitende slash '/' bevatten + Menuconfiguratie ophalen.. + Veeg naar rechts om af te sluiten\nTik om te blijven + Druk op Terug om af te sluiten\nEnter om te blijven \ No newline at end of file diff --git a/resources-est/strings/strings.xml b/resources-est/strings/strings.xml index 61f1886..51741ed 100644 --- a/resources-est/strings/strings.xml +++ b/resources-est/strings/strings.xml @@ -32,9 +32,12 @@ Rakenduse seadetes pole API-võtit Rakenduse seadetes pole API URL-i Rakenduse seadetes pole konfiguratsiooni URL-i - API-kutsed liiga kiired. Palun aeglustage oma taotlusi. + API-kutsed liiga kiired. Palun aeglustage taotluste esitamist. URL-i ei leitud. Võimalik API URL-i viga seadetes. URL-i ei leitud. Võimalik konfiguratsiooni URL-i viga seadetes. HTTP päring tagastas veakoodi = API URL-i lõpus ei tohi olla kaldkriipsu „/” + Menüü konfiguratsiooni toomine... + Väljumiseks pühkige paremale\nPuudutage, et jääda + Väljumiseks vajutage Tagasi\nSisestage, et jääda \ No newline at end of file diff --git a/resources-fin/strings/strings.xml b/resources-fin/strings/strings.xml index 93fd3b8..57238eb 100644 --- a/resources-fin/strings/strings.xml +++ b/resources-fin/strings/strings.xml @@ -37,4 +37,7 @@ URL-osoitetta ei löydy. Mahdollinen konfigurointi-URL-virhe asetuksissa. HTTP-pyyntö palautti virhekoodin = API-URL-osoitteessa ei saa olla perässä olevaa kauttaviivaa '/' + Haetaan valikon asetuksia... + Poistu pyyhkäisemällä oikealle\nPysy napauttamalla + Poistu painamalla Takaisin\nSyötä jäädäksesi \ No newline at end of file diff --git a/resources-fre/strings/strings.xml b/resources-fre/strings/strings.xml index 71dabe2..b8bc3f6 100644 --- a/resources-fre/strings/strings.xml +++ b/resources-fre/strings/strings.xml @@ -37,4 +37,7 @@ URL introuvable. Erreur potentielle d'URL de configuration dans les paramètres. La requête HTTP a renvoyé un code d'erreur = L'URL de l'API ne doit pas comporter de barre oblique finale '/' + Récupération de la configuration du menu. + Balayez vers la droite pour quitter\nAppuyez pour rester + Appuyez sur Retour pour quitter\nEntrez pour rester \ No newline at end of file diff --git a/resources-gre/strings/strings.xml b/resources-gre/strings/strings.xml index 965adae..2148f84 100644 --- a/resources-gre/strings/strings.xml +++ b/resources-gre/strings/strings.xml @@ -37,4 +37,7 @@ Η διεύθυνση URL δεν βρέθηκε. Πιθανό σφάλμα διεύθυνσης URL διαμόρφωσης στις ρυθμίσεις. Το αίτημα HTTP επέστρεψε κωδικό σφάλματος = Η διεύθυνση URL του API δεν πρέπει να έχει τελική κάθετο "/" + Ανάκτηση παραμέτρων μενού.. + Σύρετε προς τα δεξιά για έξοδο\nΠατήστε για να μείνετε + Πατήστε Επιστροφή για Έξοδος\nEnter για να μείνετε \ No newline at end of file diff --git a/resources-heb/strings/strings.xml b/resources-heb/strings/strings.xml index ff5d53c..8c72f00 100644 --- a/resources-heb/strings/strings.xml +++ b/resources-heb/strings/strings.xml @@ -37,4 +37,7 @@ כתובת האתר לא נמצאה. שגיאת כתובת אתר פוטנציאלית של תצורה בהגדרות. בקשת HTTP החזירה קוד שגיאה = כתובת ה-API לא חייבת לכלול לוכסן אחורי '/' + מביא את תצורת התפריט... + החלק ימינה כדי לצאת\nהקש כדי להישאר + לחץ על חזרה ליציאה\nEnter כדי להישאר \ No newline at end of file diff --git a/resources-hrv/strings/strings.xml b/resources-hrv/strings/strings.xml index f146d63..e2eaa6a 100644 --- a/resources-hrv/strings/strings.xml +++ b/resources-hrv/strings/strings.xml @@ -37,4 +37,7 @@ URL nije pronađen. Potencijalna pogreška URL-a konfiguracije u postavkama. HTTP zahtjev vratio je kod greške = API URL ne smije imati kosu crtu na kraju '/' + Dohvaćanje konfiguracije izbornika.. + Prijeđite prstom udesno za izlaz\nDodirnite za ostanak + Pritisnite Natrag za izlaz\nUnesite za ostanak \ No newline at end of file diff --git a/resources-hun/strings/strings.xml b/resources-hun/strings/strings.xml index 82d7395..fffc5c7 100644 --- a/resources-hun/strings/strings.xml +++ b/resources-hun/strings/strings.xml @@ -37,4 +37,7 @@ Az URL nem található. Lehetséges konfigurációs URL hiba a beállításokban. A HTTP-kérés = hibakódot adott vissza Az API URL-ben nem lehet perjel a „/” + Menükonfiguráció lekérése... + Csúsztassa jobbra a kilépéshez.\nKoppintson a Maradáshoz + Nyomja meg a Vissza gombot a kilépéshez\nEnter a Maradáshoz \ No newline at end of file diff --git a/resources-ind/strings/strings.xml b/resources-ind/strings/strings.xml index a4ab5c5..363cffd 100644 --- a/resources-ind/strings/strings.xml +++ b/resources-ind/strings/strings.xml @@ -31,10 +31,13 @@ Kesalahan Pengambilan Menu Tidak ada kunci API di pengaturan aplikasi Tidak ada URL API di pengaturan aplikasi - Tidak ada URL konfigurasi dalam pengaturan aplikasi + Tidak ada URL konfigurasi di pengaturan aplikasi Panggilan API terlalu cepat. Harap memperlambat permintaan Anda. URL tidak ditemukan. Potensi kesalahan URL API dalam pengaturan. URL tidak ditemukan. Potensi kesalahan URL Konfigurasi dalam pengaturan. Permintaan HTTP mengembalikan kode kesalahan = URL API tidak boleh memiliki garis miring '/' + Mengambil Konfigurasi Menu.. + Geser ke Kanan untuk Keluar\nKetuk untuk Tetap + Tekan Kembali untuk Keluar\nMasuk untuk Tetap \ No newline at end of file diff --git a/resources-ita/strings/strings.xml b/resources-ita/strings/strings.xml index 57fd138..4424a87 100644 --- a/resources-ita/strings/strings.xml +++ b/resources-ita/strings/strings.xml @@ -37,4 +37,7 @@ URL non trovato. Potenziale errore dell'URL di configurazione nelle impostazioni. La richiesta HTTP ha restituito il codice di errore = L'URL dell'API non deve avere una barra finale "/" + Recupero configurazione menu.. + Scorri verso destra per uscire\nTocca per restare + Premi Indietro per uscire\nInvio per restare \ No newline at end of file diff --git a/resources-jpn/strings/strings.xml b/resources-jpn/strings/strings.xml index cfbbcae..4beea76 100644 --- a/resources-jpn/strings/strings.xml +++ b/resources-jpn/strings/strings.xml @@ -37,4 +37,7 @@ URLが見つかりません。設定内の構成 URL エラーの可能性があります。 HTTP リクエストがエラー コードを返しました = API URL の末尾にスラッシュ「/」を含めることはできません + メニュー構成を取得しています。 + 右にスワイプして終了\nタップしてそのまま残ります + 終了するには戻るキーを押してください\n続行するには Enter キーを押してください \ No newline at end of file diff --git a/resources-kor/strings/strings.xml b/resources-kor/strings/strings.xml index b696aad..95fa108 100644 --- a/resources-kor/strings/strings.xml +++ b/resources-kor/strings/strings.xml @@ -36,5 +36,8 @@ URL을 찾을 수 없습니다. 설정에 잠재적인 API URL 오류가 있습니다. URL을 찾을 수 없습니다. 설정에 잠재적인 구성 URL 오류가 있습니다. HTTP 요청이 오류 코드를 반환했습니다 = - API URL에는 후행 슬래시 '/'가 없어야 합니다. + API URL에는 후행 슬래시 '/'가 있어서는 안 됩니다. + 메뉴 구성을 가져오는 중.. + 종료하려면 오른쪽으로 스와이프하세요.\n계속 유지하려면 탭하세요. + 종료하려면 뒤로 버튼을 누르세요.\n계속하려면 입력하세요. \ No newline at end of file diff --git a/resources-lav/strings/strings.xml b/resources-lav/strings/strings.xml index c4310f5..fc32111 100644 --- a/resources-lav/strings/strings.xml +++ b/resources-lav/strings/strings.xml @@ -37,4 +37,7 @@ URL nav atrasts. Iespējama konfigurācijas URL kļūda iestatījumos. HTTP pieprasījums atgrieza kļūdas kodu = API URL beigās nedrīkst būt slīpsvītra “/” + Notiek izvēlnes konfigurācijas iegūšana... + Lai izietu, velciet pa labi\nPieskarieties, lai paliktu + Noklikšķiniet uz Atpakaļ, lai izietu.\nIevadiet, lai paliktu \ No newline at end of file diff --git a/resources-lit/strings/strings.xml b/resources-lit/strings/strings.xml index 0a226a7..27f6530 100644 --- a/resources-lit/strings/strings.xml +++ b/resources-lit/strings/strings.xml @@ -37,4 +37,7 @@ URL nerastas. Galima konfigūracijos URL klaida nustatymuose. HTTP užklausa grąžino klaidos kodą = API URL pabaigoje negali būti pasvirojo brūkšnio „/“ + Gaunama meniu konfigūracija... + Norėdami išeiti, braukite į dešinę\nPalieskite, kad pasiliktumėte + Norėdami išeiti, paspauskite „Atgal“.\nĮveskite, kad pasiliktumėte \ No newline at end of file diff --git a/resources-nob/strings/strings.xml b/resources-nob/strings/strings.xml index f05d71c..dbd376d 100644 --- a/resources-nob/strings/strings.xml +++ b/resources-nob/strings/strings.xml @@ -37,4 +37,7 @@ Finner ikke URL. Potensiell konfigurasjons-URL-feil i innstillingene. HTTP-forespørsel returnerte feilkode = API URL må ikke ha en etterfølgende skråstrek '/' + Henter menykonfigurasjon.. + Sveip til høyre for å avslutte\nTrykk for å bli + Trykk Tilbake for å avslutte\nEnter for å bli \ No newline at end of file diff --git a/resources-pol/strings/strings.xml b/resources-pol/strings/strings.xml index 68e9eaf..3443b5c 100644 --- a/resources-pol/strings/strings.xml +++ b/resources-pol/strings/strings.xml @@ -37,4 +37,7 @@ Nie znaleziono adresu URL. Potencjalny błąd adresu URL konfiguracji w ustawieniach. Żądanie HTTP zwróciło kod błędu = Adres URL interfejsu API nie może zawierać końcowego ukośnika „/” + Pobieranie konfiguracji menu.. + Przesuń w prawo, aby wyjść\nDotknij, aby pozostać + Naciśnij Wstecz, aby wyjść\nEnter, aby pozostać \ No newline at end of file diff --git a/resources-por/strings/strings.xml b/resources-por/strings/strings.xml index f564fbb..40db94e 100644 --- a/resources-por/strings/strings.xml +++ b/resources-por/strings/strings.xml @@ -32,9 +32,12 @@ Nenhuma chave de API nas configurações do aplicativo Nenhum URL de API nas configurações do aplicativo Nenhum URL de configuração nas configurações do aplicativo - Chamadas de API muito rápidas. Por favor, desacelere seus pedidos. + Chamadas de API muito rápidas. Por favor, diminua a velocidade de seus pedidos. URL não encontrado. Possível erro de URL da API nas configurações. URL não encontrado. Possível erro de URL de configuração nas configurações. Solicitação HTTP retornou código de erro = O URL da API não deve ter uma barra final '/' + Buscando configuração do menu.. + Deslize para a direita para sair\nToque para permanecer + Volte para sair\nEntre para ficar \ No newline at end of file diff --git a/resources-ron/strings/strings.xml b/resources-ron/strings/strings.xml index df5ab8f..a7f9c4d 100644 --- a/resources-ron/strings/strings.xml +++ b/resources-ron/strings/strings.xml @@ -21,7 +21,7 @@ HomeAssistant Pe - Oprit + Off Atingeți Meniul Sigur? @@ -32,9 +32,12 @@ Nicio cheie API în setările aplicației Nicio adresă URL API în setările aplicației Nicio adresă URL de configurare în setările aplicației - Apeluri API prea rapide. Vă rugăm să vă încetiniți solicitările. + Apeluri API prea rapide. Vă rugăm să încetiniți cererile dvs. Adresa URL nu a fost găsită. Potențială eroare URL API în setări. Adresa URL nu a fost găsită. Potențială eroare URL de configurare în setări. Solicitarea HTTP a returnat codul de eroare = Adresa URL API nu trebuie să aibă o bară oblică „/” + Se preiau configurarea meniului... + Glisați spre dreapta pentru a ieși\nAtingeți pentru a rămâne + Apăsați Înapoi pentru a ieși\nIntră pentru a rămâne \ No newline at end of file diff --git a/resources-slo/strings/strings.xml b/resources-slo/strings/strings.xml index 036c04b..fe1b0a9 100644 --- a/resources-slo/strings/strings.xml +++ b/resources-slo/strings/strings.xml @@ -37,4 +37,7 @@ Adresa URL sa nenašla. Potenciálna chyba konfiguračnej adresy URL v nastaveniach. Požiadavka HTTP vrátila kód chyby = Adresa URL rozhrania API nesmie obsahovať koncovú lomku „/“ + Načítava sa konfigurácia ponuky... + Ukončite prejdením prstom doprava\nKlepnutím zostanete + Stlačte Späť na ukončenie\nVstúpte a zostaňte \ No newline at end of file diff --git a/resources-slv/strings/strings.xml b/resources-slv/strings/strings.xml index 55ae72d..b227f93 100644 --- a/resources-slv/strings/strings.xml +++ b/resources-slv/strings/strings.xml @@ -37,4 +37,7 @@ URL-ja ni bilo mogoče najti. Morebitna napaka URL-ja konfiguracije v nastavitvah. Zahteva HTTP je vrnila kodo napake = URL API-ja ne sme imeti končne poševnice '/' + Pridobivanje konfiguracije menija.. + Povlecite v desno za izhod\nDotaknite se, da ostanete + Pritisnite Nazaj za izhod\nVstopite, da ostanete \ No newline at end of file diff --git a/resources-spa/strings/strings.xml b/resources-spa/strings/strings.xml index 5d5397a..7f06793 100644 --- a/resources-spa/strings/strings.xml +++ b/resources-spa/strings/strings.xml @@ -37,4 +37,7 @@ URL no encontrada. Posible error de URL de configuración en la configuración. La solicitud HTTP devolvió el código de error = La URL de API no debe tener una barra diagonal '/' + Obteniendo configuración del menú.. + Desliza hacia la derecha para salir\nToca para permanecer + Presione Atrás para salir\nEntrar para permanecer \ No newline at end of file diff --git a/resources-swe/strings/strings.xml b/resources-swe/strings/strings.xml index 8daf71f..cbf3281 100644 --- a/resources-swe/strings/strings.xml +++ b/resources-swe/strings/strings.xml @@ -37,4 +37,7 @@ Webbadressen hittades inte. Potentiellt konfigurations-URL-fel i inställningarna. HTTP-begäran returnerade felkod = API-URL får inte ha ett snedstreck '/' + Hämtar menykonfiguration.. + Svep åt höger för att avsluta\nKnacka för att stanna + Tryck på Tillbaka för att avsluta\nEnter för att stanna \ No newline at end of file diff --git a/resources-tha/strings/strings.xml b/resources-tha/strings/strings.xml index c1e8db1..be930a6 100644 --- a/resources-tha/strings/strings.xml +++ b/resources-tha/strings/strings.xml @@ -37,4 +37,7 @@ ไม่พบ URL ข้อผิดพลาด URL การกำหนดค่าที่อาจเกิดขึ้นในการตั้งค่า คำขอ HTTP ส่งคืนรหัสข้อผิดพลาด = URL ของ API ต้องไม่มีเครื่องหมายทับต่อท้าย '/' + กำลังดึงข้อมูลการกำหนดค่าเมนู.. + ปัดไปทางขวาเพื่อออก\nแตะเพื่ออยู่ต่อ + กดกลับเพื่อออก\nเข้าไปเพื่ออยู่ต่อ \ No newline at end of file diff --git a/resources-tur/strings/strings.xml b/resources-tur/strings/strings.xml index 850dce9..b0cdf56 100644 --- a/resources-tur/strings/strings.xml +++ b/resources-tur/strings/strings.xml @@ -36,5 +36,8 @@ URL bulunamadı. Ayarlarda olası API URL hatası. URL bulunamadı. Ayarlarda Olası Yapılandırma URL'si hatası. HTTP isteği hata kodunu döndürdü = - API URL'sinin sonunda eğik çizgi '/' olmamalıdır + API URL'sinin sonunda '/' eğik çizgi olmamalıdır + Menü Yapılandırması alınıyor.. + Çıkmak için Sağa Kaydırın\nKalmak için Dokunun + Çıkış için Geri tuşuna basın\nKalmak için Enter'a basın \ No newline at end of file diff --git a/resources-ukr/strings/strings.xml b/resources-ukr/strings/strings.xml index b79b976..2317a53 100644 --- a/resources-ukr/strings/strings.xml +++ b/resources-ukr/strings/strings.xml @@ -15,7 +15,7 @@ @@ -37,4 +37,7 @@ URL не знайдено. Потенційна помилка URL-адреси конфігурації в налаштуваннях. Запит HTTP повернув код помилки = URL-адреса API не повинна містити косу риску '/' + Отримання конфігурації меню.. + Проведіть праворуч, щоб вийти\nТоркніться, щоб залишитися + Натисніть «Назад», щоб вийти\nВведіть, щоб залишитися \ No newline at end of file diff --git a/resources-vie/strings/strings.xml b/resources-vie/strings/strings.xml index d6769c6..f1cd623 100644 --- a/resources-vie/strings/strings.xml +++ b/resources-vie/strings/strings.xml @@ -37,4 +37,7 @@ Không tìm thấy URL. Lỗi URL cấu hình tiềm ẩn trong cài đặt. Yêu cầu HTTP trả về mã lỗi = URL API không được có dấu gạch chéo ở cuối '/' + Đang tìm nạp cấu hình menu.. + Vuốt sang phải để thoát\nNhấn để ở lại + Nhấn Quay lại để thoát\nNhập để ở lại \ No newline at end of file diff --git a/resources-zhs/strings/strings.xml b/resources-zhs/strings/strings.xml index ae2d75d..b2ac390 100644 --- a/resources-zhs/strings/strings.xml +++ b/resources-zhs/strings/strings.xml @@ -37,4 +37,7 @@ 找不到网址。设置中可能存在配置 URL 错误。 HTTP请求返回错误码= API URL 不得有尾部斜杠“/” + 正在获取菜单配置.. + 向右滑动即可退出\n点击即可停留 + 按回车键退出\n按回车键继续 \ No newline at end of file diff --git a/resources-zht/strings/strings.xml b/resources-zht/strings/strings.xml index 3950bab..12ea7e4 100644 --- a/resources-zht/strings/strings.xml +++ b/resources-zht/strings/strings.xml @@ -37,4 +37,7 @@ 找不到網址。設定中可能存在配置 URL 錯誤。 HTTP請求回傳錯誤碼= API URL 不得有尾部斜線“/” + 正在取得選單配置.. + 向右滑動即可退出\n點選即可停留 + 按回車鍵退出\n按回車鍵繼續 \ No newline at end of file diff --git a/resources-zsm/strings/strings.xml b/resources-zsm/strings/strings.xml index c0c505c..74b3a20 100644 --- a/resources-zsm/strings/strings.xml +++ b/resources-zsm/strings/strings.xml @@ -37,4 +37,7 @@ URL tidak ditemui. Ralat URL Konfigurasi Potensi dalam tetapan. Permintaan HTTP mengembalikan kod ralat = URL API tidak boleh mempunyai garis miring '/' + Mengambil Konfigurasi Menu.. + Leret ke Kanan untuk Keluar\nKetik untuk Kekal + Tekan Kembali untuk Keluar\nMasuk untuk Kekal \ No newline at end of file diff --git a/resources/strings/strings.xml b/resources/strings/strings.xml index ea590e7..5bda30c 100644 --- a/resources/strings/strings.xml +++ b/resources/strings/strings.xml @@ -31,4 +31,7 @@ URL not found. Potential Configuration URL error in settings. HTTP request returned error code = API URL must not have a trailing slash '/' + Fetching Menu Config.. + Swipe to Right to Exit\nTap to Stay + Hit Back to Exit\nEnter to Stay diff --git a/source/RootView.mc b/source/RootView.mc index 0b1623b..6d19597 100644 --- a/source/RootView.mc +++ b/source/RootView.mc @@ -25,11 +25,21 @@ using Toybox.WatchUi; class RootView extends WatchUi.View { var width,height; - var mApp as HomeAssistantApp; + var mApp as HomeAssistantApp; + var strFetchingMenuConfig as Lang.String; + var strExitView as Lang.String; function initialize(app as HomeAssistantApp) { View.initialize(); mApp=app; + + strFetchingMenuConfig = WatchUi.loadResource($.Rez.Strings.FetchingMenuConfig); + + if (System.getDeviceSettings().isTouchScreen){ + strExitView = WatchUi.loadResource($.Rez.Strings.ExitViewTouch); + } else { + strExitView = WatchUi.loadResource($.Rez.Strings.ExitViewButtons); + } } function onLayout(dc as Graphics.Dc) as Void { @@ -42,9 +52,9 @@ class RootView extends WatchUi.View { dc.clear(); dc.setColor(Graphics.COLOR_BLUE,Graphics.COLOR_TRANSPARENT); if(mApp.homeAssistantMenuIsLoaded()) { - dc.drawText(width/2,height/2,Graphics.FONT_SMALL,"Hit Back to Exit\nTap to stay",Graphics.TEXT_JUSTIFY_CENTER|Graphics.TEXT_JUSTIFY_VCENTER); + dc.drawText(width/2,height/2,Graphics.FONT_SMALL,strExitView,Graphics.TEXT_JUSTIFY_CENTER|Graphics.TEXT_JUSTIFY_VCENTER); } else { - dc.drawText(width/2,height/2,Graphics.FONT_SMALL,"Loading...",Graphics.TEXT_JUSTIFY_CENTER|Graphics.TEXT_JUSTIFY_VCENTER); + dc.drawText(width/2,height/2,Graphics.FONT_SMALL,strFetchingMenuConfig,Graphics.TEXT_JUSTIFY_CENTER|Graphics.TEXT_JUSTIFY_VCENTER); } } } From 4454e77f35974be37dfc37e0f236877e820ef76f Mon Sep 17 00:00:00 2001 From: SomeoneOnEarth Date: Fri, 15 Dec 2023 13:18:49 +0100 Subject: [PATCH 08/18] Show longer texts on fetching + exit view properly --- source/RootView.mc | 63 +++++++++++++++++++++++++++++++++------------- 1 file changed, 45 insertions(+), 18 deletions(-) diff --git a/source/RootView.mc b/source/RootView.mc index 6d19597..348f069 100644 --- a/source/RootView.mc +++ b/source/RootView.mc @@ -22,40 +22,67 @@ using Toybox.Graphics; using Toybox.Lang; using Toybox.WatchUi; -class RootView extends WatchUi.View { +class RootView extends ScalableView { - var width,height; - var mApp as HomeAssistantApp; - var strFetchingMenuConfig as Lang.String; - var strExitView as Lang.String; + private var mApp as HomeAssistantApp; + private var strFetchingMenuConfig as Lang.String; + private var strExit as Lang.String; + private var mTextAreaExit as WatchUi.TextArea or Null; + private var mTextAreaFetching as WatchUi.TextArea or Null; function initialize(app as HomeAssistantApp) { - View.initialize(); + ScalableView.initialize(); mApp=app; strFetchingMenuConfig = WatchUi.loadResource($.Rez.Strings.FetchingMenuConfig); if (System.getDeviceSettings().isTouchScreen){ - strExitView = WatchUi.loadResource($.Rez.Strings.ExitViewTouch); + strExit = WatchUi.loadResource($.Rez.Strings.ExitViewTouch); } else { - strExitView = WatchUi.loadResource($.Rez.Strings.ExitViewButtons); + strExit = WatchUi.loadResource($.Rez.Strings.ExitViewButtons); } } function onLayout(dc as Graphics.Dc) as Void { - width=dc.getWidth(); - height=dc.getHeight(); + var w = dc.getWidth(); + var h = dc.getHeight(); + + mTextAreaExit = new WatchUi.TextArea({ + :text => strExit, + :color => Graphics.COLOR_WHITE, + :font => Graphics.FONT_XTINY, + :justification => Graphics.TEXT_JUSTIFY_CENTER | Graphics.TEXT_JUSTIFY_VCENTER, + :locX => 0, + :locY => 83, + :width => w, + :height => h - 166 + }); + + mTextAreaFetching = new WatchUi.TextArea({ + :text => strFetchingMenuConfig, + :color => Graphics.COLOR_WHITE, + :font => Graphics.FONT_XTINY, + :justification => Graphics.TEXT_JUSTIFY_CENTER | Graphics.TEXT_JUSTIFY_VCENTER, + :locX => 0, + :locY => 83, + :width => w, + :height => h - 166 + }); } function onUpdate(dc as Graphics.Dc) as Void { - dc.setColor(Graphics.COLOR_BLACK,Graphics.COLOR_BLACK); - dc.clear(); - dc.setColor(Graphics.COLOR_BLUE,Graphics.COLOR_TRANSPARENT); - if(mApp.homeAssistantMenuIsLoaded()) { - dc.drawText(width/2,height/2,Graphics.FONT_SMALL,strExitView,Graphics.TEXT_JUSTIFY_CENTER|Graphics.TEXT_JUSTIFY_VCENTER); - } else { - dc.drawText(width/2,height/2,Graphics.FONT_SMALL,strFetchingMenuConfig,Graphics.TEXT_JUSTIFY_CENTER|Graphics.TEXT_JUSTIFY_VCENTER); - } + var bg = 0x3B444C; + if(dc has :setAntiAlias) { + dc.setAntiAlias(true); + } + dc.setColor(Graphics.COLOR_WHITE, bg); + dc.clear(); + + if(mApp.homeAssistantMenuIsLoaded()) { + mTextAreaExit.draw(dc); + } else { + mTextAreaFetching.draw(dc); + } } } From 6c9cfc1c2936aff7dd015bbf9226f225a3e0b6e1 Mon Sep 17 00:00:00 2001 From: SomeoneOnEarth Date: Fri, 15 Dec 2023 19:12:45 +0100 Subject: [PATCH 09/18] Alligned var naming --- source/HomeAssistantApp.mc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/HomeAssistantApp.mc b/source/HomeAssistantApp.mc index 49873c1..6eaeea9 100644 --- a/source/HomeAssistantApp.mc +++ b/source/HomeAssistantApp.mc @@ -25,7 +25,7 @@ using Toybox.Application.Properties; class HomeAssistantApp extends Application.AppBase { private var mHaMenu as HomeAssistantView or Null; - private var quitTimer as QuitTimer or Null; + private var mQuitTimer as QuitTimer or Null; private var strNoApiKey as Lang.String or Null; private var strNoApiUrl as Lang.String or Null; private var strNoConfigUrl as Lang.String or Null; @@ -66,7 +66,7 @@ class HomeAssistantApp extends Application.AppBase { strConfigUrlNotFound = WatchUi.loadResource($.Rez.Strings.ConfigUrlNotFound); strUnhandledHttpErr = WatchUi.loadResource($.Rez.Strings.UnhandledHttpErr); strTrailingSlashErr = WatchUi.loadResource($.Rez.Strings.TrailingSlashErr); - quitTimer = new QuitTimer(); + mQuitTimer = new QuitTimer(); var api_url = Properties.getValue("api_url") as Lang.String; @@ -138,7 +138,7 @@ class HomeAssistantApp extends Application.AppBase { WatchUi.pushView(new ErrorView(strConfigUrlNotFound), new ErrorDelegate(), WatchUi.SLIDE_UP); } else if (responseCode == 200) { mHaMenu = new HomeAssistantView(data, null); - quitTimer.begin(); + mQuitTimer.begin(); pushHomeAssistantMenuView(); mItemsToUpdate = mHaMenu.getItemsToUpdate(); // Start the continuous update process that continues for as long as the application is running. @@ -189,7 +189,7 @@ class HomeAssistantApp extends Application.AppBase { } function getQuitTimer() as QuitTimer{ - return quitTimer; + return mQuitTimer; } (:glance) From aeb7620fb2fbcb64a809c0b0a3ae1e5983482b64 Mon Sep 17 00:00:00 2001 From: SomeoneOnEarth Date: Fri, 15 Dec 2023 20:11:11 +0100 Subject: [PATCH 10/18] Add hint for glance related stuff --- source/HomeAssistantApp.mc | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/source/HomeAssistantApp.mc b/source/HomeAssistantApp.mc index 6eaeea9..889c119 100644 --- a/source/HomeAssistantApp.mc +++ b/source/HomeAssistantApp.mc @@ -42,14 +42,48 @@ class HomeAssistantApp extends Application.AppBase { function initialize() { AppBase.initialize(); + + // ATTENTION when adding stuff into this block: + // Because of the >>GlanceView<<, it should contain only + // code, which is used as well for the glance: + // - https://developer.garmin.com/connect-iq/core-topics/glances/ + // + // Also dealing with resources "Rez" needs attention, too. See + // "Resource Scopes": + // - https://developer.garmin.com/connect-iq/core-topics/resources/ + // + // Classes which are used for the glance view, needed to be tagged + // with "(:glance)". } // onStart() is called on application start up function onStart(state as Lang.Dictionary?) as Void { + // ATTENTION when adding stuff into this block: + // Because of the >>GlanceView<<, it should contain only + // code, which is used as well for the glance: + // - https://developer.garmin.com/connect-iq/core-topics/glances/ + // + // Also dealing with resources "Rez" needs attention, too. See + // "Resource Scopes": + // - https://developer.garmin.com/connect-iq/core-topics/resources/ + // + // Classes which are used for the glance view, needed to be tagged + // with "(:glance)". } // onStop() is called when your application is exiting function onStop(state as Lang.Dictionary?) as Void { + // ATTENTION when adding stuff into this block: + // Because of the >>GlanceView<<, it should contain only + // code, which is used as well for the glance: + // - https://developer.garmin.com/connect-iq/core-topics/glances/ + // + // Also dealing with resources "Rez" needs attention, too. See + // "Resource Scopes": + // - https://developer.garmin.com/connect-iq/core-topics/resources/ + // + // Classes which are used for the glance view, needed to be tagged + // with "(:glance)". } // Return the initial view of your application here From d2b9c3203d0e87a533e2a97751bc157898f344b3 Mon Sep 17 00:00:00 2001 From: SomeoneOnEarth Date: Fri, 15 Dec 2023 20:11:38 +0100 Subject: [PATCH 11/18] Add correction for German translation --- resources-deu/strings/corrections.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/resources-deu/strings/corrections.xml b/resources-deu/strings/corrections.xml index b2d307c..ea19aa5 100644 --- a/resources-deu/strings/corrections.xml +++ b/resources-deu/strings/corrections.xml @@ -24,4 +24,5 @@ Die HTTP-Anfrage gab folgenden Fehlercode zurück = Zum Beenden nach rechts swipen\nZum Bleiben antippen Drücke „Zurück“, um zu Beenden.\n„Enter“, um zu bleiben + Lade Config vom Server ... From 0f157aca07308093ac28a0dd94368480c5e2d6ba Mon Sep 17 00:00:00 2001 From: SomeoneOnEarth Date: Sat, 16 Dec 2023 17:46:19 +0100 Subject: [PATCH 12/18] Add hint for widget related stuff --- source/RootView.mc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/source/RootView.mc b/source/RootView.mc index 348f069..ca805d9 100644 --- a/source/RootView.mc +++ b/source/RootView.mc @@ -24,6 +24,19 @@ using Toybox.WatchUi; class RootView extends ScalableView { + // ATTENTION when the app is running as a "widget" (that means, it runs on devices + // without glance view support), the input events in this view are limited, as + // described under "Base View and the Widget Carousel" on: + // + // https://developer.garmin.com/connect-iq/connect-iq-basics/app-types/ + // + // Also the view type of the base view is limited too (for example "WatchUi.Menu2" + // is not possible)). + // + // Also System.exit() is not working/do nothing when running as a widget: A widget will be + // terminated automatically by OS after some time or can be quit manually, when on the base + // view a swipe to left / "back button" press is done. + private var mApp as HomeAssistantApp; private var strFetchingMenuConfig as Lang.String; private var strExit as Lang.String; From f086d0d03bc383c7494ba3de2fd449b99b932ffb Mon Sep 17 00:00:00 2001 From: Philip Abbey Date: Sat, 16 Dec 2023 17:03:38 +0000 Subject: [PATCH 13/18] Bug fix for devices with API 3.1.0 1) Removed WatchUi.getCurrentView() API call in favour of a new method of ensuring only one ErrorView is pushed at a time. 2) Any error view will be cancelled when responses start working again, e.g. watch gets in Bluetooth range of the phone again. 3) Added error message decoding for misspelled entities. Co-Authored-By: Joseph Abbey --- source/ErrorView.mc | 71 +++++++++++-- source/HomeAssistantApp.mc | 28 +++--- source/HomeAssistantConfirmation.mc | 19 ++-- source/HomeAssistantService.mc | 21 ++-- source/HomeAssistantToggleMenuItem.mc | 140 ++++++++++++++------------ 5 files changed, 171 insertions(+), 108 deletions(-) diff --git a/source/ErrorView.mc b/source/ErrorView.mc index 5dbadc0..ce42c36 100644 --- a/source/ErrorView.mc +++ b/source/ErrorView.mc @@ -18,6 +18,15 @@ // should not happen of course... but they do, so best make sure errors can be // reported. // +// Designed so that a single ErrorView is used for all errors and hence can ensure +// that only the first call to display is honoured until the view is dismissed. +// This compensates for older devices not being able to call WatchUi.getCurrentView() +// due to not supporting API level 3.4.0. +// +// Usage: +// 1) ErrorView.show("Error message"); +// 2) return ErrorView.create("Error message"); // as Lang.Array +// //----------------------------------------------------------------------------------- using Toybox.Graphics; @@ -26,18 +35,22 @@ using Toybox.WatchUi; using Toybox.Communications; class ErrorView extends ScalableView { - private const cSettings as Lang.Dictionary = { + private var mText as Lang.String = ""; + private var mDelegate as ErrorDelegate; + private const cSettings as Lang.Dictionary = { :errorIconMargin => 7f }; // Vertical spacing between the top of the face and the error icon - private var mErrorIconMargin; - private var mText as Lang.String; + private var mErrorIconMargin as Lang.Number; private var mErrorIcon; private var mTextArea; - function initialize(text as Lang.String) { + private static var instance; + private static var mShown as Lang.Boolean = false; + + function initialize() { ScalableView.initialize(); - mText = text; + mDelegate = new ErrorDelegate(self); // Convert the settings from % of screen size to pixels mErrorIconMargin = pixelsForScreen(cSettings.get(:errorIconMargin) as Lang.Float); } @@ -75,15 +88,59 @@ class ErrorView extends ScalableView { mTextArea.draw(dc); } + function getDelegate() as ErrorDelegate { + return mDelegate; + } + + static function create(text as Lang.String) as Lang.Array { + if (instance == null) { + instance = new ErrorView(); + } + if (!mShown) { + instance.setText(text); + } + return [instance, instance.getDelegate()]; + } + + // Create or reuse an existing ErrorView, and pass on the text. + static function show(text as Lang.String) as Void { + create(text); // Ignore returned values + if (!mShown) { + WatchUi.pushView(instance, instance.getDelegate(), WatchUi.SLIDE_UP); + mShown = true; + } + } + + // Internal show now we're not a static method like 'show()'. + function setText(text as Lang.String) as Void { + mText = text; + if (mTextArea != null) { + mTextArea.setText(text); + requestUpdate(); + } + } + + static function unShow() as Void { + if (mShown) { + mShown = false; + WatchUi.popView(WatchUi.SLIDE_DOWN); + } + } + } class ErrorDelegate extends WatchUi.BehaviorDelegate { - function initialize() { + //private var mView as ErrorView; + + function initialize(view as ErrorView) { WatchUi.BehaviorDelegate.initialize(); + //mView = view; } + function onBack() { getApp().getQuitTimer().reset(); - WatchUi.popView(WatchUi.SLIDE_DOWN); + ErrorView.unShow(); return true; } + } \ No newline at end of file diff --git a/source/HomeAssistantApp.mc b/source/HomeAssistantApp.mc index dc1651f..fe862e8 100644 --- a/source/HomeAssistantApp.mc +++ b/source/HomeAssistantApp.mc @@ -74,32 +74,32 @@ class HomeAssistantApp extends Application.AppBase { if (Globals.scDebug) { System.println("HomeAssistantApp getInitialView(): No API key in the application settings."); } - return [new ErrorView(strNoApiKey + "."), new ErrorDelegate()] as Lang.Array; + return ErrorView.create(strNoApiKey + "."); } else if (api_url.length() == 0) { if (Globals.scDebug) { System.println("HomeAssistantApp getInitialView(): No API URL in the application settings."); } - return [new ErrorView(strNoApiUrl + "."), new ErrorDelegate()] as Lang.Array; + return ErrorView.create(strNoApiUrl + "."); } else if (api_url.substring(-1, api_url.length()).equals("/")) { if (Globals.scDebug) { System.println("HomeAssistantApp getInitialView(): API URL must not have a trailing slash '/'."); } - return [new ErrorView(strTrailingSlashErr + "."), new ErrorDelegate()] as Lang.Array; + return ErrorView.create(strTrailingSlashErr + "."); } else if ((Properties.getValue("config_url") as Lang.String).length() == 0) { if (Globals.scDebug) { System.println("HomeAssistantApp getInitialView(): No configuration URL in the application settings."); } - return [new ErrorView(strNoConfigUrl + "."), new ErrorDelegate()] as Lang.Array; + return ErrorView.create(strNoConfigUrl + "."); } else if (! System.getDeviceSettings().phoneConnected) { if (Globals.scDebug) { System.println("HomeAssistantApp fetchMenuConfig(): No Phone connection, skipping API call."); } - return [new ErrorView(strNoPhone + "."), new ErrorDelegate()] as Lang.Array; + return ErrorView.create(strNoPhone + "."); } else if (! System.getDeviceSettings().connectionAvailable) { if (Globals.scDebug) { System.println("HomeAssistantApp fetchMenuConfig(): No Internet connection, skipping API call."); } - return [new ErrorView(strNoInternet + "."), new ErrorDelegate()] as Lang.Array; + return ErrorView.create(strNoInternet + "."); } else { fetchMenuConfig(); return [new WatchUi.View(), new WatchUi.BehaviorDelegate()] as Lang.Array; @@ -117,25 +117,23 @@ class HomeAssistantApp extends Application.AppBase { if (Globals.scDebug) { System.println("HomeAssistantApp onReturnFetchMenuConfig() Response Code: BLE_HOST_TIMEOUT or BLE_CONNECTION_UNAVAILABLE, Bluetooth connection severed."); } - WatchUi.pushView(new ErrorView(strNoPhone + "."), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strNoPhone + "."); } else if (responseCode == Communications.BLE_QUEUE_FULL) { if (Globals.scDebug) { System.println("HomeAssistantApp onReturnFetchMenuConfig() Response Code: BLE_QUEUE_FULL, API calls too rapid."); } - if (!(WatchUi.getCurrentView()[0] instanceof ErrorView)) { - // Avoid pushing multiple ErrorViews - WatchUi.pushView(new ErrorView(strApiFlood), new ErrorDelegate(), WatchUi.SLIDE_UP); - } + // Don't need to worry about multiple ErrorViews here as the fetch does not happen a second time. + ErrorView.show(strApiFlood); } else if (responseCode == Communications.NETWORK_REQUEST_TIMED_OUT) { if (Globals.scDebug) { System.println("HomeAssistantApp onReturnFetchMenuConfig() Response Code: NETWORK_REQUEST_TIMED_OUT, check Internet connection."); } - WatchUi.pushView(new ErrorView(strNoResponse), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strNoResponse); } else if (responseCode == 404) { if (Globals.scDebug) { System.println("HomeAssistantApp onReturnFetchMenuConfig() Response Code: 404, page not found. Check Configuration URL setting."); } - WatchUi.pushView(new ErrorView(strConfigUrlNotFound), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strConfigUrlNotFound); } else if (responseCode == 200) { mHaMenu = new HomeAssistantView(data, null); WatchUi.switchToView(mHaMenu, new HomeAssistantViewDelegate(), WatchUi.SLIDE_IMMEDIATE); @@ -149,12 +147,12 @@ class HomeAssistantApp extends Application.AppBase { if (Globals.scDebug) { System.println("HomeAssistantApp onReturnFetchMenuConfig(): Network request timeout."); } - WatchUi.pushView(new ErrorView(strNoMenu + ". " + strNoInternet + "?"), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strNoMenu + ". " + strNoInternet + "?"); } else { if (Globals.scDebug) { System.println("HomeAssistantApp onReturnFetchMenuConfig(): Unhandled HTTP response code = " + responseCode); } - WatchUi.pushView(new ErrorView(strUnhandledHttpErr + responseCode ), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strUnhandledHttpErr + responseCode ); } } diff --git a/source/HomeAssistantConfirmation.mc b/source/HomeAssistantConfirmation.mc index 24381a3..951fd1d 100644 --- a/source/HomeAssistantConfirmation.mc +++ b/source/HomeAssistantConfirmation.mc @@ -26,6 +26,7 @@ using Toybox.Timer; using Toybox.Application.Properties; class HomeAssistantConfirmation extends WatchUi.Confirmation { + function initialize() { WatchUi.Confirmation.initialize(WatchUi.loadResource($.Rez.Strings.Confirm)); } @@ -33,32 +34,32 @@ class HomeAssistantConfirmation extends WatchUi.Confirmation { } class HomeAssistantConfirmationDelegate extends WatchUi.ConfirmationDelegate { - private var confirmMethod; - private var timeout; + private var mConfirmMethod; + private var mTimer; function initialize(callback as Method() as Void) { WatchUi.ConfirmationDelegate.initialize(); - confirmMethod = callback; + mConfirmMethod = callback; var timeoutSeconds = Properties.getValue("confirm_timeout") as Lang.Number; if (timeoutSeconds > 0) { - timeout = new Timer.Timer(); - timeout.start(method(:onTimeout), timeoutSeconds * 1000, true); + mTimer = new Timer.Timer(); + mTimer.start(method(:onTimeout), timeoutSeconds * 1000, true); } } function onResponse(response) as Lang.Boolean { getApp().getQuitTimer().reset(); - if (timeout) { - timeout.stop(); + if (mTimer) { + mTimer.stop(); } if (response == WatchUi.CONFIRM_YES) { - confirmMethod.invoke(); + mConfirmMethod.invoke(); } return true; } function onTimeout() as Void { - timeout.stop(); + mTimer.stop(); WatchUi.popView(WatchUi.SLIDE_RIGHT); } } diff --git a/source/HomeAssistantService.mc b/source/HomeAssistantService.mc index 2f371a9..6b2b905 100644 --- a/source/HomeAssistantService.mc +++ b/source/HomeAssistantService.mc @@ -54,25 +54,23 @@ class HomeAssistantService { if (Globals.scDebug) { System.println("HomeAssistantService onReturnCall() Response Code: BLE_HOST_TIMEOUT or BLE_CONNECTION_UNAVAILABLE, Bluetooth connection severed."); } - WatchUi.pushView(new ErrorView(strNoPhone + "."), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strNoPhone + "."); } else if (responseCode == Communications.BLE_QUEUE_FULL) { if (Globals.scDebug) { System.println("HomeAssistantService onReturnCall() Response Code: BLE_QUEUE_FULL, API calls too rapid."); } - if (!(WatchUi.getCurrentView()[0] instanceof ErrorView)) { - // Avoid pushing multiple ErrorViews - WatchUi.pushView(new ErrorView(strApiFlood), new ErrorDelegate(), WatchUi.SLIDE_UP); - } + // Don't need to worry about multiple ErrorViews here as the call is not on a repeat timer. + ErrorView.show(strApiFlood); } else if (responseCode == Communications.NETWORK_REQUEST_TIMED_OUT) { if (Globals.scDebug) { System.println("HomeAssistantService onReturnCall() Response Code: NETWORK_REQUEST_TIMED_OUT, check Internet connection."); } - WatchUi.pushView(new ErrorView(strNoResponse), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strNoResponse); } else if (responseCode == 404) { if (Globals.scDebug) { System.println("HomeAssistantService onReturnCall() Response Code: 404, page not found. Check API URL setting."); } - WatchUi.pushView(new ErrorView(strApiUrlNotFound), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strApiUrlNotFound); } else if (responseCode == 200) { if (Globals.scDebug) { System.println("HomeAssistantService onReturnCall(): Service executed."); @@ -99,7 +97,7 @@ class HomeAssistantService { if (Globals.scDebug) { System.println("HomeAssistantService onReturnCall(): Unhandled HTTP response code = " + responseCode); } - WatchUi.pushView(new ErrorView(strUnhandledHttpErr + responseCode ), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strUnhandledHttpErr + responseCode ); } } @@ -117,14 +115,15 @@ class HomeAssistantService { if (Globals.scDebug) { System.println("HomeAssistantService call(): No Phone connection, skipping API call."); } - WatchUi.pushView(new ErrorView(strNoPhone + "."), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strNoPhone + "."); } else if (! System.getDeviceSettings().connectionAvailable) { if (Globals.scDebug) { System.println("HomeAssistantService call(): No Internet connection, skipping API call."); } - WatchUi.pushView(new ErrorView(strNoInternet + "."), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strNoInternet + "."); } else { - var url = (Properties.getValue("api_url") as Lang.String) + "/services/" + service.substring(0, service.find(".")) + "/" + service.substring(service.find(".")+1, null); + // Can't user null for parameters due to API version level. + var url = (Properties.getValue("api_url") as Lang.String) + "/services/" + service.substring(0, service.find(".")) + "/" + service.substring(service.find(".")+1, service.length()); if (Globals.scDebug) { System.println("HomeAssistantService call() URL=" + url); System.println("HomeAssistantService call() service=" + service); diff --git a/source/HomeAssistantToggleMenuItem.mc b/source/HomeAssistantToggleMenuItem.mc index 9bbbe89..a862663 100644 --- a/source/HomeAssistantToggleMenuItem.mc +++ b/source/HomeAssistantToggleMenuItem.mc @@ -77,56 +77,68 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem { } // Provide the ability to terminate updating chain of calls for a permanent network error. var keepUpdating = true; - if (responseCode == Communications.BLE_HOST_TIMEOUT || responseCode == Communications.BLE_CONNECTION_UNAVAILABLE) { - if (Globals.scDebug) { - System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: BLE_HOST_TIMEOUT or BLE_CONNECTION_UNAVAILABLE, Bluetooth connection severed."); - } - if (!(WatchUi.getCurrentView()[0] instanceof ErrorView)) { - // Avoid pushing multiple ErrorViews - WatchUi.pushView(new ErrorView(strNoPhone + "."), new ErrorDelegate(), WatchUi.SLIDE_UP); - } - } else if (responseCode == Communications.BLE_QUEUE_FULL) { - if (Globals.scDebug) { - System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: BLE_QUEUE_FULL, API calls too rapid."); - } - if (!(WatchUi.getCurrentView()[0] instanceof ErrorView)) { - // Avoid pushing multiple ErrorViews - WatchUi.pushView(new ErrorView(strApiFlood), new ErrorDelegate(), WatchUi.SLIDE_UP); - } - } else if (responseCode == Communications.NETWORK_REQUEST_TIMED_OUT) { - if (Globals.scDebug) { - System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: NETWORK_REQUEST_TIMED_OUT, check Internet connection."); - } - if (!(WatchUi.getCurrentView()[0] instanceof ErrorView)) { - // Avoid pushing multiple ErrorViews - WatchUi.pushView(new ErrorView(strNoResponse), new ErrorDelegate(), WatchUi.SLIDE_UP); - } - } else if (responseCode == 404) { - if (Globals.scDebug) { - System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: 404, page not found. Check API URL setting."); - } - if (!(WatchUi.getCurrentView()[0] instanceof ErrorView)) { - // Avoid pushing multiple ErrorViews - WatchUi.pushView(new ErrorView(strApiUrlNotFound), new ErrorDelegate(), WatchUi.SLIDE_UP); - } - keepUpdating = false; - } else if (responseCode == 200) { - var state = data.get("state") as Lang.String; - if (Globals.scDebug) { - System.println((data.get("attributes") as Lang.Dictionary).get("friendly_name") + " State=" + state); - } - if (getLabel().equals("...")) { - setLabel((data.get("attributes") as Lang.Dictionary).get("friendly_name") as Lang.String); - } - setUiToggle(state); - } else { - if (Globals.scDebug) { - System.println("HomeAssistantToggleMenuItem onReturnGetState(): Unhandled HTTP response code = " + responseCode); - } - if (!(WatchUi.getCurrentView()[0] instanceof ErrorView)) { - // Avoid pushing multiple ErrorViews - WatchUi.pushView(new ErrorView(strUnhandledHttpErr + responseCode ), new ErrorDelegate(), WatchUi.SLIDE_UP); - } + switch (responseCode) { + case Communications.BLE_HOST_TIMEOUT: + case Communications.BLE_CONNECTION_UNAVAILABLE: + if (Globals.scDebug) { + System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: BLE_HOST_TIMEOUT or BLE_CONNECTION_UNAVAILABLE, Bluetooth connection severed."); + } + ErrorView.show(strNoPhone + "."); + break; + case Communications.BLE_QUEUE_FULL: + if (Globals.scDebug) { + System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: BLE_QUEUE_FULL, API calls too rapid."); + } + ErrorView.show(strApiFlood); + break; + case Communications.NETWORK_REQUEST_TIMED_OUT: + if (Globals.scDebug) { + System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: NETWORK_REQUEST_TIMED_OUT, check Internet connection."); + } + ErrorView.show(strNoResponse); + break; + case 404: + var msg = null; + if (data != null) { + msg = data.get("message"); + } + if (msg != null) { + // Should be an HTTP 405 according to curl queries + if (Globals.scDebug) { + System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: 404. " + mIdentifier + " " + msg); + } + ErrorView.show("HTTP 405, " + mIdentifier + ". " + data.get("message")); + } else { + if (Globals.scDebug) { + System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: 404, page not found. Check API URL setting."); + } + ErrorView.show(strApiUrlNotFound); + } + keepUpdating = false; + break; + case 405: + if (Globals.scDebug) { + System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: 405. " + mIdentifier + " " + data.get("message")); + } + ErrorView.show("HTTP 405, " + mIdentifier + ". " + data.get("message")); + keepUpdating = false; + break; + case 200: + var state = data.get("state") as Lang.String; + if (Globals.scDebug) { + System.println((data.get("attributes") as Lang.Dictionary).get("friendly_name") + " State=" + state); + } + if (getLabel().equals("...")) { + setLabel((data.get("attributes") as Lang.Dictionary).get("friendly_name") as Lang.String); + } + setUiToggle(state); + ErrorView.unShow(); + break; + default: + if (Globals.scDebug) { + System.println("HomeAssistantToggleMenuItem onReturnGetState(): Unhandled HTTP response code = " + responseCode); + } + ErrorView.show(strUnhandledHttpErr + responseCode); } if (keepUpdating) { // Now this feels very "closely coupled" to the application, but it is the most reliable method instead of using a timer. @@ -147,18 +159,12 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem { if (Globals.scDebug) { System.println("HomeAssistantToggleMenuItem getState(): No Phone connection, skipping API call."); } - if (!(WatchUi.getCurrentView()[0] instanceof ErrorView)) { - // Avoid pushing multiple ErrorViews - WatchUi.pushView(new ErrorView(strNoPhone + "."), new ErrorDelegate(), WatchUi.SLIDE_UP); - } + ErrorView.show(strNoPhone + "."); } else if (! System.getDeviceSettings().connectionAvailable) { if (Globals.scDebug) { System.println("HomeAssistantToggleMenuItem getState(): No Internet connection, skipping API call."); } - if (!(WatchUi.getCurrentView()[0] instanceof ErrorView)) { - // Avoid pushing multiple ErrorViews - WatchUi.pushView(new ErrorView(strNoInternet + "."), new ErrorDelegate(), WatchUi.SLIDE_UP); - } + ErrorView.show(strNoInternet + "."); } else { var url = Properties.getValue("api_url") + "/states/" + mIdentifier; if (Globals.scDebug) { @@ -180,7 +186,9 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem { var myTimer = new Timer.Timer(); // Now this feels very "closely coupled" to the application, but it is the most reliable method instead of using a timer. myTimer.start(getApp().method(:updateNextMenuItem), 500, false); - System.println("HomeAssistantToggleMenuItem getState(): Updated failed " + mIdentifier); + if (Globals.scDebug) { + System.println("HomeAssistantToggleMenuItem getState(): Updated failed " + mIdentifier); + } } } @@ -195,22 +203,22 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem { if (Globals.scDebug) { System.println("HomeAssistantToggleMenuItem onReturnSetState() Response Code: BLE_HOST_TIMEOUT or BLE_CONNECTION_UNAVAILABLE, Bluetooth connection severed."); } - WatchUi.pushView(new ErrorView(strNoPhone + "."), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strNoPhone + "."); } else if (responseCode == Communications.BLE_QUEUE_FULL) { if (Globals.scDebug) { System.println("HomeAssistantToggleMenuItem onReturnSetState() Response Code: BLE_QUEUE_FULL, API calls too rapid."); } - WatchUi.pushView(new ErrorView(strApiFlood), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strApiFlood); } else if (responseCode == Communications.NETWORK_REQUEST_TIMED_OUT) { if (Globals.scDebug) { System.println("HomeAssistantToggleMenuItem onReturnSetState() Response Code: NETWORK_REQUEST_TIMED_OUT, check Internet connection."); } - WatchUi.pushView(new ErrorView(strNoResponse), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strNoResponse); } else if (responseCode == 404) { if (Globals.scDebug) { System.println("HomeAssistantToggleMenuItem onReturnSetState() Response Code: 404, page not found. Check API URL setting."); } - WatchUi.pushView(new ErrorView(strApiUrlNotFound), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strApiUrlNotFound); } else if (responseCode == 200) { var state; var d = data as Lang.Array; @@ -227,7 +235,7 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem { if (Globals.scDebug) { System.println("HomeAssistantToggleMenuItem onReturnSetState(): Unhandled HTTP response code = " + responseCode); } - WatchUi.pushView(new ErrorView(strUnhandledHttpErr + responseCode ), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strUnhandledHttpErr + responseCode ); } } @@ -246,14 +254,14 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem { } // Toggle the UI back setEnabled(!isEnabled()); - WatchUi.pushView(new ErrorView(strNoPhone + "."), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strNoPhone + "."); } else if (! System.getDeviceSettings().connectionAvailable) { if (Globals.scDebug) { System.println("HomeAssistantToggleMenuItem getState(): No Internet connection, skipping API call."); } // Toggle the UI back setEnabled(!isEnabled()); - WatchUi.pushView(new ErrorView(strNoInternet + "."), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strNoInternet + "."); } else { // Updated SDK and got a new error // ERROR: venu: Cannot find symbol ':substring' on type 'PolyType'. From 16383f61a4a55ed000417eb7db786b8336e5839d Mon Sep 17 00:00:00 2001 From: Philip Abbey Date: Sat, 16 Dec 2023 17:07:43 +0000 Subject: [PATCH 14/18] Added SomeoneOnEarth to all source headers Give credit to a co-author. --- manifest.xml | 2 +- resources-ara/strings/strings.xml | 2 +- resources-bul/strings/strings.xml | 2 +- resources-ces/strings/strings.xml | 2 +- resources-dan/strings/strings.xml | 2 +- resources-deu/strings/corrections.xml | 2 +- resources-deu/strings/strings.xml | 2 +- resources-dut/strings/strings.xml | 2 +- resources-est/strings/strings.xml | 2 +- resources-fin/strings/strings.xml | 2 +- resources-fre/strings/corrections.xml | 2 +- resources-fre/strings/strings.xml | 2 +- resources-gre/strings/strings.xml | 2 +- resources-heb/strings/strings.xml | 2 +- resources-hrv/strings/strings.xml | 2 +- resources-hun/strings/strings.xml | 2 +- resources-ind/strings/strings.xml | 2 +- resources-ita/strings/strings.xml | 2 +- resources-jpn/strings/strings.xml | 2 +- resources-kor/strings/strings.xml | 2 +- resources-launcher-26-26/drawables.xml | 2 +- resources-launcher-30-30/drawables.xml | 2 +- resources-launcher-35-35/drawables.xml | 2 +- resources-launcher-36-36/drawables.xml | 2 +- resources-launcher-40-40/drawables.xml | 2 +- resources-launcher-54-54/drawables.xml | 2 +- resources-launcher-60-60/drawables.xml | 2 +- resources-launcher-61-61/drawables.xml | 2 +- resources-launcher-62-62/drawables.xml | 2 +- resources-launcher-65-65/drawables.xml | 2 +- resources-launcher-70-70/drawables.xml | 2 +- resources-launcher-80-80/drawables.xml | 2 +- resources-lav/strings/strings.xml | 2 +- resources-lit/strings/strings.xml | 2 +- resources-nob/strings/strings.xml | 2 +- resources-pol/strings/strings.xml | 2 +- resources-por/strings/strings.xml | 2 +- resources-ron/strings/strings.xml | 2 +- resources-slo/strings/strings.xml | 2 +- resources-slv/strings/strings.xml | 2 +- resources-spa/strings/strings.xml | 2 +- resources-swe/strings/strings.xml | 2 +- resources-tha/strings/strings.xml | 2 +- resources-tur/strings/strings.xml | 2 +- resources-ukr/strings/strings.xml | 2 +- resources-vie/strings/strings.xml | 2 +- resources-zhs/strings/strings.xml | 2 +- resources-zht/strings/strings.xml | 2 +- resources-zsm/strings/strings.xml | 2 +- resources/settings/properties.xml | 2 +- resources/settings/settings.xml | 2 +- resources/strings/strings.xml | 2 +- source/Globals.mc | 2 +- source/HomeAssistantApp.mc | 2 +- source/HomeAssistantIconMenuItem.mc | 2 +- source/HomeAssistantMenuItem.mc | 2 +- source/HomeAssistantToggleMenuItem.mc | 2 +- source/HomeAssistantView.mc | 2 +- source/HomeAssistantViewMenuItem.mc | 2 +- 59 files changed, 59 insertions(+), 59 deletions(-) diff --git a/manifest.xml b/manifest.xml index 6c011ed..531d78b 100644 --- a/manifest.xml +++ b/manifest.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 Test Application id="98c36259-498a-4458-9cef-74a273ad2bc3" Live Application id="40131e87-31ff-454b-a8e2-92276ee399d6" diff --git a/resources-ara/strings/strings.xml b/resources-ara/strings/strings.xml index c878246..9baeafa 100644 --- a/resources-ara/strings/strings.xml +++ b/resources-ara/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-bul/strings/strings.xml b/resources-bul/strings/strings.xml index 8704b02..326db8c 100644 --- a/resources-bul/strings/strings.xml +++ b/resources-bul/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-ces/strings/strings.xml b/resources-ces/strings/strings.xml index 6bc14ee..9f98571 100644 --- a/resources-ces/strings/strings.xml +++ b/resources-ces/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-dan/strings/strings.xml b/resources-dan/strings/strings.xml index 066d3a4..b05641d 100644 --- a/resources-dan/strings/strings.xml +++ b/resources-dan/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-deu/strings/corrections.xml b/resources-deu/strings/corrections.xml index 8d8810c..ed0cdd1 100644 --- a/resources-deu/strings/corrections.xml +++ b/resources-deu/strings/corrections.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 14 November 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 14 November 2023 --> diff --git a/resources-deu/strings/strings.xml b/resources-deu/strings/strings.xml index a5628c4..3095b6c 100644 --- a/resources-deu/strings/strings.xml +++ b/resources-deu/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-dut/strings/strings.xml b/resources-dut/strings/strings.xml index e3867ed..d319311 100644 --- a/resources-dut/strings/strings.xml +++ b/resources-dut/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-est/strings/strings.xml b/resources-est/strings/strings.xml index 61f1886..94ae153 100644 --- a/resources-est/strings/strings.xml +++ b/resources-est/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-fin/strings/strings.xml b/resources-fin/strings/strings.xml index 93fd3b8..12143a4 100644 --- a/resources-fin/strings/strings.xml +++ b/resources-fin/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-fre/strings/corrections.xml b/resources-fre/strings/corrections.xml index b75db29..a9be4eb 100644 --- a/resources-fre/strings/corrections.xml +++ b/resources-fre/strings/corrections.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 14 November 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 14 November 2023 --> diff --git a/resources-fre/strings/strings.xml b/resources-fre/strings/strings.xml index 71dabe2..be42a29 100644 --- a/resources-fre/strings/strings.xml +++ b/resources-fre/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-gre/strings/strings.xml b/resources-gre/strings/strings.xml index 965adae..5f7413f 100644 --- a/resources-gre/strings/strings.xml +++ b/resources-gre/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-heb/strings/strings.xml b/resources-heb/strings/strings.xml index ff5d53c..0af6cf6 100644 --- a/resources-heb/strings/strings.xml +++ b/resources-heb/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-hrv/strings/strings.xml b/resources-hrv/strings/strings.xml index f146d63..d252106 100644 --- a/resources-hrv/strings/strings.xml +++ b/resources-hrv/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-hun/strings/strings.xml b/resources-hun/strings/strings.xml index 82d7395..03dbc06 100644 --- a/resources-hun/strings/strings.xml +++ b/resources-hun/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-ind/strings/strings.xml b/resources-ind/strings/strings.xml index a4ab5c5..777f06c 100644 --- a/resources-ind/strings/strings.xml +++ b/resources-ind/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-ita/strings/strings.xml b/resources-ita/strings/strings.xml index 57fd138..7155eea 100644 --- a/resources-ita/strings/strings.xml +++ b/resources-ita/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-jpn/strings/strings.xml b/resources-jpn/strings/strings.xml index cfbbcae..3f52116 100644 --- a/resources-jpn/strings/strings.xml +++ b/resources-jpn/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-kor/strings/strings.xml b/resources-kor/strings/strings.xml index b696aad..b9e0fd2 100644 --- a/resources-kor/strings/strings.xml +++ b/resources-kor/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-launcher-26-26/drawables.xml b/resources-launcher-26-26/drawables.xml index d8b5369..4f18f5a 100644 --- a/resources-launcher-26-26/drawables.xml +++ b/resources-launcher-26-26/drawables.xml @@ -8,7 +8,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-launcher-30-30/drawables.xml b/resources-launcher-30-30/drawables.xml index d8b5369..4f18f5a 100644 --- a/resources-launcher-30-30/drawables.xml +++ b/resources-launcher-30-30/drawables.xml @@ -8,7 +8,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-launcher-35-35/drawables.xml b/resources-launcher-35-35/drawables.xml index d8b5369..4f18f5a 100644 --- a/resources-launcher-35-35/drawables.xml +++ b/resources-launcher-35-35/drawables.xml @@ -8,7 +8,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-launcher-36-36/drawables.xml b/resources-launcher-36-36/drawables.xml index d8b5369..4f18f5a 100644 --- a/resources-launcher-36-36/drawables.xml +++ b/resources-launcher-36-36/drawables.xml @@ -8,7 +8,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-launcher-40-40/drawables.xml b/resources-launcher-40-40/drawables.xml index d8b5369..4f18f5a 100644 --- a/resources-launcher-40-40/drawables.xml +++ b/resources-launcher-40-40/drawables.xml @@ -8,7 +8,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-launcher-54-54/drawables.xml b/resources-launcher-54-54/drawables.xml index d8b5369..4f18f5a 100644 --- a/resources-launcher-54-54/drawables.xml +++ b/resources-launcher-54-54/drawables.xml @@ -8,7 +8,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-launcher-60-60/drawables.xml b/resources-launcher-60-60/drawables.xml index d8b5369..4f18f5a 100644 --- a/resources-launcher-60-60/drawables.xml +++ b/resources-launcher-60-60/drawables.xml @@ -8,7 +8,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-launcher-61-61/drawables.xml b/resources-launcher-61-61/drawables.xml index d8b5369..4f18f5a 100644 --- a/resources-launcher-61-61/drawables.xml +++ b/resources-launcher-61-61/drawables.xml @@ -8,7 +8,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-launcher-62-62/drawables.xml b/resources-launcher-62-62/drawables.xml index d8b5369..4f18f5a 100644 --- a/resources-launcher-62-62/drawables.xml +++ b/resources-launcher-62-62/drawables.xml @@ -8,7 +8,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-launcher-65-65/drawables.xml b/resources-launcher-65-65/drawables.xml index d8b5369..4f18f5a 100644 --- a/resources-launcher-65-65/drawables.xml +++ b/resources-launcher-65-65/drawables.xml @@ -8,7 +8,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-launcher-70-70/drawables.xml b/resources-launcher-70-70/drawables.xml index d8b5369..4f18f5a 100644 --- a/resources-launcher-70-70/drawables.xml +++ b/resources-launcher-70-70/drawables.xml @@ -8,7 +8,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-launcher-80-80/drawables.xml b/resources-launcher-80-80/drawables.xml index d8b5369..4f18f5a 100644 --- a/resources-launcher-80-80/drawables.xml +++ b/resources-launcher-80-80/drawables.xml @@ -8,7 +8,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-lav/strings/strings.xml b/resources-lav/strings/strings.xml index c4310f5..57fdaa4 100644 --- a/resources-lav/strings/strings.xml +++ b/resources-lav/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-lit/strings/strings.xml b/resources-lit/strings/strings.xml index 0a226a7..ad70541 100644 --- a/resources-lit/strings/strings.xml +++ b/resources-lit/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-nob/strings/strings.xml b/resources-nob/strings/strings.xml index f05d71c..844a7b0 100644 --- a/resources-nob/strings/strings.xml +++ b/resources-nob/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-pol/strings/strings.xml b/resources-pol/strings/strings.xml index 68e9eaf..ddf55d5 100644 --- a/resources-pol/strings/strings.xml +++ b/resources-pol/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-por/strings/strings.xml b/resources-por/strings/strings.xml index f564fbb..5aec7eb 100644 --- a/resources-por/strings/strings.xml +++ b/resources-por/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-ron/strings/strings.xml b/resources-ron/strings/strings.xml index df5ab8f..e5cad0e 100644 --- a/resources-ron/strings/strings.xml +++ b/resources-ron/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-slo/strings/strings.xml b/resources-slo/strings/strings.xml index 036c04b..3ca1a0c 100644 --- a/resources-slo/strings/strings.xml +++ b/resources-slo/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-slv/strings/strings.xml b/resources-slv/strings/strings.xml index 55ae72d..1e4e0de 100644 --- a/resources-slv/strings/strings.xml +++ b/resources-slv/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-spa/strings/strings.xml b/resources-spa/strings/strings.xml index 5d5397a..85b9600 100644 --- a/resources-spa/strings/strings.xml +++ b/resources-spa/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-swe/strings/strings.xml b/resources-swe/strings/strings.xml index 8daf71f..b4adbb2 100644 --- a/resources-swe/strings/strings.xml +++ b/resources-swe/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-tha/strings/strings.xml b/resources-tha/strings/strings.xml index c1e8db1..f98b391 100644 --- a/resources-tha/strings/strings.xml +++ b/resources-tha/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-tur/strings/strings.xml b/resources-tur/strings/strings.xml index 850dce9..de46b52 100644 --- a/resources-tur/strings/strings.xml +++ b/resources-tur/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-ukr/strings/strings.xml b/resources-ukr/strings/strings.xml index b79b976..f94e84f 100644 --- a/resources-ukr/strings/strings.xml +++ b/resources-ukr/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-vie/strings/strings.xml b/resources-vie/strings/strings.xml index d6769c6..58fde47 100644 --- a/resources-vie/strings/strings.xml +++ b/resources-vie/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-zhs/strings/strings.xml b/resources-zhs/strings/strings.xml index ae2d75d..84d3e93 100644 --- a/resources-zhs/strings/strings.xml +++ b/resources-zhs/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-zht/strings/strings.xml b/resources-zht/strings/strings.xml index 3950bab..5db31af 100644 --- a/resources-zht/strings/strings.xml +++ b/resources-zht/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-zsm/strings/strings.xml b/resources-zsm/strings/strings.xml index c0c505c..f06133f 100644 --- a/resources-zsm/strings/strings.xml +++ b/resources-zsm/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources/settings/properties.xml b/resources/settings/properties.xml index 102efc1..8929de2 100644 --- a/resources/settings/properties.xml +++ b/resources/settings/properties.xml @@ -8,7 +8,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources/settings/settings.xml b/resources/settings/settings.xml index 638194d..753f7a4 100644 --- a/resources/settings/settings.xml +++ b/resources/settings/settings.xml @@ -8,7 +8,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources/strings/strings.xml b/resources/strings/strings.xml index ea590e7..3d2ce56 100644 --- a/resources/strings/strings.xml +++ b/resources/strings/strings.xml @@ -8,7 +8,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/source/Globals.mc b/source/Globals.mc index 9475c94..bd2ed2d 100644 --- a/source/Globals.mc +++ b/source/Globals.mc @@ -9,7 +9,7 @@ // tested on a Venu 2 device. The source code is provided at: // https://github.com/house-of-abbey/GarminHomeAssistant. // -// P A Abbey & J D Abbey, 31 October 2023 +// P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 // // // Description: diff --git a/source/HomeAssistantApp.mc b/source/HomeAssistantApp.mc index fe862e8..f7dd0c0 100644 --- a/source/HomeAssistantApp.mc +++ b/source/HomeAssistantApp.mc @@ -9,7 +9,7 @@ // tested on a Venu 2 device. The source code is provided at: // https://github.com/house-of-abbey/GarminHomeAssistant. // -// P A Abbey & J D Abbey, 31 October 2023 +// P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 // // // Description: diff --git a/source/HomeAssistantIconMenuItem.mc b/source/HomeAssistantIconMenuItem.mc index a42055d..80375b1 100644 --- a/source/HomeAssistantIconMenuItem.mc +++ b/source/HomeAssistantIconMenuItem.mc @@ -9,7 +9,7 @@ // tested on a Venu 2 device. The source code is provided at: // https://github.com/house-of-abbey/GarminHomeAssistant. // -// P A Abbey & J D Abbey, 31 October 2023 +// P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 // // // Description: diff --git a/source/HomeAssistantMenuItem.mc b/source/HomeAssistantMenuItem.mc index 8b4166e..d8e0f4c 100644 --- a/source/HomeAssistantMenuItem.mc +++ b/source/HomeAssistantMenuItem.mc @@ -9,7 +9,7 @@ // tested on a Venu 2 device. The source code is provided at: // https://github.com/house-of-abbey/GarminHomeAssistant. // -// P A Abbey & J D Abbey, 31 October 2023 +// P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 // // // Description: diff --git a/source/HomeAssistantToggleMenuItem.mc b/source/HomeAssistantToggleMenuItem.mc index a862663..08b2fbe 100644 --- a/source/HomeAssistantToggleMenuItem.mc +++ b/source/HomeAssistantToggleMenuItem.mc @@ -9,7 +9,7 @@ // tested on a Venu 2 device. The source code is provided at: // https://github.com/house-of-abbey/GarminHomeAssistant. // -// P A Abbey & J D Abbey, 31 October 2023 +// P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 // // // Description: diff --git a/source/HomeAssistantView.mc b/source/HomeAssistantView.mc index 366dcac..5136290 100644 --- a/source/HomeAssistantView.mc +++ b/source/HomeAssistantView.mc @@ -9,7 +9,7 @@ // tested on a Venu 2 device. The source code is provided at: // https://github.com/house-of-abbey/GarminHomeAssistant. // -// P A Abbey & J D Abbey, 31 October 2023 +// P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 // // // Description: diff --git a/source/HomeAssistantViewMenuItem.mc b/source/HomeAssistantViewMenuItem.mc index c430b4b..81fd141 100644 --- a/source/HomeAssistantViewMenuItem.mc +++ b/source/HomeAssistantViewMenuItem.mc @@ -9,7 +9,7 @@ // tested on a Venu 2 device. The source code is provided at: // https://github.com/house-of-abbey/GarminHomeAssistant. // -// P A Abbey & J D Abbey, 31 October 2023 +// P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 // // // Description: From e6d5053ebba4b2fa1d30ccadf7e549b96ea05ad4 Mon Sep 17 00:00:00 2001 From: SomeoneOnEarth Date: Sat, 16 Dec 2023 21:49:23 +0100 Subject: [PATCH 15/18] Use app name from resources for glance view --- resources-ara/strings/strings.xml | 2 +- resources-bul/strings/strings.xml | 2 +- resources-ces/strings/strings.xml | 2 +- resources-dan/strings/strings.xml | 4 ++-- resources-deu/strings/strings.xml | 8 ++++---- resources-dut/strings/strings.xml | 2 +- resources-est/strings/strings.xml | 2 +- resources-fin/strings/strings.xml | 2 +- resources-fre/strings/strings.xml | 2 +- resources-gre/strings/strings.xml | 2 +- resources-heb/strings/strings.xml | 2 +- resources-hrv/strings/strings.xml | 2 +- resources-hun/strings/strings.xml | 2 +- resources-ind/strings/strings.xml | 2 +- resources-ita/strings/strings.xml | 2 +- resources-jpn/strings/strings.xml | 2 +- resources-kor/strings/strings.xml | 2 +- resources-lav/strings/strings.xml | 2 +- resources-lit/strings/strings.xml | 4 ++-- resources-nob/strings/strings.xml | 2 +- resources-pol/strings/strings.xml | 2 +- resources-por/strings/strings.xml | 2 +- resources-ron/strings/strings.xml | 4 ++-- resources-slo/strings/strings.xml | 2 +- resources-slv/strings/strings.xml | 2 +- resources-spa/strings/strings.xml | 2 +- resources-swe/strings/strings.xml | 2 +- resources-tha/strings/strings.xml | 2 +- resources-tur/strings/strings.xml | 2 +- resources-ukr/strings/strings.xml | 2 +- resources-vie/strings/strings.xml | 2 +- resources-zhs/strings/strings.xml | 2 +- resources-zht/strings/strings.xml | 2 +- resources-zsm/strings/strings.xml | 2 +- resources/strings/strings.xml | 2 +- source/HomeAssistantGlanceView.mc | 12 +++++++----- 36 files changed, 48 insertions(+), 46 deletions(-) diff --git a/resources-ara/strings/strings.xml b/resources-ara/strings/strings.xml index 0826291..4ac0a2a 100644 --- a/resources-ara/strings/strings.xml +++ b/resources-ara/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant على عن مقبض diff --git a/resources-bul/strings/strings.xml b/resources-bul/strings/strings.xml index a453f82..645957c 100644 --- a/resources-bul/strings/strings.xml +++ b/resources-bul/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant На Изкл Докоснете diff --git a/resources-ces/strings/strings.xml b/resources-ces/strings/strings.xml index 2c1a731..4c092d7 100644 --- a/resources-ces/strings/strings.xml +++ b/resources-ces/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant Na Vypnuto Klepněte diff --git a/resources-dan/strings/strings.xml b/resources-dan/strings/strings.xml index c7035b6..72b8cf2 100644 --- a/resources-dan/strings/strings.xml +++ b/resources-dan/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant Af Tryk på @@ -28,7 +28,7 @@ Ingen telefonforbindelse Ingen internetforbindelse Intet svar, tjek internetforbindelse - Menuhentningsfejl + Fejl ved menuhentning Ingen API-nøgle i applikationsindstillingerne Ingen API-URL i applikationsindstillingerne Ingen konfigurations-URL i applikationsindstillingerne diff --git a/resources-deu/strings/strings.xml b/resources-deu/strings/strings.xml index 79352e4..612e677 100644 --- a/resources-deu/strings/strings.xml +++ b/resources-deu/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant An Aus Antippen @@ -37,7 +37,7 @@ URL nicht gefunden. Möglicher Konfigurations-URL-Fehler in den Einstellungen. Die HTTP-Anfrage gab folgenden Fehlercode zurück = Die API-URL darf keinen abschließenden Schrägstrich „/“ enthalten. - Menükonfiguration abrufen. - Zum Verlassen nach rechts wischen\nZum Bleiben tippen - Klicken Sie auf „Zurück“, um den Ausgang zu verlassen.\nEintreten, um zu bleiben + Lade Config vom Server ... + Zum Beenden nach rechts swipen\nZum Bleiben antippen + Drücke „Zurück“, um zu Beenden.\n„Enter“, um zu bleiben \ No newline at end of file diff --git a/resources-dut/strings/strings.xml b/resources-dut/strings/strings.xml index 7c2b07f..87d99b4 100644 --- a/resources-dut/strings/strings.xml +++ b/resources-dut/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant Op Uit Kraan diff --git a/resources-est/strings/strings.xml b/resources-est/strings/strings.xml index 51741ed..57e3aaa 100644 --- a/resources-est/strings/strings.xml +++ b/resources-est/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant Peal Väljas Puudutage diff --git a/resources-fin/strings/strings.xml b/resources-fin/strings/strings.xml index 57238eb..16a199d 100644 --- a/resources-fin/strings/strings.xml +++ b/resources-fin/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant Päällä Vinossa Napauta diff --git a/resources-fre/strings/strings.xml b/resources-fre/strings/strings.xml index b8bc3f6..05ce815 100644 --- a/resources-fre/strings/strings.xml +++ b/resources-fre/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant Activé Désactivé Clic diff --git a/resources-gre/strings/strings.xml b/resources-gre/strings/strings.xml index 2148f84..d8251f7 100644 --- a/resources-gre/strings/strings.xml +++ b/resources-gre/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant Επί Μακριά από Παρακέντηση diff --git a/resources-heb/strings/strings.xml b/resources-heb/strings/strings.xml index 8c72f00..0a45bcd 100644 --- a/resources-heb/strings/strings.xml +++ b/resources-heb/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant עַל כבוי בֶּרֶז diff --git a/resources-hrv/strings/strings.xml b/resources-hrv/strings/strings.xml index e2eaa6a..674d8c1 100644 --- a/resources-hrv/strings/strings.xml +++ b/resources-hrv/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant Na Isključeno Dodirnite diff --git a/resources-hun/strings/strings.xml b/resources-hun/strings/strings.xml index fffc5c7..56568c2 100644 --- a/resources-hun/strings/strings.xml +++ b/resources-hun/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant Tovább Ki Koppintson a diff --git a/resources-ind/strings/strings.xml b/resources-ind/strings/strings.xml index 363cffd..7a4c027 100644 --- a/resources-ind/strings/strings.xml +++ b/resources-ind/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant Pada Mati Mengetuk diff --git a/resources-ita/strings/strings.xml b/resources-ita/strings/strings.xml index 4424a87..8819e8a 100644 --- a/resources-ita/strings/strings.xml +++ b/resources-ita/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant SU Spento Rubinetto diff --git a/resources-jpn/strings/strings.xml b/resources-jpn/strings/strings.xml index 4beea76..f7a1820 100644 --- a/resources-jpn/strings/strings.xml +++ b/resources-jpn/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant の上 オフ タップ diff --git a/resources-kor/strings/strings.xml b/resources-kor/strings/strings.xml index 95fa108..6c01f1f 100644 --- a/resources-kor/strings/strings.xml +++ b/resources-kor/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant ~에 끄다 수도꼭지 diff --git a/resources-lav/strings/strings.xml b/resources-lav/strings/strings.xml index fc32111..d751563 100644 --- a/resources-lav/strings/strings.xml +++ b/resources-lav/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant Ieslēgts Izslēgts Krāns diff --git a/resources-lit/strings/strings.xml b/resources-lit/strings/strings.xml index 27f6530..ecf17ea 100644 --- a/resources-lit/strings/strings.xml +++ b/resources-lit/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant Įjungta Išjungta Bakstelėkite @@ -39,5 +39,5 @@ API URL pabaigoje negali būti pasvirojo brūkšnio „/“ Gaunama meniu konfigūracija... Norėdami išeiti, braukite į dešinę\nPalieskite, kad pasiliktumėte - Norėdami išeiti, paspauskite „Atgal“.\nĮveskite, kad pasiliktumėte + Norėdami išeiti, paspauskite „Atgal“\nĮveskite, kad pasiliktumėte \ No newline at end of file diff --git a/resources-nob/strings/strings.xml b/resources-nob/strings/strings.xml index dbd376d..aa78fea 100644 --- a/resources-nob/strings/strings.xml +++ b/resources-nob/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant Av Trykk på diff --git a/resources-pol/strings/strings.xml b/resources-pol/strings/strings.xml index 3443b5c..4693a52 100644 --- a/resources-pol/strings/strings.xml +++ b/resources-pol/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant NA Wyłączony Uzyskiwać diff --git a/resources-por/strings/strings.xml b/resources-por/strings/strings.xml index 40db94e..2ebc52c 100644 --- a/resources-por/strings/strings.xml +++ b/resources-por/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant Sobre Desligado Tocar diff --git a/resources-ron/strings/strings.xml b/resources-ron/strings/strings.xml index a7f9c4d..8ea0f63 100644 --- a/resources-ron/strings/strings.xml +++ b/resources-ron/strings/strings.xml @@ -19,9 +19,9 @@ --> - HomeAssistant + HomeAssistant Pe - Off + Oprit Atingeți Meniul Sigur? diff --git a/resources-slo/strings/strings.xml b/resources-slo/strings/strings.xml index fe1b0a9..dfd6498 100644 --- a/resources-slo/strings/strings.xml +++ b/resources-slo/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant Zapnuté Vypnuté Klepnite diff --git a/resources-slv/strings/strings.xml b/resources-slv/strings/strings.xml index b227f93..7a418c5 100644 --- a/resources-slv/strings/strings.xml +++ b/resources-slv/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant Vklopljeno Izključeno Tapnite diff --git a/resources-spa/strings/strings.xml b/resources-spa/strings/strings.xml index 7f06793..4672bd5 100644 --- a/resources-spa/strings/strings.xml +++ b/resources-spa/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant En Apagado Grifo diff --git a/resources-swe/strings/strings.xml b/resources-swe/strings/strings.xml index cbf3281..3e7b1b2 100644 --- a/resources-swe/strings/strings.xml +++ b/resources-swe/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant Av Knacka diff --git a/resources-tha/strings/strings.xml b/resources-tha/strings/strings.xml index be930a6..a815cff 100644 --- a/resources-tha/strings/strings.xml +++ b/resources-tha/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant บน ปิด แตะ diff --git a/resources-tur/strings/strings.xml b/resources-tur/strings/strings.xml index b0cdf56..6c11bbc 100644 --- a/resources-tur/strings/strings.xml +++ b/resources-tur/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant Açık Kapalı Musluk diff --git a/resources-ukr/strings/strings.xml b/resources-ukr/strings/strings.xml index 2317a53..9b2eb25 100644 --- a/resources-ukr/strings/strings.xml +++ b/resources-ukr/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant Увімкнено Вимкнено Торкніться diff --git a/resources-vie/strings/strings.xml b/resources-vie/strings/strings.xml index f1cd623..a2bb775 100644 --- a/resources-vie/strings/strings.xml +++ b/resources-vie/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant TRÊN Tắt Vỗ nhẹ diff --git a/resources-zhs/strings/strings.xml b/resources-zhs/strings/strings.xml index b2ac390..df2c47d 100644 --- a/resources-zhs/strings/strings.xml +++ b/resources-zhs/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant 离开 轻敲 diff --git a/resources-zht/strings/strings.xml b/resources-zht/strings/strings.xml index 12ea7e4..8d14f5c 100644 --- a/resources-zht/strings/strings.xml +++ b/resources-zht/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant 離開 輕敲 diff --git a/resources-zsm/strings/strings.xml b/resources-zsm/strings/strings.xml index 74b3a20..5441bbc 100644 --- a/resources-zsm/strings/strings.xml +++ b/resources-zsm/strings/strings.xml @@ -19,7 +19,7 @@ --> - HomeAssistant + HomeAssistant hidup Mati Ketik diff --git a/resources/strings/strings.xml b/resources/strings/strings.xml index 5bda30c..42304ec 100644 --- a/resources/strings/strings.xml +++ b/resources/strings/strings.xml @@ -13,7 +13,7 @@ --> - HomeAssistant + HomeAssistant On Off Tap diff --git a/source/HomeAssistantGlanceView.mc b/source/HomeAssistantGlanceView.mc index f6ab6ec..efa828f 100644 --- a/source/HomeAssistantGlanceView.mc +++ b/source/HomeAssistantGlanceView.mc @@ -14,27 +14,29 @@ // // Description: // -// Application root for GarminHomeAssistant +// Glance view for GarminHomeAssistant // //----------------------------------------------------------------------------------- +using Toybox.Lang; using Toybox.WatchUi; using Toybox.Graphics; (:glance) class HomeAssistantGlanceView extends WatchUi.GlanceView { + private var mText as Lang.String; + function initialize() { GlanceView.initialize(); + + mText = WatchUi.loadResource($.Rez.Strings.AppName); } function onUpdate(dc) as Void { GlanceView.onUpdate(dc); - var font = Graphics.FONT_TINY; - var text = "GarminHomeAssistant"; - dc.setColor(Graphics.COLOR_WHITE, Graphics.COLOR_BLACK); - dc.drawText(0, dc.getHeight() / 2, font, text, Graphics.TEXT_JUSTIFY_LEFT | Graphics.TEXT_JUSTIFY_VCENTER); + dc.drawText(0, dc.getHeight() / 2, Graphics.FONT_TINY, mText, Graphics.TEXT_JUSTIFY_LEFT | Graphics.TEXT_JUSTIFY_VCENTER); } } From ba5f90c682734b2570e8622c68a58a90919780ec Mon Sep 17 00:00:00 2001 From: SomeoneOnEarth Date: Sat, 16 Dec 2023 22:02:19 +0100 Subject: [PATCH 16/18] Change bg color for error and root view --- source/ErrorView.mc | 5 ++--- source/RootView.mc | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/source/ErrorView.mc b/source/ErrorView.mc index 5dbadc0..80eb890 100644 --- a/source/ErrorView.mc +++ b/source/ErrorView.mc @@ -65,11 +65,10 @@ class ErrorView extends ScalableView { function onUpdate(dc as Graphics.Dc) as Void { var w = dc.getWidth(); var hw = w/2; - var bg = 0x3B444C; if(dc has :setAntiAlias) { dc.setAntiAlias(true); } - dc.setColor(Graphics.COLOR_WHITE, bg); + dc.setColor(Graphics.COLOR_WHITE, Graphics.COLOR_BLUE); dc.clear(); dc.drawBitmap(hw - mErrorIcon.getWidth()/2, mErrorIconMargin, mErrorIcon); mTextArea.draw(dc); @@ -86,4 +85,4 @@ class ErrorDelegate extends WatchUi.BehaviorDelegate { WatchUi.popView(WatchUi.SLIDE_DOWN); return true; } -} \ No newline at end of file +} diff --git a/source/RootView.mc b/source/RootView.mc index ca805d9..e1e5aae 100644 --- a/source/RootView.mc +++ b/source/RootView.mc @@ -84,11 +84,10 @@ class RootView extends ScalableView { } function onUpdate(dc as Graphics.Dc) as Void { - var bg = 0x3B444C; if(dc has :setAntiAlias) { dc.setAntiAlias(true); } - dc.setColor(Graphics.COLOR_WHITE, bg); + dc.setColor(Graphics.COLOR_WHITE, Graphics.COLOR_BLACK); dc.clear(); if(mApp.homeAssistantMenuIsLoaded()) { From 091cc7c2fe1b67a9f213e9ece7b2fa80f1f87a2f Mon Sep 17 00:00:00 2001 From: Philip Abbey Date: Sun, 17 Dec 2023 11:57:43 +0000 Subject: [PATCH 17/18] Update HomeAssistantService.mc Amended comment. --- source/HomeAssistantService.mc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/HomeAssistantService.mc b/source/HomeAssistantService.mc index 6b2b905..c88615c 100644 --- a/source/HomeAssistantService.mc +++ b/source/HomeAssistantService.mc @@ -122,7 +122,7 @@ class HomeAssistantService { } ErrorView.show(strNoInternet + "."); } else { - // Can't user null for parameters due to API version level. + // Can't use null for substring() parameters due to API version level. var url = (Properties.getValue("api_url") as Lang.String) + "/services/" + service.substring(0, service.find(".")) + "/" + service.substring(service.find(".")+1, service.length()); if (Globals.scDebug) { System.println("HomeAssistantService call() URL=" + url); From 19be6c28ed1e5e2a4be3e720856b969d361ea593 Mon Sep 17 00:00:00 2001 From: Philip Abbey Date: Sun, 17 Dec 2023 12:10:52 +0000 Subject: [PATCH 18/18] Update ErrorView.mc Removed commented out code. --- source/ErrorView.mc | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/ErrorView.mc b/source/ErrorView.mc index ff44ba3..0c5c5c8 100644 --- a/source/ErrorView.mc +++ b/source/ErrorView.mc @@ -129,11 +129,9 @@ class ErrorView extends ScalableView { } class ErrorDelegate extends WatchUi.BehaviorDelegate { - //private var mView as ErrorView; function initialize(view as ErrorView) { WatchUi.BehaviorDelegate.initialize(); - //mView = view; } function onBack() {