# Triggering Moods in WebAPI

**URL:** <https://community.homey.app/t/triggering-moods-in-webapi/137423>\
**Category:** Developers\
**Created:** [June 1, 2025, 9:46am UTC](https://community.homey.app/t/triggering-moods-in-webapi/137423 "2025-06-01T09:46:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MathiasVerheijden](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mathiasverheijden/32/113975_2.png) [@MathiasVerheijden](https://community.homey.app/u/MathiasVerheijden)\
**Post date:** [June 1, 2025, 9:46am UTC](https://community.homey.app/t/triggering-moods-in-webapi/137423/1 "2025-06-01T09:46:00Z")

</div>

Hi All, I’m experimenting with moods using the WebAPI and HomeyScript. When writing HomeyScript, there should be a method to trigger a mood, as you can see below.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/6/e6cda0503ed8cc2ab7f16713efd4b64df989585f.png)

However, when using the method, it says that ‘triggerMood’ is not a function. There is also zero documentation about it in the WebAPI documentation. That is strange, as the getMoods() method works just fine in the same manner as above, which is also not further documented.

Any ideas on how to move forward here?

Thanks in advance!

---

<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:** [June 1, 2025, 10:53am UTC](https://community.homey.app/t/triggering-moods-in-webapi/137423/2 "2025-06-01T10:53:28Z")

</div>

The method to set a mood is `setMood` (found by using `Object.getOwnPropertyNames(Homey.moods)`), but HomeyScript doesn’t have the correct permissions to use it:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/6/06f37d0eee84d1785dabf3c73e26a841ba2ddb38.png)

Apparently, you can’t be trusted on your own Homey 🤷🏼‍♂️

The HS editor apparently isn’t up-to-date so suggests a method (`triggerMood`) that doesn’t exist (anymore).

---

<div class="post-metadata">

**Author:** ![MathiasVerheijden](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mathiasverheijden/32/113975_2.png) [@MathiasVerheijden](https://community.homey.app/u/MathiasVerheijden)\
**Post date:** [June 1, 2025, 12:35pm UTC](https://community.homey.app/t/triggering-moods-in-webapi/137423/3 "2025-06-01T12:35:45Z")

</div>

Thanks for the reply @robertklep! Strange indeed that some mood.x methods are allowed, and some are not. I hope they’ll fix this.

---

<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 1, 2025, 1:02pm UTC](https://community.homey.app/t/triggering-moods-in-webapi/137423/4 "2025-06-01T13:02:26Z")

</div>

Setting a mood is of course a very dangerous action, which could cause all of your lights change color!  
Athom prevents Homey owners from these kind of disasters for a reason! 🫣🫣🫣😂😜

> [@MathiasVerheijden](#):
>
> I hope they’ll fix this.

Not if you don’t request it at Support 😉

---

<div class="post-metadata">

**Author:** ![MathiasVerheijden](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mathiasverheijden/32/113975_2.png) [@MathiasVerheijden](https://community.homey.app/u/MathiasVerheijden)\
**Post date:** [June 2, 2025, 3:13pm UTC](https://community.homey.app/t/triggering-moods-in-webapi/137423/5 "2025-06-02T15:13:28Z")

</div>

Small update:

The setMood() method **does** work when you try it in the WebAPI playground. I can actually see my lights changing.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/0/a099921c080761a9b8c479f7ab80542b4a9cede2.png)

I’m a bit new to this whole forum thing. How do I show this to support / feature request?  
Thanks!

---

<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 2, 2025, 5:26pm UTC](https://community.homey.app/t/triggering-moods-in-webapi/137423/6 "2025-06-02T17:26:32Z")

</div>

Yea, the playground has no restrictions AFAIK.
