-
Now i am configuring my floorplans , and there is something what i am missing here , templating of conditions for example : |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @misko2k Floorplan currently does not have support for loading external code files, or even loading 'common' functions that are external to the rules themselves. I think it would make sense to add support for 'common' functions, which could be defined in a new section of the floorplan config. We will consider this. |
Beta Was this translation helpful? Give feedback.
-
This was actually quite easy to implement. New version 1.0.17 has support for functions. You can see this in the Ring example. https://experiencelovelace.github.io/ha-floorplan/docs/example-ring/ There is a new (optional) config section called
Then in your rules, you have access to all your functions, which are accessible via the
Try that and let us know how it goes. |
Beta Was this translation helpful? Give feedback.
@misko2k
This was actually quite easy to implement. New version 1.0.17 has support for functions. You can see this in the Ring example.
https://experiencelovelace.github.io/ha-floorplan/docs/example-ring/
There is a new (optional) config section called
functions:
. You can add as many functions as you need. They just need to be contained in the structure shown: