Hello to community, I’m a newcomer of 3 weeks to HA jumping ship after 2 years with "OpenHab’ (which became exceedingly geeky & fiddly). Enjoying and coping ok with HA so far.
My System: Home Assistant Blue, Core ver core-2022.2.2, Supervisor ver 2022.01.1.
Trying to config a Template sensor to convert wind degrees (bearing) to a Compass value so that I can use it in a Lovelace entity card for weather. The code is in my config yaml.
Code verifies ok both in Developer tools and in HA but HA unable to ‘render’ (is that the term?) the Template.
Getting the error below after restart: “Invalid config for [template]: invalid template (TemplateSyntaxError: tag name expected)”
Screen shot of Template non-working code below:
I think it must be some silly syntax mistake I’m making…even though I have adopted the new coding guidelines for templates.
I made a similar Template for converting a zwave Aeotec Door sensor which is wired to a 'B+B Thermo-Technik" hardware rain sensor (it provides open/closed contacts with rain) on the roof and acts as a Rain Sensor. This template converts the ‘off/on’ states to ‘Raining/Dry’ for my lovelace card. This template sensor works perfectly. Screen shot of code:
In summary, I’d be delighted if anyone could spot the problem with my Wind Compass code and advise. Thanks in advance.