Closed OlivierZal closed 1 year ago
Note: I know I can add different ids in order to differenciate them.
While Homey Compose enabled you to define Flow cards on a driver-leve, in reality Flow cards are available app-wide.
If you 'share' a Flow card between drivers, you need to move it to the app level, so in .homeycompose/flow/.../my_card.json
.
Then add a filter "filter": "driver_id=mydriver1|mydriver2"
. Here |
means 'or'.
@WeeJeWel, thanks for your answer.
I do mean at the driver level, that is some drivers (and not others).
That's why you need to target those drivers with driver_id=mydriver1|mydriver2|...
:)
Yes @WeeJeWel, and it works well (that's why I close the issue).
When a same flow template is defined under
.homeycompose/drivers/flow/<triggers|conditions|actions>
extends multiple drivers, the following error is raised:The reason is that 2 different cards are created in
app.json
:although we would expect only one card as follows (with all drivers in
filter
):Here's the code to adapt: https://github.com/athombv/node-homey/blob/master/lib/HomeyCompose.js#L341
Otherwise we miss the interest of having templates...