mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-06-17 20:08:33 +00:00
add TemplateMenuItem
This commit is contained in:
@ -46,6 +46,7 @@ class HomeAssistantMenuItemFactory {
|
||||
:locX => WatchUi.LAYOUT_HALIGN_CENTER,
|
||||
:locY => WatchUi.LAYOUT_VALIGN_CENTER
|
||||
});
|
||||
|
||||
mHomeAssistantService = new HomeAssistantService();
|
||||
}
|
||||
|
||||
@ -66,6 +67,24 @@ class HomeAssistantMenuItemFactory {
|
||||
);
|
||||
}
|
||||
|
||||
function template(
|
||||
label as Lang.String or Lang.Symbol,
|
||||
identifier as Lang.Object or Null,
|
||||
template as Lang.String or Null,
|
||||
service as Lang.String or Null,
|
||||
confirm as Lang.Boolean
|
||||
) as WatchUi.MenuItem {
|
||||
return new HomeAssistantTemplateMenuItem(
|
||||
label,
|
||||
identifier,
|
||||
template,
|
||||
service,
|
||||
confirm,
|
||||
mMenuItemOptions,
|
||||
mHomeAssistantService
|
||||
);
|
||||
}
|
||||
|
||||
function tap(
|
||||
label as Lang.String or Lang.Symbol,
|
||||
identifier as Lang.Object or Null,
|
||||
|
Reference in New Issue
Block a user