Added template option to toggle menu items

This commit is contained in:
Philip Abbey
2024-08-25 19:34:29 +01:00
parent 72e825566c
commit 685cda7924
3 changed files with 145 additions and 11 deletions

View File

@ -67,10 +67,12 @@ class HomeAssistantMenuItemFactory {
function toggle(
label as Lang.String or Lang.Symbol,
entity_id as Lang.String or Null,
template as Lang.String or Null,
confirm as Lang.Boolean
) as WatchUi.MenuItem {
return new HomeAssistantToggleMenuItem(
label,
template,
confirm,
{ "entity_id" => entity_id },
mMenuItemOptions