Added alerts on error

And removed (and changed) API key... doh!
This commit is contained in:
Philip Abbey
2023-10-31 21:22:14 +00:00
parent 7dd3ccc670
commit 2b06e63c03
5 changed files with 26 additions and 4 deletions

View File

@ -86,6 +86,13 @@ class HomeAssistantMenuItem extends WatchUi.MenuItem {
if (Globals.debug) {
System.println("HomeAssistantMenuItem Note - executeScript(): No Internet connection, skipping API call.");
}
new Alert({
:timeout => Globals.alertTimeout,
:font => Graphics.FONT_SYSTEM_MEDIUM,
:text => "No Internet connection",
:fgcolor => Graphics.COLOR_RED,
:bgcolor => Graphics.COLOR_BLACK
}).pushView(WatchUi.SLIDE_IMMEDIATE);
}
}