# Using flowcard with fixed list in Homey script

**URL:** <https://community.homey.app/t/using-flowcard-with-fixed-list-in-homey-script/156276>\
**Category:** Questions & Help\
**Tags:** homeyscript\
**Created:** [June 17, 2026, 7:43pm UTC](https://community.homey.app/t/using-flowcard-with-fixed-list-in-homey-script/156276 "2026-06-17T19:43:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lacobo](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/lacobo/32/154741_2.png) [@Lacobo](https://community.homey.app/u/Lacobo)\
**Post date:** [June 17, 2026, 7:43pm UTC](https://community.homey.app/t/using-flowcard-with-fixed-list-in-homey-script/156276/1 "2026-06-17T19:43:00Z")

</div>

Want to use the AndroidTV Press Key card in HomeyScript, but can’t find the exact Syntac for the press\_key card.

```auto
const AndroidTV = "homey:device:fee85441-654a-461d-8a36-bf544b8e350d:";
//await Homey.flow.runFlowCardAction({"id": AndroidTV + "pause"});
await Homey.flow.runFlowCardAction({"id": AndroidTV + "press_key",
"args": {"option" : "key_pause"}});

```

The second line (if I remove //) works fine. But the third line doesn’t. I want to select TV channels using HomeyScript, but can’t figure out what I need to fill in. Tried select channel 2 the number 2 or key\_digit\_2, but nothing works (no error as well).

It’s maybe caused by the fact that it’s a fixed list of items:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/b/1b37f4f5148a194c1460c53aaf0506324adc8526.png)

Does anyone know the answer to this riddle?

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [June 18, 2026, 5:29pm UTC](https://community.homey.app/t/using-flowcard-with-fixed-list-in-homey-script/156276/2 "2026-06-18T17:29:34Z")

</div>

> [@Lacobo](#):
>
> `"option"`

Are you sure this is the name of the arg?

Because if I would have created the flowcard, I would have called that argument `key` I suppose 🤔

---

<div class="post-metadata">

**Author:** ![Lacobo](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/lacobo/32/154741_2.png) [@Lacobo](https://community.homey.app/u/Lacobo)\
**Post date:** [June 18, 2026, 8:20pm UTC](https://community.homey.app/t/using-flowcard-with-fixed-list-in-homey-script/156276/3 "2026-06-18T20:20:43Z")

</div>

Yes Arie, I’m quite sure (but thanks for the hint). Used other flow cards in Homey Script, and they all use the ‘name’ arch name.

```auto
Press key [[option]]
{
  "id": "homey:device:fee85441-654a-461d-8a36-bf544b8e350d:press_key",
  "args": [
    {
      "name": "option",
      "type": "autocomplete",
      "title": "Key",
      "placeholder": null
    }
  ],
  "droptoken": null,
  "duration": false
}

```

And of course in my desperate search I’ve tested Key as well.

I’ve sent an email to the developer of this app, hoping to get the right hint to make it work.

---

<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:** [June 18, 2026, 8:46pm UTC](https://community.homey.app/t/using-flowcard-with-fixed-list-in-homey-script/156276/4 "2026-06-18T20:46:08Z")

</div>

This wil work for what you want to do:

```auto
await Homey.flow.runFlowCardAction({
  id: 'homey:device:fee85441-654a-461d-8a36-bf544b8e350d:press_key',
  args: {
    option: {
      key: 'key_confirm'
    }
  }  
});

```

Technically the card also has an `id` tag, and a `name` tag, but both seem optional and the `id` is always the same as `key`.

Available key IDs:

```auto
'key_stop'
'key_play'
'key_pause'
'key_rewind'
'key_fast_forward'
'key_watch_tv'
'key_confirm'
'key_previous'
'key_next'
'key_cursor_left'
'key_cursor_up'
'key_cursor_right'
'key_cursor_down'
'key_channel_up'
'key_channel_down'
'key_digit_1'
'key_digit_2'
'key_digit_3'
'key_digit_4'
'key_digit_5'
'key_digit_6'
'key_digit_7'
'key_digit_8'
'key_digit_9'
'key_digit_0'
'key_options'
'key_back'
'key_home'

```

---

<div class="post-metadata">

**Author:** ![Lacobo](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/lacobo/32/154741_2.png) [@Lacobo](https://community.homey.app/u/Lacobo)\
**Post date:** [June 18, 2026, 10:49pm UTC](https://community.homey.app/t/using-flowcard-with-fixed-list-in-homey-script/156276/5 "2026-06-18T22:49:15Z")

</div>

Thanks Caseda! It works! Had found the key commands in Homey Developer, but just added a few qotes to much. And the word key itself 😳

---

<div class="post-metadata">

**Author:** ![Lacobo](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/lacobo/32/154741_2.png) [@Lacobo](https://community.homey.app/u/Lacobo)\
**Post date:** [June 19, 2026, 5:26am UTC](https://community.homey.app/t/using-flowcard-with-fixed-list-in-homey-script/156276/6 "2026-06-19T05:26:29Z")

</div>

Channel switching is verrrry fast (hardly visible)

```auto
//Gettting a 3 digit channel code and send this to the Android TV
const AndroidTV = "homey:device:fee85441-654a-461d-8a36-bf544b8e350d:"
let text = (args[0]);
var length = text.length;
if (length == 3) {
var num1 = text.substring(0,1);
var num2 = text.substring(1,2);
var num3 = text.substring(2,3);
await Homey.flow.runFlowCardAction({"id": AndroidTV + "press_key",
args:{option : {key:"key_digit_" + num1}}}); await wait(5);
await Homey.flow.runFlowCardAction({"id": AndroidTV + "press_key",
args:{option : {key:"key_digit_" + num2}}}); await wait(5);
await Homey.flow.runFlowCardAction({"id": AndroidTV + "press_key",
args:{option : {key:"key_digit_" + num3}}}); await wait(5);
await Homey.flow.runFlowCardAction({"id": AndroidTV + "press_key",
args:{option : {key:"key_confirm"}}});
}

```
