Closed kamtschatka closed 3 years ago
Just looked at #47 and realized a bug in this implementation. prepareVariablesString
does not make states and user available properly AND the way it is currently implemented it is not possible, because the hass object is only set at a later point.
I'll have another go at this later/tomorrow
The variables part of the eval statement is always the same unless the config changes, so I changed the code to cache this part. I have also changed the loop to evaluate the template only once instead of twice and allow for early returns.