@camstack/addon-import-alexa 0.2.194 → 0.2.196

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-import-alexa",
3
- "version": "0.2.194",
3
+ "version": "0.2.196",
4
4
  "description": "Alexa device-import provider for CamStack — imports the smart-home devices in a user's Alexa account via the unofficial alexa-remote2 cookie/token client (the inverse of the Alexa exporter)",
5
5
  "keywords": [
6
6
  "camstack",
@@ -72,7 +72,7 @@
72
72
  }
73
73
  ],
74
74
  "requires": {
75
- "server": ">=1.2.788"
75
+ "server": ">=1.2.793"
76
76
  }
77
77
  },
78
78
  "files": [
@@ -110,6 +110,11 @@ def normalize_device(raw: dict) -> dict | None:
110
110
  }
111
111
  if room != "":
112
112
  result["room"] = room
113
+ parents = raw.get("parentClusters")
114
+ if isinstance(parents, list):
115
+ serials = [p for p in parents if isinstance(p, str) and p != ""]
116
+ if serials:
117
+ result["parentClusters"] = serials
113
118
  return result
114
119
 
115
120
 
@@ -246,7 +251,7 @@ class AlexaPyGateway:
246
251
  public = [
247
252
  {
248
253
  key: device[key]
249
- for key in ("id", "name", "family", "online", "kind", "dnd", "deviceType", "room")
254
+ for key in ("id", "name", "family", "online", "kind", "dnd", "deviceType", "room", "parentClusters")
250
255
  if key in device
251
256
  }
252
257
  for device in devices