This guide can save heaps of memory if implemented. This is mainly for changing properties. This will only increase memory if you will use the function once or twice. Your device list will vary depending on what function you are implementing. The base requirements are:
2x property (maybe more depending on your function)
The rest of your function
First, make a property that is of type whatever you need, and name it something like “input#function#” to identify it easily. Next, go into the property settings and then set it so that it broadcasts whenever it gets changed. This is important!!! It will make sure the function runs. Set the function to run whenever it hears a message on the channel the first property broadcasts on.
Now, make another property that is the output of the function. The type of this property has to be of the same type as what you need. Make sure this broadcasts on a channel. Place another trigger that runs when it receives a message on the output channel. This trigger needs to set the output property to whatever property you want the output to come out as.