Could not trigger Flow card with id "***": expected device to be an instance of Homey.Device

I’m developing a Homey app and encountering a peculiar issue when trying to trigger a flow card that involves a device instance. Despite ensuring that the device is correctly recognized as an instance of Homey.Device (confirmed through logging), I keep running into the following error when attempting to trigger the flow card:

Error triggering flow card Error: Could not trigger Flow card with id “charging-starts”: expected device to be an instance of Homey.Device

"flow": {
  "triggers": [
      "id": "charging-starts",
      "title": { "en": "Charging starts" },
      "hint": { "en": "This card will trigger whenever the charging starts." },
      "args": [
          "type": "device",
          "name": "device",
          "filter": "driver_id=charger"

'm trying to trigger this flow card from within my device class (MyDevice extends OAuth2Device ) like so:

And the triggerChargingStarted method in the driver looks like this:

triggerChargingStarted(device) {
  this._cardTriggerChargingStarted.trigger({ device: device })
    .then(() => this.log('Flow card triggered successfully.'))
    .catch((err) => this.error('Error triggering flow card', err));

I’ve confirmed through logging that the device argument passed to triggerChargingStarted is indeed an instance of Homey.Device. However, the error persists, suggesting an issue with how the flow card expects the device instance or possibly a deeper issue within the SDK or my app’s structure.

Has anyone encountered a similar issue or can offer insights into what might be going wrong here? I’m particularly interested in any nuances with the Homey SDK that I might be overlooking or specific practices for triggering flow cards with device instances that are key to resolving this issue.

Thank you in advance for any help or guidance you can provide!

The method signature is trigger(device, tokens, state), so three arguments (last two are optional) where the first is the device instance. You’re passing an object with a key device.

Yea, we spotted the issue right after I posted this. Thank you so much for the response!