Added callback function to TemplateMenuItem

This commit is contained in:
Philip Abbey
2024-08-25 18:53:32 +01:00
parent ea32d71a2b
commit 1dc95eeac7
3 changed files with 15 additions and 5 deletions

View File

@ -37,6 +37,8 @@ class HomeAssistantGroupMenuItem extends TemplateMenuItem {
TemplateMenuItem.initialize(
definition.get("name") as Lang.String,
template,
// Now this feels very "closely coupled" to the application, but it is the most reliable method instead of using a timer.
getApp().method(:updateNextMenuItem),
icon,
options
);