I have been trying to figure out how I could ease the use or templating sensors ect for my self.
I’m using a frenck style layout for my config and am partially a Siemens s7 plc programmer for my job.
Wy I wrote about the s7 part is as follows:
Within Siemens programming you are able to built a function block and “call” this several times in your program. At that call you also specify witch inputs, outputs and settings you would like to use. It’s realy useful in an object oriented way of programming.
Siemens is calling this multiple instance.
I would love to do this also with my templates in my HA. So let’s say you write the Template for a window sensor. This sensor is used for multiple windows. So I want to call the template multiple times with each time an other sensor specified.
Old thread, but exactly what I am looking for. In DELPHI you could just create a function() and pass a parameter. The function takes it apart and returns a value. So basically pass a sensor and get something in return. Can be used for multible sensors…