node-red-contrib-unifi-ultimate 1.1.21 → 1.1.23

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.
@@ -30,7 +30,12 @@ function extractLicensePlates(event) {
30
30
  thumbnails.forEach((thumbnail) => {
31
31
  if (!thumbnail || typeof thumbnail !== "object") return;
32
32
  if (thumbnail.type === "licensePlate" || (thumbnail.type === "vehicle" && hasPlateType)) {
33
- addPlate(thumbnail.name);
33
+ // `name` is the OCR of a single frame and is often truncated or
34
+ // misread ("4II0"); `matchedName` is the plate Protect settles on
35
+ // across the whole track and shows in its own UI.
36
+ const attributes = thumbnail.attributes && typeof thumbnail.attributes === "object" ? thumbnail.attributes : {};
37
+ const matchedName = typeof attributes.matchedName === "string" ? attributes.matchedName.trim() : "";
38
+ addPlate(matchedName || thumbnail.name);
34
39
  }
35
40
  });
36
41
  return Array.from(plates.values());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-unifi-ultimate",
3
- "version": "1.1.21",
3
+ "version": "1.1.23",
4
4
  "description": "Node-RED nodes for Ubiquiti UniFi integrations, including UniFi Protect, UniFi Access, and UniFi Network.",
5
5
  "files": [
6
6
  "nodes/",