Note that using TypeScript definitions this way will greatly limit your access to the data returned by the Homey API, since it doesn’t declare the properties of objects returned by the API.
For example, this is the all the data returned for a Ring Floodlight device:
"095ff1bd-b969-462d-a0df-01ee4f04f4fa": {
"id": "095ff1bd-b969-462d-a0df-01ee4f04f4fa",
"uri": "homey:device:095ff1bd-b969-462d-a0df-01ee4f04f4fa",
"driverId": "homey:app:com.amazon.ring:stickupcam",
"ownerUri": "homey:app:com.amazon.ring",
"name": "Hugo",
"note": null,
"zone": "5204dc44-8e9c-49e7-aed8-9d5c93330126",
"data": {
"id": 128842480
},
"icon": null,
"iconOverride": "camera",
"iconObj": {
"id": "a5ba9ca3e23e89dbbd327bb20dbcb32f",
"url": "/api/icon/b271a6a6-afd3-4534-9982-c989e58aab34"
},
"class": "sensor",
"virtualClass": null,
"capabilities": [
"alarm_generic",
"alarm_motion",
"flood_light",
"siren"
],
"capabilitiesObj": {
"alarm_generic": {
"id": "alarm_generic",
"type": "boolean",
"iconObj": null,
"title": "Generic alarm",
"getable": true,
"setable": false,
"insights": true,
"insightsTitleTrue": "Generic alarm turned on",
"insightsTitleFalse": "Generic alarm turned off",
"value": false,
"lastUpdated": "2023-03-27T17:43:47.453Z"
},
"alarm_motion": {
"id": "alarm_motion",
"type": "boolean",
"iconObj": null,
"title": "Motion alarm",
"getable": true,
"setable": false,
"insights": true,
"insightsTitleTrue": "Motion alarm turned on",
"insightsTitleFalse": "Motion alarm turned off",
"value": false,
"lastUpdated": "2024-08-14T12:32:43.653Z"
},
"flood_light": {
"id": "flood_light",
"type": "boolean",
"iconObj": null,
"title": "Flood light",
"getable": true,
"setable": true,
"insightsTitleTrue": null,
"insightsTitleFalse": null,
"value": false,
"lastUpdated": "2024-08-27T20:47:55.264Z"
},
"siren": {
"id": "siren",
"type": "boolean",
"iconObj": null,
"title": "Siren",
"getable": true,
"setable": true,
"insightsTitleTrue": null,
"insightsTitleFalse": null,
"value": false,
"lastUpdated": "2023-03-27T17:43:47.442Z"
}
},
"settings": {
"zone_activity_disabled": false,
"useMotionDetection": true,
"motionTimeout": 30,
"subscribeMotionDetection": true,
"useMotionAlerts": true,
"energy_value_constant": null
},
"settingsObj": true,
"flags": [],
"energy": null,
"energyObj": {
"W": null,
"batteries": [
"INTERNAL"
],
"cumulative": null,
"generator": null,
"approximated": null
},
"ui": {
"quickAction": "flood_light",
"components": [
{
"id": "toggle",
"capabilities": [
"flood_light",
"siren"
]
},
{
"id": "sensor",
"capabilities": [
"alarm_generic",
"alarm_motion"
]
}
],
"componentsStartAt": 1
},
"uiIndicator": null,
"available": true,
"unavailableMessage": null,
"warningMessage": null,
"ready": true,
"repair": true,
"unpair": false,
"images": [
{
"type": "camera",
"id": "Hugo",
"title": "snapshot",
"imageObj": {
"id": "47c25d42-3978-435b-92f0-b124589388be",
"ownerUri": "homey:app:com.amazon.ring",
"url": "/api/image/47c25d42-3978-435b-92f0-b124589388be",
"lastUpdated": 1724121489567
}
}
],
"color": "#1A98D5"
}
As you can see, this is way more than what is described in the documentation and thus in the TypeScript definitions…