christianh17 / ioBroker.bydhvs

BYD HVS Battery Adapter for ioBroker
MIT License
18 stars 10 forks source link

Fix LVS support #202

Closed nobodyMO closed 11 months ago

nobodyMO commented 1 year ago

This pull request fixes the suport for LVS with js.controller 4.x and 5.x

Without, the following error acccours:

error: bydhvs.0 (1877326) Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().
error: bydhvs.0 (1877326) unhandled promise rejection: undefined is not a valid state value
error: bydhvs.0 (1877326) Error: undefined is not a valid state value

at Object.maybeCallbackWithError (/opt/iobroker/node_modules/@iobroker/js-controller-common/build/lib/common/maybeCallback.js:35:17)
--
at AdapterClass._setState (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:5372:49)
at AdapterClass.setState (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:5333:21)
at setStates (/opt/iobroker/node_modules/iobroker.bydhvs/main.js:690:13)
at Socket. (/opt/iobroker/node_modules/iobroker.bydhvs/main.js:827:17)
at Socket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
christianh17 commented 11 months ago

Hi! Sorry, I did not see this commit :-(. It was right just now. Kind regards, Christian