Hi, I’m using templates in homeycompose to use the common driver.json code on multiple drivers, in particular the part relating to pairing. To do the paring I use a custom view that is the same for all drivers.
Unless I’m mistaken, despite using homeycompose the custom view must be inserted inside the “pair” folder of each driver with the result that I have several custom_view.html (one for each driver) all the same and I have to repeat each change on each file. Is it possible to simplify this part by providing a single custom_view.html for all my drivers?
AFAIK it’s not possible. I remember asking for this feature years ago, but making developer life easier doesn’t get a lot of priority.
I also don’t think homey allows for additional build steps to be added that would allow you to run a script to copy the file to all driver directories, so the only option I see for that is to create a script entry in package.json that does that. However, that would require a manual npm run SCRIPT before each homey run.
Just to be clear… you want to use one view (html) for all devices?
Yes, that’s possible. It’s the same for pair and repair.
You have to use a folder with custom view id as folder name and a index.html in every view folder.
Example:
PS: The content (html) from homeycompose is copied into your driver par/repair folder on run/install/publish. So don’t edit these driver filey when using homeycompose.
I think I found an example in app code on Github.
At that time, it was only possible for pair flows. So I added the repair version as Github PR becaus that was what I needed
But yes, it’s not documented - same for other details about driver settings compose or capability filter for flows