# Dynamic Hue Set Scene with variables

**URL:** <https://community.homey.app/t/dynamic-hue-set-scene-with-variables/12361>\
**Category:** Questions & Help\
**Created:** [April 27, 2019, 6:59pm UTC](https://community.homey.app/t/dynamic-hue-set-scene-with-variables/12361 "2019-04-27T18:59:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Niccolo\_Perra](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/niccolo_perra/32/9699_2.png) [@Niccolo\_Perra](https://community.homey.app/u/Niccolo_Perra)\
**Post date:** [April 27, 2019, 6:59pm UTC](https://community.homey.app/t/dynamic-hue-set-scene-with-variables/12361/1 "2019-04-27T18:59:03Z")

</div>

Hey everyone, I would like to do the following.

I currently have a variable in my system called state that stores the state of the day [MORNING, EVENING…]

when I press on from a button (let’s say I’m using a zwave button in the livingroom) I would like to set a state in hue called

livingroom\_{state} that could be livingroom\_MORING, livingroom\_EVENING etc!

How can I do such thing?

Thanks!

---

<div class="post-metadata">

**Author:** ![Niccolo\_Perra](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/niccolo_perra/32/9699_2.png) [@Niccolo\_Perra](https://community.homey.app/u/Niccolo_Perra)\
**Post date:** [April 27, 2019, 7:53pm UTC](https://community.homey.app/t/dynamic-hue-set-scene-with-variables/12361/3 "2019-04-27T19:53:21Z")

</div>

Yes I would like to set a scene passing the scene name that is a concatenation of a String and a String variable

---

<div class="post-metadata">

**Author:** ![Caseda](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/caseda/32/138695_2.png) [@Caseda](https://community.homey.app/u/Caseda)\
**Post date:** [April 27, 2019, 10:49pm UTC](https://community.homey.app/t/dynamic-hue-set-scene-with-variables/12361/4 "2019-04-27T22:49:06Z")

</div>

As the scenes selection in the flow card work with a so called “autocomplete” function in homey to get the full list in the flow card (you really need to select/click an option), makes it impossible to do what you want unfortunately.

the easiest way is to create a separate flow for each option you want

---

<div class="post-metadata">

**Author:** ![FKey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fkey/32/14793_2.png) [@FKey](https://community.homey.app/u/FKey)\
**Post date:** [April 28, 2019, 7:08am UTC](https://community.homey.app/t/dynamic-hue-set-scene-with-variables/12361/5 "2019-04-28T07:08:52Z")

</div>

> [@Caseda](#):
>
> the easiest way is to create a separate flow for each option you want

That would indeed be the way to go. (And having to flows is also very clear)  
Make two flows with the different livingroom\_{state} setting in the THEN. (Flow A and flow B  
for selection off the correct flow you habe two options:  
1 disable/enable the flows based on the state [MORNING, EVENING…]  
Flow A: when switch is pressed THEN set livingroom\_MORNING  
Flow B: when switch is pressed THEN set livingroom\_EVENING  
IF a value is changed “state” AND state=morning THEN enable flow A, disable flow B  
IF a value is changed “state” AND state=evening THEN enable flow B, disable flow A  
2 use the AND to select the correct flow
