You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Falsche Warnung: Default value has to be stringified but received type "object" #2307
This issue is still present in the current beta version of this adapter
There is no other (open) issue with the same topic (use the search!)
This issue is not described in the adapter documentation / FAQ (read the docs!)
Script type
Javascript
The problem
constidObj='0_userdata.0.Test.neues_Objekt';// erzeugt Warnung "Default value has to be stringified but received type "object" This will throw an error up from js-controller version 7.0.0!"createState(idObj,{name: 'neues Objekt',type: 'object',read: true,write: true,def: {}});// erzeugt keine Warnung:createState(idObj,{name: 'neues Objekt',type: 'object',read: true,write: true},function(){setState(idObj,{},true);});
Da der zweite Parameter im Falle eines Objekts als common interpretiert wird, muss man die Initialisierung per common.def vornehmen, was allerdings zu der gezeigten Warnung führt. Siehe Forum
Ah, okay. Falsch verstanden. Ich hatte mich darauf fokussiert, dass diese Signatur in der Dokumentation aktuell gar nicht vorgesehen bzw. dokumentiert ist (ohne Callback).
This issue is still present in the current beta version of this adapter[x] There is no other (open) issue with the same topic (use the search!)[x] This issue is not described in the adapter documentation / FAQ (read the docs!)
Script type
Javascript
The problem
const idObj = '0_userdata.0.Test.neues_Objekt';
// erzeugt Warnung "Default value has to be stringified but received type "object" This will throw an error up from js-controller version 7.0.0!"
createState(idObj, {name: 'neues Objekt', type: 'object', read: true, write: true, def: {}});
Activity
klein0r commentedon Jul 21, 2026
See
ioBroker.javascript/docs/en/javascript.md
Lines 1043 to 1049 in 6f93d74
The second parameter is the initValue. The correct code would be
But: Since the type is
object, the second parameter will be interpreted as the object definition.paul53 commentedon Jul 21, 2026
Da der zweite Parameter im Falle eines Objekts als common interpretiert wird, muss man die Initialisierung per common.def vornehmen, was allerdings zu der gezeigten Warnung führt. Siehe Forum
klein0r commentedon Jul 21, 2026
Ah, okay. Falsch verstanden. Ich hatte mich darauf fokussiert, dass diese Signatur in der Dokumentation aktuell gar nicht vorgesehen bzw. dokumentiert ist (ohne Callback).
GermanBluefox commentedon Aug 15, 2026
Die Objekte werden als string gespeichert. Deswegen def muss auch string sien
Correcting #2307
Added a wizard to the rule editor (#2344)
Start Wizard automatically (#2345)
Fixing CI (#2346)
[OFFICIAL RELEASE] 10.1.0
Blockly ts (#2354)