I adjusted the script for my HomeyPro and post below a use case that works for me 
// HomeyScript using Philips Hue official app from Athom B.V
// Developed using versions:
// - Philips Hue app v5.9.1
// - Homey Web App version 1.9.57
// - Homey Pro (Early 2023), version 10.0.0-rc.122
// Derived from: Activate Hue scene with HomeyScript? - #5 by Colin_Osborne
// 2026 - Adjusted for HomeyPro, nested key-pairs instead of arrays
const flowcard_uri = ‘homey:manager:flow’;
const owner_uri = ‘homey:app:nl.philips.hue’;
const card_id = ‘homey:app:nl.philips.hue:setScene’;
// edit to match an available Hue scene, or empty string to list all available scenes
// 1. Fixed in code, eg:
// const scene_name = ‘Homey Beneden Normaal’;
// const scene_name = ‘Homey Beneden Gedimt’;
// const scene_name = ‘Homey Beneden Uit’;
// 2. From flow using Homeyscript with variable
// Variable format example: {“scene”:“Homey Beneden Normaal”}
let myArgs = JSON.parse(args[0]);
const scene_name = myArgs.scene;
// getFlowCardActions() returns a key-value object { cardId: card, … }
// Build nested map: { ownerUri: { cardId: card } }
const actionCards = await Homey.flow.getFlowCardActions();
const actionCardsMap = {};
for (const card of Object.values(actionCards)) {
if (!actionCardsMap[card.ownerUri]) {
actionCardsMap\[card.ownerUri\] = {};
}
actionCardsMap[card.ownerUri][card.id] = card;
}
// List all card IDs for owner
log(‘Philips Hue: Flow Card Actions:’);
for (const cardId of Object.keys(actionCardsMap[owner_uri] ?? {})) {
log(" ", cardId);
}
// Look up specific card directly by owner + id
const card = actionCardsMap[owner_uri]?.[card_id];
let matchedScene = null;
if (card) {
const options = await Homey.flow.getFlowCardAutocomplete({
uri: flowcard_uri,
id: card.id,
name: 'scene',
query: '',
type: 'flowcardaction'
});
log(‘\n’);
log(‘Card properties for:’, card_id);
log(card);
log(‘\n’);
log(‘Philips Hue: Scenes:’);
for (const scene of options) {
if (!(scene_name.length) || (scene.name == scene_name)) {
log(scene.description, " : ", scene.name, "; scene id=", scene.id);
if (scene.name == scene_name) matchedScene = scene;
}
}
}
log(‘\n’);
if (!scene_name.length) {
log(‘No scene name specified so skipping setScene step’);
} else if (!matchedScene) {
log(‘Scene not found in autocomplete results:’, scene_name);
} else {
log(“runFlowCardAction: flowcard uri=”, flowcard_uri, “; card id=”, card_id, “; scene=”, matchedScene.name, “; id=”, matchedScene.id);
await Homey.flow.runFlowCardAction({
uri: flowcard_uri,
id: card_id,
args: {
scene: matchedScene,
}
})
.then(() => log('Scene set OK'))
.catch(error => log('Scene set Error:', error));
}
I control my Homey with two parameters DagRitme which changes in four stages from Morning to Night and AanwezigheidBeneden which has three stages (ACTIVE, INACTIVE and STANDBY). Standby makes it possible to dim the lights before shutting it off completely. This is more user friendly. So, that leaves me with 12 options (DagRitme times AanwezigheidBeneden. Instead of a long if-then-else, I use a 2D-Array to extract the proper Hue Scene. Which is very simple. And now, the only thing I have to do is activate the scene with this script.