Homey Community Forum

Activate Hue scene with HomeyScript?

I want to control my lighting with motion sensors.
When active => Bright light hue scene
When not active => Back to previous hue scene

The idea was to store the current scene in a variable when activating it with Homey. And restore the scene when there’s no motion detected. Sadly you can’t put in a variable (or “Tag”) inside the “Activate scene” card.
afbeelding
I don’t like to create separate flows for every situation, so I thought I should do this with HomeyScript. Maybe I can inject a variable in there. Does anyone know if this possible? Maybe point me in the right direction? Are there comparable sample codes?

ps. I know it’s possible using hue Labs. But I want it to control with Homey because of extra rules I like to implement.