Break functions into separate yaml file for re-useability #323
Replies: 2 comments
-
Hi, Have you checked this? From 4:57~ or so 😊. Else I'll try and create a sample pack, at some point. |
Beta Was this translation helpful? Give feedback.
-
Thanks, I can see how you have broken out the views, which is the same as in my code above (well my code is slightly different, but you should be able to see I have some of the cards included in the same way). What I can't see is how to break out the Functions key, because the content of that isn't yaml, it is javascript and the ui editor doesn't seem to like me creating a file with just that content in, and I don't think you can do a include for something that isn't part of a list. interesting video though, because I ought to VS Code for editing, I use it a lot for integration development, but haven't for this work as yet. |
Beta Was this translation helpful? Give feedback.
-
I'm planning on doing multiple floorplans for different buildings. I don't really want to build that into one massive floorplan on in one Lovelace View. For my first floorplan I've been trying to break out re-useable item into separate yaml files. In the most part I've achieved this using various types of include. The below shows my current structure for a single View.. Ideally I'd like to move the Functions out so they can be re-used. Is this feasible, I can't figure out the correct yaml.
Beta Was this translation helpful? Give feedback.
All reactions