diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/action/set-value-action-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/action/set-value-action-settings.component.ts index bb2c6024db..6578d6a5b4 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/action/set-value-action-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/action/set-value-action-settings.component.ts @@ -18,7 +18,7 @@ import { SetValueAction, SetValueSettings, ValueToDataType } from '@shared/model import { TranslateService } from '@ngx-translate/core'; import { IAliasController } from '@core/api/widget-api.models'; import { TargetDevice, widgetType } from '@shared/models/widget.models'; -import { isDefinedAndNotNull } from '@core/utils'; +import { isDefinedAndNotNull, isObject } from '@core/utils'; import { SetValueActionSettingsPanelComponent } from '@home/components/widget/lib/settings/common/action/set-value-action-settings-panel.component'; @@ -136,6 +136,9 @@ export class SetValueActionSettingsComponent implements OnInit, ControlValueAcce break; case ValueToDataType.CONSTANT: value = this.modelValue.valueToData.constantValue; + if (isObject(value)) { + value = JSON.stringify(value); + } break; case ValueToDataType.FUNCTION: value = 'f(value)';