# How to set device settings in Homey script

**URL:** <https://community.homey.app/t/how-to-set-device-settings-in-homey-script/45559>\
**Category:** Questions & Help\
**Tags:** homeyscript\
**Created:** [March 31, 2021, 6:25pm UTC](https://community.homey.app/t/how-to-set-device-settings-in-homey-script/45559 "2021-03-31T18:25:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hans\_Wiersma](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hans_wiersma/32/38617_2.png) [@Hans\_Wiersma](https://community.homey.app/u/Hans_Wiersma)\
**Post date:** [March 31, 2021, 6:25pm UTC](https://community.homey.app/t/how-to-set-device-settings-in-homey-script/45559/1 "2021-03-31T18:25:30Z")

</div>

Does anyone have an example of how to change a device setting using Homey script?  
I am able to read out all settings of a device (sensor, etc.). But I can’t figure out how to change a setting using Homey script.  
I have tried using the setDeviceSettings() method, but then I get the error: device.setDeviceSettings is not a function.  
Any help appreciated.

---

<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:** [April 1, 2021, 1:36am UTC](https://community.homey.app/t/how-to-set-device-settings-in-homey-script/45559/2 "2021-04-01T01:36:49Z")

</div>

Maybe this gets you started?  
(I searched for “set device settings”)

> [@Setting a device capability value from app.js](https://community.homey.app/t/setting-a-device-capability-value-from-app-js/15220):
>
> Hi, I am a new Homey user and making my first app. I created a device with a certain capability of which I can set the value from device.js. However, I calculated a value in app.js (copy & paste code of other existing app) which I want to write to the device capability. Probably it is an easy thing to do but I am missing something. Can someone help me?

---

<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:** [April 1, 2021, 5:22am UTC](https://community.homey.app/t/how-to-set-device-settings-in-homey-script/45559/3 "2021-04-01T05:22:11Z")

</div>

What do you mean specifically by “setting”? If you want to set a device’s capability, look at the Homeyscript example code [here](https://github.com/athombv/com.athom.homeyscript#example).

---

<div class="post-metadata">

**Author:** ![Hans\_Wiersma](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hans_wiersma/32/38617_2.png) [@Hans\_Wiersma](https://community.homey.app/u/Hans_Wiersma)\
**Post date:** [April 1, 2021, 6:15pm UTC](https://community.homey.app/t/how-to-set-device-settings-in-homey-script/45559/4 "2021-04-01T18:15:57Z")

</div>

Thanks for the reply. This post is about changing capability settings. I want to change the advanced settings of a device.

---

<div class="post-metadata">

**Author:** ![Hans\_Wiersma](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hans_wiersma/32/38617_2.png) [@Hans\_Wiersma](https://community.homey.app/u/Hans_Wiersma)\
**Post date:** [April 1, 2021, 6:16pm UTC](https://community.homey.app/t/how-to-set-device-settings-in-homey-script/45559/5 "2021-04-01T18:16:31Z")

</div>

Thanks for the reply. This example is about changing capability settings. I want to change the advanced settings of a device.

---

<div class="post-metadata">

**Author:** ![Jero](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jero/32/17556_2.png) [@Jero](https://community.homey.app/u/Jero)\
**Post date:** [April 1, 2021, 9:09pm UTC](https://community.homey.app/t/how-to-set-device-settings-in-homey-script/45559/6 "2021-04-01T21:09:30Z")

</div>

HomeyScript does not have the permission to change device settings. Only device control(capabilities).
