Skip to content

[Bug]: After updating to version 9.11, a TypeScript compilation error occurs when calling setStateAsync #2092

@UrsKobler

Description

@UrsKobler

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

TypeScript

The problem

After updating the JavaScript adapter from version 8.9.2 to 9.11, a TypeScript compiler error is displayed when calling the **setStateAsync** function.

Image

All JavaScript versions from 8.9.2 up to and including 9.10 work without errors. This error only occurs since the type fix for TypeScript in version 9.11.

iobroker.current.log (in debug mode!)

20.12.2025, 15:45:26.274 [info ]: javascript.0 (4217) script.js.Energy.Powerstation.EcoFlowDeltaMax2000: Stopping script
20.12.2025, 15:45:28.011 [info ]: javascript.0 (4217) script.js.Energy.Powerstation.EcoFlowDeltaMax2000: Compiling TypeScript source
20.12.2025, 15:45:28.104 [error]: javascript.0 (4217) script.js.Energy.Powerstation.EcoFlowDeltaMax2000: TypeScript compilation failed:
await setStateAsync(${ID_USERDATA_ECOFLOW_DELTA_MAX_2000}.${key}, { val: value, ack: true });
^
ERROR: Type 'unknown' is not assignable to type 'StateValue'.

Version of nodejs

22.21.0

Version of ioBroker js-controller

7.07

Version of adapter

9.11

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions