Corrected log strings

This commit is contained in:
SomeoneOnEarth
2023-11-19 01:29:57 +01:00
parent 5f8ffdce5e
commit 604294ae0b

View File

@ -67,22 +67,22 @@ class HomeAssistantApp extends Application.AppBase {
if ((Properties.getValue("api_key") as Lang.String).length() == 0) {
if (Globals.scDebug) {
System.println("HomeAssistantMenuItem execScript(): No API key in the application settings.");
System.println("HomeAssistantApp getInitialView(): No API key in the application settings.");
}
return [new ErrorView(strNoApiKey + "."), new ErrorDelegate()] as Lang.Array<WatchUi.Views or WatchUi.InputDelegates>;
} else if (api_url.length() == 0) {
if (Globals.scDebug) {
System.println("HomeAssistantMenuItem execScript(): No API URL in the application settings.");
System.println("HomeAssistantApp getInitialView(): No API URL in the application settings.");
}
return [new ErrorView(strNoApiUrl + "."), new ErrorDelegate()] as Lang.Array<WatchUi.Views or WatchUi.InputDelegates>;
} else if (api_url.substring(-1, api_url.length()).equals("/")) {
if (Globals.scDebug) {
System.println("HomeAssistantMenuItem execScript(): API URL must not have a trailing slash '/'.");
System.println("HomeAssistantApp getInitialView(): API URL must not have a trailing slash '/'.");
}
return [new ErrorView(strTrailingSlashErr + "."), new ErrorDelegate()] as Lang.Array<WatchUi.Views or WatchUi.InputDelegates>;
} else if ((Properties.getValue("config_url") as Lang.String).length() == 0) {
if (Globals.scDebug) {
System.println("HomeAssistantMenuItem execScript(): No configuration URL in the application settings.");
System.println("HomeAssistantApp getInitialView(): No configuration URL in the application settings.");
}
return [new ErrorView(strNoConfigUrl + "."), new ErrorDelegate()] as Lang.Array<WatchUi.Views or WatchUi.InputDelegates>;
} else if (! System.getDeviceSettings().phoneConnected) {