diff --git a/manifest.xml b/manifest.xml index 564c85b..a4fac20 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 Widget/Glance App id="bf69be91-5833-4d96-92ea-c5f1a9db5dcc" Test Application id="98c36259-498a-4458-9cef-74a273ad2bc3" diff --git a/resources-ara/strings/strings.xml b/resources-ara/strings/strings.xml index 4ac0a2a..5c199d8 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 645957c..36c6be5 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 4c092d7..644f73c 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 72b8cf2..d6d56b1 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 ea19aa5..d3f5997 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 612e677..a2d436c 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 87d99b4..ef9d823 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 57e3aaa..7983e88 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 16a199d..c27f006 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 05ce815..fddae9b 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 d8251f7..8a9c4ac 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 0a45bcd..a1342dc 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 674d8c1..8a25dc3 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 56568c2..2b4ad46 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 7a4c027..108a97a 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 8819e8a..1c1a8be 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 f7a1820..4ddccc4 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 6c01f1f..33ec523 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 d751563..0564220 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 ecf17ea..5cf3bd0 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 aa78fea..7341591 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 4693a52..c785d8b 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 2ebc52c..11783fe 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 8ea0f63..2a8382c 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 dfd6498..cca39a4 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 7a418c5..3a74e54 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 4672bd5..ed15a39 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 3e7b1b2..4d45a43 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 a815cff..fb13797 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 6c11bbc..6b2ba9d 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 9b2eb25..ea9c99c 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 a2bb775..68950bd 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 df2c47d..aa05016 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 8d14f5c..daf676d 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 5441bbc..7d229d2 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 42304ec..de6e0fc 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/ErrorView.mc b/source/ErrorView.mc index 80eb890..0c5c5c8 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); } @@ -74,15 +87,57 @@ 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() { + + function initialize(view as ErrorView) { WatchUi.BehaviorDelegate.initialize(); } + function onBack() { getApp().getQuitTimer().reset(); - WatchUi.popView(WatchUi.SLIDE_DOWN); + ErrorView.unShow(); return true; } + } 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 889c119..41b54b3 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: @@ -108,32 +108,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 RootView(self), new RootViewDelegate(self)] as Lang.Array; @@ -151,25 +151,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); mQuitTimer.begin(); @@ -184,12 +182,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/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/HomeAssistantService.mc b/source/HomeAssistantService.mc index 3b96d2b..c88615c 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,13 +115,14 @@ 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 { + // 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); diff --git a/source/HomeAssistantToggleMenuItem.mc b/source/HomeAssistantToggleMenuItem.mc index 9bbbe89..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: @@ -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'. diff --git a/source/HomeAssistantView.mc b/source/HomeAssistantView.mc index c09a42e..3e2f6d0 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: