# Fragen zum Setzen von Capabilities aus HomeyScript / COP-Berechnung Klimaanlage

**URL:** <https://community.homey.app/t/fragen-zum-setzen-von-capabilities-aus-homeyscript-cop-berechnung-klimaanlage/137701>\
**Category:** Apps (DE)\
**Created:** [June 6, 2025, 9:14am UTC](https://community.homey.app/t/fragen-zum-setzen-von-capabilities-aus-homeyscript-cop-berechnung-klimaanlage/137701 "2025-06-06T09:14:29Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [June 6, 2025, 2:10pm UTC](https://community.homey.app/t/fragen-zum-setzen-von-capabilities-aus-homeyscript-cop-berechnung-klimaanlage/137701/4 "2025-06-06T14:10:05Z")

</div>

Euhhhh, ich glaube, das ist es, was du meinst, einen Wert in ein Feld eines “erweiterten virtuellen Geräts” schreiben?

> [@\[APP\]\[Pro\] Advanced Virtual Device (Device Capabilities App) with Unique Text Status Indicator](https://community.homey.app/t/app-pro-advanced-virtual-device-device-capabilities-app-with-unique-text-status-indicator/68198/729):
>
> Writing a value to an AVD field should be possible like this:
> 
> ```auto
> let dcApp = await Homey.apps.getApp({ id: 'nl.qluster-it.DeviceCapabilities' });
> await dcApp.post({
> path: 'setvalue',
> body: {
> device: 'c34dc5b4-3c30-48a9-8a4e-014aea93d00d',
> field: 'measure_power',
> value: 501,
> },
> });
> 
> ```

Die Nummer bei `Gerät` ist die Geräte-ID  
Hier findest du sie:  
[https://tools.developer.homey.app/tools/devices](https://tools.developer.homey.app/tools/devices)

Oder,  
finde es mit diesem Skript:

```auto
// Change "my_device_name" into device name you want to find the ID of
const deviceName = "my_device_name";
// End of user input

const devices = await Homey.devices.getDevices();

for (const device of Object.values(devices)) {  
  if (device.name === deviceName) {
    // Return some properties. Just remove what you don't need
    log(`\nName:\t\t ${device.name} \nZone:\t\t ${device.zoneName} \nID:\t\t ${device.id} \nDriver:\t\t ${device.driverId} \nCapabilities:\t ${device.capabilities} \nBattery:\t ${device.energyObj.batteries} \nNote\t\t ${device.note}`);
    // To show ALL device data, uncomment the next lime:
    //log(device);
  }
};
return(true);

```

---

_[View the full topic](https://community.homey.app/t/fragen-zum-setzen-von-capabilities-aus-homeyscript-cop-berechnung-klimaanlage/137701)._
