|
发表于 2023-7-11 00:14:30
|
显示全部楼层
Logger: homeassistant.config
Source: config.py:868
First occurred: July 10, 2023 at 23:48:05 (1 occurrences)
Last logged: July 10, 2023 at 23:48:05
Invalid config for [template]: invalid template (TemplateSyntaxError: expected token ')', got 'tian_qi') for dictionary value @ data['sensor'][0]['attributes']['text']. Got '{% if (states.weather.701tian_qi.attributes.warning) %}{{ states.weather.701tian_qi.attributes.warning[0].text }} {% else %}null{% endif %}' invalid template (TemplateSyntaxError: expected token ')', got 'tian_qi') for dictionary value @ data['sensor'][0]['attributes']['title']. Got '{% if (states.weather.701tian_qi.attributes.warning) %}{{ states.weather.701tian_qi.attributes.warning[0].title}} {% else %}null{% endif %}' invalid template (TemplateSyntaxError: expected token ')', got 'tian_qi') for dictionary value @ data['sensor'][0]['state']. Got '{% if (states.weather.701tian_qi.attributes.warning) %}{{ states.weather.701tian_qi.attributes.warning[0].title}}{% else %}当前无自然灾害预警信息{% endif %}'. (See /config/configuration.yaml, line 408).
出现这个错误, 是不是yaml格式有问题吗? 我是直接复制的. |
|