mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-06-17 11:58:30 +00:00
Support for Vivoactive 6 device
This required an update to the SDK to version 8.1.0. The new SDK found some new code warnings for unreachable code previously known to be reached based on stricter type checking, so fixed in this commit too.
This commit is contained in:
@ -51,7 +51,7 @@ class HomeAssistantMenuItem extends WatchUi.IconMenuItem {
|
||||
return mTemplate;
|
||||
}
|
||||
|
||||
function updateState(data as Lang.String or Lang.Dictionary or Null) as Void {
|
||||
function updateState(data as Lang.String or Lang.Dictionary or Lang.Number or Lang.Float or Null) as Void {
|
||||
if (data == null) {
|
||||
setSubLabel($.Rez.Strings.Empty);
|
||||
} else if(data instanceof Lang.String) {
|
||||
|
@ -75,7 +75,7 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem {
|
||||
return "{{states('" + mData.get("entity_id") + "')}}";
|
||||
}
|
||||
|
||||
function updateState(data as Lang.String or Lang.Dictionary or Null) as Void {
|
||||
function updateState(data as Lang.String or Lang.Dictionary or Lang.Number or Lang.Float or Null) as Void {
|
||||
if (data == null) {
|
||||
setSubLabel(null);
|
||||
} else if(data instanceof Lang.String) {
|
||||
|
Reference in New Issue
Block a user