This is probably very simple but I’m quite new to templates and haven’t found the exact answer to my question.
I have a valve that let warm water into the floor heating system. Today the solution is not that smart as I open the valve every x hours to let water in. I’m planning on installing a temperature sensor that will know the exact temperature and in that way be able to have better control of how long the valve should be open.
The target water temp will be set in comparison with the outdoor temp. So for every outdoor temp degree I will have a matching target water temp. To achieve this I would like to create a template sensor that will have a list/array of target water temps as attributes, i.e. heating_curve = 48, 45, 42, 30, 38 etc. The current outdoor temp will decide the position in the array. In below example I assume that the outdoor temp never goes below -20C.
current_target = heating_curve[outdoor_temp+20]
Above would translate into heating_curve[0] and current_target would be 48.
How should I define the sensor template to hold the heating curve temp values?