Generated capability flow triggers

I got a solution in the Athom Slack channel…

If you have 2 devices with the same capabilities and your are defining the flow trigger for each device in device.flow.compose.json, the definition ist copied into the app.json and the flow IDs are duplicated.

Solution:
Define the flow trigger one in .homeycompose/flow/triggers as single file for each flow.
Add the device argument and assign teh driver IDs where the flow should appear.

grafik


{
    "id": "measure_last_reg_percent_changed",
    "title": {
        "en": "Last regeneration percent has changed",
        "de": "Letzte Regeneration (Prozent) hat sich geändert"
    },
    "hint": {
        "en": "The percentage of a full regeration if not the whole capacity was used.",
        "de": "Der Prozentsatz einer vollen Regeneration, wenn nicht die gesamte Kapazität aufgebraucht wurde."
    },
    "args": [
        {
            "name": "device",
            "type": "device",
            "filter": "driver_id=softliq-sc|softliq-sd"
        }
      ]
}
1 Like