@riddix/hamh 2.1.0-alpha.682 → 2.1.0-alpha.684
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/backend/cli.js
CHANGED
|
@@ -148433,6 +148433,15 @@ function bridgeIconApi(storageLocation) {
|
|
|
148433
148433
|
res.json({ success: true, iconUrl });
|
|
148434
148434
|
}
|
|
148435
148435
|
);
|
|
148436
|
+
router.get(
|
|
148437
|
+
"/:bridgeId/exists",
|
|
148438
|
+
(req, res) => {
|
|
148439
|
+
const bridgeId = req.params.bridgeId;
|
|
148440
|
+
const files = fs2.readdirSync(iconsDir);
|
|
148441
|
+
const exists = files.some((f) => f.startsWith(`${bridgeId}.`));
|
|
148442
|
+
res.json({ exists });
|
|
148443
|
+
}
|
|
148444
|
+
);
|
|
148436
148445
|
router.get("/:bridgeId", (req, res) => {
|
|
148437
148446
|
const bridgeId = req.params.bridgeId;
|
|
148438
148447
|
const files = fs2.readdirSync(iconsDir);
|
|
@@ -148456,16 +148465,6 @@ function bridgeIconApi(storageLocation) {
|
|
|
148456
148465
|
fs2.unlinkSync(filePath);
|
|
148457
148466
|
res.json({ success: true });
|
|
148458
148467
|
});
|
|
148459
|
-
router.head("/:bridgeId", (req, res) => {
|
|
148460
|
-
const bridgeId = req.params.bridgeId;
|
|
148461
|
-
const files = fs2.readdirSync(iconsDir);
|
|
148462
|
-
const iconFile = files.find((f) => f.startsWith(`${bridgeId}.`));
|
|
148463
|
-
if (iconFile) {
|
|
148464
|
-
res.status(200).end();
|
|
148465
|
-
} else {
|
|
148466
|
-
res.status(404).end();
|
|
148467
|
-
}
|
|
148468
|
-
});
|
|
148469
148468
|
return router;
|
|
148470
148469
|
}
|
|
148471
148470
|
|
|
@@ -172710,12 +172709,13 @@ var DEVICE_CLASS_TO_MATTER_TYPE = {
|
|
|
172710
172709
|
type: WindowCovering3.WindowCoveringType.Rollershade,
|
|
172711
172710
|
endProductType: WindowCovering3.EndProductType.RollerShade
|
|
172712
172711
|
},
|
|
172713
|
-
// Velux-style motorized roof/casement windows.
|
|
172714
|
-
//
|
|
172715
|
-
//
|
|
172712
|
+
// Velux-style motorized roof/casement windows. No Matter WindowCoveringType
|
|
172713
|
+
// for "window", so map to Rollershade + RollerShade (the spec default pair).
|
|
172714
|
+
// EndProductType is a FixedAttribute, and Alexa's routine picker drops
|
|
172715
|
+
// devices it can't categorize - Unknown (255) lands there (#312).
|
|
172716
172716
|
window: {
|
|
172717
172717
|
type: WindowCovering3.WindowCoveringType.Rollershade,
|
|
172718
|
-
endProductType: WindowCovering3.EndProductType.
|
|
172718
|
+
endProductType: WindowCovering3.EndProductType.RollerShade
|
|
172719
172719
|
}
|
|
172720
172720
|
};
|
|
172721
172721
|
var deviceClassMapping = (entity) => {
|