Moved template status updates to webhooks

This seems to work for non-privileged users.
This commit is contained in:
Philip Abbey
2024-07-19 15:15:32 +01:00
parent 1c4add693d
commit dfa4cdd9b8
5 changed files with 87 additions and 40 deletions

View File

@ -204,6 +204,7 @@ class HomeAssistantApp extends Application.AppBase {
// asynchronous and affects how the views are managed.
(:glance)
function fetchMenuConfig() as Lang.Boolean {
// System.println("URL = " + Settings.getConfigUrl());
if (Settings.getConfigUrl().equals("")) {
mMenuStatus = WatchUi.loadResource($.Rez.Strings.Unconfigured) as Lang.String;
WatchUi.requestUpdate();
@ -257,6 +258,9 @@ class HomeAssistantApp extends Application.AppBase {
private function buildMenu(menu as Lang.Dictionary) {
mHaMenu = new HomeAssistantView(menu, null);
mQuitTimer.begin();
}
function startUpdates() {
mItemsToUpdate = mHaMenu.getItemsToUpdate();
// Start the continuous update process that continues for as long as the application is running.
// The chain of functions from 'updateNextMenuItem()' calls 'updateNextMenuItem()' on completion.