rogro82 / hass-variables

Home Assistant variables component
236 stars 59 forks source link

Feature Request: variable_template #39

Closed lenwar closed 1 year ago

lenwar commented 4 years ago

Is it possible to also use variables as templates. The purpose would to be to be able to create generic scripts that work for multiple variables. (so without having to create the same script for each variables) My current workaround is to have one variable with loads of attributes. But it looks cleaner to have them seperated.

gribouk commented 3 years ago

As far as I know, everything, that has 'data' supports templating for the inner field after replacement of 'data' with 'data_template'. So, technically, the value_template and attributes_template are excessive, and you can template 'variable' field right away...