Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
NebzHB authored Jan 28, 2024
1 parent a4127cf commit d55a586
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6415,20 +6415,19 @@ JeedomBridgedAccessory.prototype.delServices = function(accessory) {
let service;
try {
const cachedValues = [];
const serviceList = accessory.services.filter((svc) =>
svc.UUID !== Service.AccessoryInformation.UUID &&
svc.UUID !== Service.BridgingState.UUID
);
const serviceList = accessory.services.filter((svc) =>
svc.UUID !== Service.AccessoryInformation.UUID && svc.UUID !== Service.BridgingState.UUID

Check failure on line 6419 in index.js

View workflow job for this annotation

GitHub Actions / build (18.x)

Expected no linebreak before this expression

Check failure on line 6419 in index.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Expected no linebreak before this expression

Check failure on line 6419 in index.js

View workflow job for this annotation

GitHub Actions / build (21.x)

Expected no linebreak before this expression
);

serviceList.forEach((svc) => {
serviceList.forEach((svc) => {
service=svc;
this.log('debug', ' Suppression service :' + service.displayName + ' subtype:' + service.subtype + ' UUID:' + service.UUID);
service.characteristics.forEach((c) => {
this.log('debug', ' Caractéristique :' + c.displayName + ' valeur cache:' + c.value);
cachedValues[service.subtype + c.displayName] = c.value;
});
accessory.removeService(service);
});
});
return cachedValues;
}
catch(e){
Expand Down Expand Up @@ -6607,5 +6606,5 @@ function RGBtoHSV(r, g, b) {
// -- id : id to find
// -- Return : Object found
function findMyID(obj, id) {
return Object.values(obj).find(item => item && item.id == id) || -1;
return Object.values(obj).find((item) => item && item.id == id) || -1;
}

0 comments on commit d55a586

Please sign in to comment.