homebridge-tydom 0.28.0 → 0.29.0

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.
package/dist/index.js CHANGED
@@ -236,6 +236,9 @@ var getTydomDeviceData = async (client, { deviceId, endpointId }) => {
236
236
  }
237
237
  return res.data ? res.data : res;
238
238
  });
239
+ promise.catch(() => {
240
+ cacheMap.delete(uri);
241
+ });
239
242
  cacheMap.set(uri, { time: now, promise });
240
243
  return promise;
241
244
  };
@@ -249,6 +252,9 @@ var runTydomDeviceCommand = async (client, name, { deviceId, endpointId, searchP
249
252
  }
250
253
  }
251
254
  const promise = client.command(uri);
255
+ promise.catch(() => {
256
+ cacheMap.delete(uri);
257
+ });
252
258
  cacheMap.set(uri, { time: now, promise });
253
259
  return promise;
254
260
  };