# Basics with HomeyScript - device capabilities

**URL:** <https://community.homey.app/t/basics-with-homeyscript-device-capabilities/21297>\
**Category:** Questions & Help\
**Tags:** homeyscript\
**Created:** [November 25, 2019, 2:17pm UTC](https://community.homey.app/t/basics-with-homeyscript-device-capabilities/21297 "2019-11-25T14:17:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomees](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tomees/32/18175_2.png) [@tomees](https://community.homey.app/u/tomees)\
**Post date:** [November 25, 2019, 2:17pm UTC](https://community.homey.app/t/basics-with-homeyscript-device-capabilities/21297/1 "2019-11-25T14:17:40Z")

</div>

Hi, im starting with HomeyScript and right at the beginning have a question.

i have this construction

```
let someDevice = await Homey.devices.getDevice({id: 'ed766ab2-21fb-44cf-b9c6-d58bf75bed44'});

```

why i can’t use

```
someDevice.getCapabilities()
//or
someDevice.getCapability('measure_temperature')
// returning someDevice.getCapability is not a function

```

only way i found is

```
someDevice.capabilitiesObj.measure_temperature

```

?  
thanks

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [November 25, 2019, 3:01pm UTC](https://community.homey.app/t/basics-with-homeyscript-device-capabilities/21297/2 "2019-11-25T15:01:30Z")

</div>

Homeyscript uses the [Web API](https://developer.athom.com/docs/api), not the [App API](https://apps.developer.athom.com/).

So `Homey.devices.getDevice()` returns a [`HomeyAPI.ManagerDevices.Device`](https://developer.athom.com/docs/api/HomeyAPI.ManagerDevices.Device.html) instance. And the only method this instance has is [`makeCapabilityInstance()`](https://developer.athom.com/docs/api/HomeyAPI.ManagerDevices.Device.html#makeCapabilityInstance).

---

<div class="post-metadata">

**Author:** ![tomees](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tomees/32/18175_2.png) [@tomees](https://community.homey.app/u/tomees)\
**Post date:** [November 25, 2019, 4:56pm UTC](https://community.homey.app/t/basics-with-homeyscript-device-capabilities/21297/3 "2019-11-25T16:56:59Z")

</div>

Thank you, my fault… now its all ok 🙂
