# Where are default flow cards defined and can I remove them?

**URL:** <https://community.homey.app/t/where-are-default-flow-cards-defined-and-can-i-remove-them/126879>\
**Category:** Developers\
**Tags:** flow, homey-pro\
**Created:** [January 7, 2025, 2:23pm UTC](https://community.homey.app/t/where-are-default-flow-cards-defined-and-can-i-remove-them/126879 "2025-01-07T14:23:39Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![CoonHouse](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/coonhouse/32/2764_2.png) [@CoonHouse](https://community.homey.app/u/CoonHouse)\
**Post date:** [January 7, 2025, 2:23pm UTC](https://community.homey.app/t/where-are-default-flow-cards-defined-and-can-i-remove-them/126879/1 "2025-01-07T14:23:39Z")

</div>

I am building an app for Homey and defined som flow cards (triggers, conditions and actions) but when I run the app on my Homey and start to create a flow there are some extra cards like “Turned on”, “Turned off” and “The volume is changed”.

I had defined triggers for these actions myself, so they are now duplicate in the card list.  
The self created cards do work but the extra cards don’t.  
So my question is how can I use this default cards (which value for “getDeviceTriggerCard()”) or how do I remove (or hide) these default cards?

Thanks

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [January 8, 2025, 2:40am UTC](https://community.homey.app/t/where-are-default-flow-cards-defined-and-can-i-remove-them/126879/2 "2025-01-08T02:40:37Z")

</div>

Maybe you’re familiar with this already, but nonetheless, I think this might help

> **[Flow | Homey Apps SDK](https://apps.developer.homey.app/the-basics/flow)**
>
> Flow cards allow users to create advanced home automations using your the devices from your app.

You’d start reading at “Device cards”

---

<div class="post-metadata">

**Author:** ![CoonHouse](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/coonhouse/32/2764_2.png) [@CoonHouse](https://community.homey.app/u/CoonHouse)\
**Post date:** [January 8, 2025, 10:04am UTC](https://community.homey.app/t/where-are-default-flow-cards-defined-and-can-i-remove-them/126879/3 "2025-01-08T10:04:07Z")

</div>

Thanks,

Yes, I have read those, I used that to create my flow cards and it states there are some flow cards created by default.  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/b/8b1630bc88942111f19dba9a65ea2b999f003bc5.png)  
But I can’t find how to use them. Like which id should a use in the `getDeviceTriggerCard()` function. I tried `getDeviceTriggerCard('onoff')` and `getDeviceTriggerCard('turned_on')` but that didn’t work

Is there a list with default (reserved) ID’s and which classes have which cards by default?

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [January 8, 2025, 4:24pm UTC](https://community.homey.app/t/where-are-default-flow-cards-defined-and-can-i-remove-them/126879/4 "2025-01-08T16:24:11Z")

</div>

You should take a look at the SDK reference.

> **[Tutorial: Device Capabilities - Homey Apps SDK v3](https://apps-sdk-v3.developer.homey.app/tutorial-device-capabilities.html)**

There you can find all standard capabilities.  
In details (3 points at the right) you can see the whole capability details incl. units, descriptions, flows…

If you add such a standard capability to your device, the standard flows will be added, too.

> [@CoonHouse](#):
>
> But I can’t find how to use them

What do you mean?  
If a capability is changed (from your app), the triger is executed. No need to do something.  
The flow action will change the capability (like it’s done when you klick a switch in the device details). Then a capability listener can be used to react on the changed value (e.g. to send something to the device/API).

There is an example. Use the capability id (like onoff).

> **[Capabilities | Homey Apps SDK](https://apps.developer.homey.app/the-basics/devices/capabilities#using-capabilities)**
>
> A capability is a programmatic representation of a device's state.

---

<div class="post-metadata">

**Author:** ![CoonHouse](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/coonhouse/32/2764_2.png) [@CoonHouse](https://community.homey.app/u/CoonHouse)\
**Post date:** [January 8, 2025, 11:21pm UTC](https://community.homey.app/t/where-are-default-flow-cards-defined-and-can-i-remove-them/126879/5 "2025-01-08T23:21:13Z")

</div>

Thanks,

I already read those documentation. The flow cards I made myself are working fine. It’s the “built-in” flowcards I can’t get to work.

> [@RonnyW](#):
>
> What do you mean?

For example I have created these trigger as follow:

```auto
  "triggers": [
    {
      "id": "power_off",
      "title": {
        "en": "Turned off",
        "nl": "Uitgezet"
      }
    },
    {
      "id": "power_on",
      "title": {
        "en": "Turned on",
        "nl": "Aangezet"
      }
    },
    ...
  ]

```

In the flow editor, when choosing a trigger, I now see two cards for “Turned on” and two cards for “Turned off”.

I implemented the card(s) this way:

```auto
...
async onInit() {
...
  this.powerOffTrigger = this.homey.flow.getDeviceTriggerCard('power_off')
  this.powerOnTrigger = this.homey.flow.getDeviceTriggerCard('power_on')

  this.amp.addListener('powerState', (zone: number, isOn: boolean) => this.onAmpPowerStateChanged(zone, isOn))
...
}

async onAmpPowerStateChanged(zone: number, value: boolean): Promise<void> {
  this.setCapabilityValue('onoff', value).catch(this.error)

  if (value) {
    await this.powerOnTrigger!.trigger(this, {}, { zone, value }).catch(this.error)
  } else {
    await this.powerOffTrigger!.trigger(this, {}, { zone, value }).catch(this.error)
  }
}

```

When I use my own created card “Turned on” in a flow, the flow is executed when I turn my amplifier on or off.  
When I use the “Turned on” card that is automatically created by Homey, the flow is not executed when I turn my amplifier on or off.

So how can I accomplish that when I use the “build-in” “Turned on” card, the function `onAmpPowerStateChanged` gets triggered when I turn my amplifier on or off?

Or is there a possibility to remove or hide these “build-in” cards? Is there maybe a class that doesn’t have “built-in” cards?

Thanks

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [January 9, 2025, 2:21am UTC](https://community.homey.app/t/where-are-default-flow-cards-defined-and-can-i-remove-them/126879/6 "2025-01-09T02:21:56Z")

</div>

I’m no expert on this, but what if you turn it around: (temporary) remove _your_ defined flow triggers?  
The automagically added, or “built in”, triggers _should_ function in that situation?

---

<div class="post-metadata">

**Author:** ![CoonHouse](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/coonhouse/32/2764_2.png) [@CoonHouse](https://community.homey.app/u/CoonHouse)\
**Post date:** [January 9, 2025, 2:32am UTC](https://community.homey.app/t/where-are-default-flow-cards-defined-and-can-i-remove-them/126879/7 "2025-01-09T02:32:04Z")

</div>

🤔 you mean my cards override the “build-in” cards. I will try that.

Thanks.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [January 9, 2025, 2:38am UTC](https://community.homey.app/t/where-are-default-flow-cards-defined-and-can-i-remove-them/126879/8 "2025-01-09T02:38:28Z")

</div>

Um, yes. That crossed my mind as possible cause.

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [January 9, 2025, 6:34am UTC](https://community.homey.app/t/where-are-default-flow-cards-defined-and-can-i-remove-them/126879/9 "2025-01-09T06:34:38Z")

</div>

If possible, you should use the built in cards for built in capabilities.  
Is there a need for your cards? I would only use a second custom trigger if I want to pass additional tokens.

In your code, you only get the event from your amplifier and then you execute your trigger.  
But you don’t set the capability.  
If you set the capability there. the standard trigger should be executed. They are started on capability change.

If you really want to relove the standard trigger (I would not do that), you have to add two triggers to your app:  
onoff\_true  
onoff\_false  
where you set “deprecated”:true to hide them in flow selection.

---

<div class="post-metadata">

**Author:** ![CoonHouse](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/coonhouse/32/2764_2.png) [@CoonHouse](https://community.homey.app/u/CoonHouse)\
**Post date:** [January 9, 2025, 1:07pm UTC](https://community.homey.app/t/where-are-default-flow-cards-defined-and-can-i-remove-them/126879/10 "2025-01-09T13:07:34Z")

</div>

I temporary removed al the code for “on” and “off” trigger cards but without result.  
The “built-in” “Turned on” and “Turned off” cards do not trigger the flow.

---

<div class="post-metadata">

**Author:** ![CoonHouse](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/coonhouse/32/2764_2.png) [@CoonHouse](https://community.homey.app/u/CoonHouse)\
**Post date:** [January 9, 2025, 1:34pm UTC](https://community.homey.app/t/where-are-default-flow-cards-defined-and-can-i-remove-them/126879/12 "2025-01-09T13:34:48Z")

</div>

> [@RonnyW](#):
>
> If possible, you should use the built in cards for built in capabilities.

For “power on” and “power off” I would if I could get it working.

> [@RonnyW](#):
>
> Is there a need for your cards? I would only use a second custom trigger if I want to pass additional tokens.

Well, for the “Set volume” I would like to do some magic before sending it to my amplifier.

> [@RonnyW](#):
>
> In your code, you only get the event from your amplifier and then you execute your trigger.  
> But you don’t set the capability.

In the `onAmpPowerStateChanged` function I call `setCapabilityValue` or is that not what you mean?

I also added the following line to the `onInit` function:

```auto
this.addCapability('onoff')

```

But de “build-in” trigger cards are still not triggering the flows when I cycle power on my amplifier.

Thanks

---

<div class="post-metadata">

**Author:** ![CoonHouse](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/coonhouse/32/2764_2.png) [@CoonHouse](https://community.homey.app/u/CoonHouse)\
**Post date:** [January 9, 2025, 1:38pm UTC](https://community.homey.app/t/where-are-default-flow-cards-defined-and-can-i-remove-them/126879/13 "2025-01-09T13:38:09Z")

</div>

I did notice that when I switch my amplifier on or off in the Homey app the flow with the “build-in” cards did trigger.

So I might be missing some listener, I guess?

Thanks

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [January 9, 2025, 4:11pm UTC](https://community.homey.app/t/where-are-default-flow-cards-defined-and-can-i-remove-them/126879/14 "2025-01-09T16:11:47Z")

</div>

> [@CoonHouse](#):
>
> In the `onAmpPowerStateChanged` function I call `setCapabilityValue` or is that not what you mean?

Yes, I missed this line 🙂

Just to be sure…  
The input value isOn is also changing its value?  
And both custom triggers “power\_off” and “power\_on” are executed alternating?  
If you set the currently set value again with setCapabilityValue(), the trigger is not started. So perhaps your event handler gets the same value every time?

---

<div class="post-metadata">

**Author:** ![CoonHouse](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/coonhouse/32/2764_2.png) [@CoonHouse](https://community.homey.app/u/CoonHouse)\
**Post date:** [January 9, 2025, 8:12pm UTC](https://community.homey.app/t/where-are-default-flow-cards-defined-and-can-i-remove-them/126879/15 "2025-01-09T20:12:21Z")

</div>

> [@RonnyW](#):
>
> The input value isOn is also changing its value?

Not sure if this is what you mean, but the state of the tile and the power button in the app change state accordingly.

Everything seems to work as planned flow triggers, flow actions, control in the app, updating state according the the devices local changes, etc. It’s just the “build-in” cards I cannot get to work.

> [@RonnyW](#):
>
> If you set the currently set value again with setCapabilityValue(), the trigger is not started. So perhaps your event handler gets the same value every time?

Not sure what you mean by this. But even when I comment out all the custom on/of code, the “build-in” trigger card is not firing.

Thanks.
