ioBroker / ioBroker.javascript

Script engine for JavaScript and Blockly
MIT License
320 stars 119 forks source link

There is an implementation `setStateChanged`/`setStateChangedAsync` based on `adapter.setForeignStateChanged`. #1541

Closed PeterVoronov closed 3 months ago

PeterVoronov commented 3 months ago

Notise: looks like the adapter.setForeignStateChanged use the state.ts value to compare, as result, it always be changed. https://github.com/ioBroker/ioBroker.js-controller/blob/5f3c5bf6099dd086b20dcd9daf67e17ac5bcb31f/packages/adapter/src/lib/adapter/adapter.ts#L8000 There are two possibility to solve - to request change in ioBroker.js-controller, or make own comparison of new and old state attributes.

klein0r commented 3 months ago

Please add some integration tests to check if everything works as expected (since those changes are very complex)

PeterVoronov commented 3 months ago

Please add some integration tests to check if everything works as expected (since those changes are very complex)

Sure. Done: ce5f071