diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/rpc/led-indicator.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/rpc/led-indicator.component.ts index 847987c215..efdf87bc6b 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/rpc/led-indicator.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/rpc/led-indicator.component.ts @@ -320,7 +320,7 @@ export class LedIndicatorComponent extends PageComponent implements OnInit, OnDe const keyData = data[0]; if (keyData && keyData.data && keyData.data[0]) { const attrValue = keyData.data[0][1]; - if (attrValue) { + if (isDefined(attrValue)) { let parsed = null; try { parsed = this.parseValueFunction(JSON.parse(attrValue)); diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/rpc/round-switch.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/rpc/round-switch.component.ts index fe6b8cbeb6..a8ed46e529 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/rpc/round-switch.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/rpc/round-switch.component.ts @@ -315,7 +315,7 @@ export class RoundSwitchComponent extends PageComponent implements OnInit, OnDes const keyData = data[0]; if (keyData && keyData.data && keyData.data[0]) { const attrValue = keyData.data[0][1]; - if (attrValue) { + if (isDefined(attrValue)) { let parsed = null; try { parsed = this.parseValueFunction(JSON.parse(attrValue)); diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/rpc/switch.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/rpc/switch.component.ts index 2fe2404b95..f4a84d0326 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/rpc/switch.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/rpc/switch.component.ts @@ -333,7 +333,7 @@ export class SwitchComponent extends PageComponent implements OnInit, OnDestroy const keyData = data[0]; if (keyData && keyData.data && keyData.data[0]) { const attrValue = keyData.data[0][1]; - if (attrValue) { + if (isDefined(attrValue)) { let parsed = null; try { parsed = this.parseValueFunction(JSON.parse(attrValue));