Allow toggles to work if template fails

This commit is contained in:
Joseph Abbey
2024-08-26 20:11:19 +01:00
parent 2a48790f9c
commit bd37d5f2a8
3 changed files with 46 additions and 16 deletions

View File

@ -53,7 +53,7 @@ class HomeAssistantGroupMenuItem extends WatchUi.IconMenuItem {
function updateState(data as Lang.String or Lang.Dictionary or Null) as Void {
if (data == null) {
setSubLabel($.Rez.Strings.Empty);
setSubLabel(null);
} else if(data instanceof Lang.String) {
setSubLabel(data);
} else if(data instanceof Lang.Dictionary) {