本帖最后由 情非殇 于 2018-9-12 11:52 编辑
感谢楼主,实测可行
#分享非插件城市汉化方法
- platform: template
sensors:
city_phase:
value_template: '{% if is_state("sensor.youjia_city", "shandong") %}山东{% elif is_state("sensor.youjia_city", "guangxi") %}广西{% else %}未汉化{% endif %}'
friendly_name: '城市'
|