Homey Community Forum

Dynamic Hue Set Scene with variables

#1

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!

#2

Not 100% sure but i assume your using the Hue app with the bridge?

As far i know (and correct me when iam wrong) you cant set a state in the hue bridge with homey, you can use scenes but thats it.

#3

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

#4

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

#5

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