Skip to content

[Bug]: Falsche Warnung: Default value has to be stringified but received type "object" #2307

Description

@paul53

I'm sure that

  • 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

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: {}});

// erzeugt keine Warnung:
createState(idObj, {name: 'neues Objekt', type: 'object', read: true, write: true}, function() {
    setState(idObj, {}, true);
});

iobroker.current.log (in debug mode!)

No response

Version of nodejs

22.23.1

Version of ioBroker js-controller

7.2.2

Version of adapter

9.0.18

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions