Hi All,
I’ve done plenty of amateur level PHP programming for personal projects and one thing I like to do is that when it makes sense to do so, to write a custom function and then re-use that in lots of places to avoid code duplication and to so simplify things when I want to make a change, having to do it only in one place.
-
I am using the Pushover notification integration where I specify what device the notification goes to. I get a new phone each year through work and I know that for all my notifications I will have to go an update it in all my automations. Is there a way to set a constant or define variable somewhere central in the system and be able to use that in my automations so that I change it in only one place and not in all automations?
-
I am finding all of my notfications are almost using the same YAML code that I am pasting in over and over but obviously in some cases things are different. Is there are way for me to create a custom function that accepts parameters that are stored in one location that i could call from the automations?
Thanks,
Adrian