2
37
399
论坛技术达人
情非殇 发表于 2018-9-12 10:56 Platform not found: sensor.youjia 为什么
使用道具 举报
27
2129
9171
论坛元老
2643223380 发表于 2018-9-12 11:06 你把你的log发过来
情非殇 发表于 2018-9-12 11:11 注释掉那一行后,倒是没有报错,但是也没有数据,都是未知
2643223380 发表于 2018-9-12 11:13 那你把 xpinyin包去掉,用到这个包的代码都去掉就可以,去掉后,将city这儿直接用拼音代替 ...
2643223380 发表于 2018-9-12 11:19 这是去除xpinyin包后的源码,你试试
#分享非插件城市汉化方法 - 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: '城市'
40
3016
1万
超级版主
Nero
7
131
931
高级会员
25
662
3630
30
969
4183
1
23
179
注册会员
本版积分规则 发表回复 回帖后跳转到最后一页
为论坛做出突出贡献的会员
经常参与各类话题的讨论,发帖内容较有主见
Archiver|手机版|小黑屋|Hassbian ( 晋ICP备17001384号-1 )
GMT+8, 2025-6-24 05:47 , Processed in 0.069970 second(s), 25 queries .
Powered by Discuz! X3.5
© 2001-2025 Discuz! Team.