optolink-bridge 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +1 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -150,7 +150,7 @@ const packetQueue = async.queue(async task => {
150
150
  trace && console.log(dateTimeString(), directionName(task.direction), (task.data ?? encodePacket(task.packet, task.direction & fromOpto)).toString('hex'));
151
151
 
152
152
  const packet = task.packet ?? parsePacket(task.data, task.direction & fromOpto);
153
- if (packet.rest) {
153
+ if (packet.rest?.length) {
154
154
  // if there is any rest, two packets have been sent in the same direction, so unshift the rest as the next packet to the queue
155
155
  packetQueue.unshift({ data: packet.rest, direction: task.direction });
156
156
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "optolink-bridge",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Safely bridge the Optolink bus of your Viessmann heating system and publish attributes via MQTT + Home Assistant Device Discovery",
5
5
  "keywords": [
6
6
  "viessmann",