找回密码
 立即注册
楼主: meishild

[快速入门] 篇五扩展:hass插件配置入门,学会找问题

  [复制链接]

6

主题

256

回帖

1808

积分

金牌会员

积分
1808
金钱
1546
HASS币
0
发表于 2019-12-30 20:49:46 | 显示全部楼层
本帖最后由 z741554038 于 2019-12-30 20:51 编辑
yyuanstudio 发表于 2019-8-28 17:08
拆分的代码是在这里添加吗?

我来帮大神解答一下了
天气实体拆分代码如下所示
sensor:
  - platform: template
    sensors:
      weather_current_temp:
        friendly_name: "当前温度"
        unit_of_measurement: '°C'
        value_template: "{{ state_attr('weather.test', 'temperature') }}"
      weather_current_uv:
        friendly_name: "当前紫外线强度"
        value_template: "{{ state_attr('weather.test', 'uv')['uv'] }}"
      weather_current_rain:
        friendly_name: "当前下雨概率"
        unit_of_measurement: '%'
        value_template: "{{ state_attr('weather.test', 'forecast')[0]['probable_precipitation'] }}"
      weather_today_max_temp:
        friendly_name: "今天最高温度"
        unit_of_measurement: '°C'
        value_template: "{{ state_attr('weather.test', 'forecast')[0]['temperature'] }}"
      weather_today_min_temp:
        friendly_name: "今天最低温度"
        unit_of_measurement: '°C'
        value_template: "{{ state_attr('weather.test', 'forecast')[0]['templow'] }}"
具体链接 https://www.home-assistant.io/integrations/template

拆分的天气.png
回复

使用道具 举报

1

主题

98

回帖

362

积分

中级会员

积分
362
金钱
263
HASS币
0
发表于 2020-1-6 18:51:29 | 显示全部楼层
z741554038 发表于 2019-12-30 20:49
我来帮大神解答一下了
天气实体拆分代码如下所示
具体链接 https://www.home-assistant.io/integrations/ ...

是的,后来也是看了很多帖子才知道在哪里添加。
回复

使用道具 举报

0

主题

69

回帖

258

积分

中级会员

积分
258
金钱
189
HASS币
0
发表于 2020-3-2 23:55:31 | 显示全部楼层
搜狗截图20200302205543.png 路过的各路大神   帮忙看看     试了半天   就是不显示   
最下那个   截图不全  我复制出来
[color=var(--paper-dialog-color, var(--primary-text-color))]

[color=var(--paper-dialog-color, var(--primary-text-color))]You are using a custom integration for hf-weather which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.




[color=var(--primary-text-color)][backcolor=var(--primary-background-color)]







好像是未授权      难道是现在0.106.2  不能使用了
回复

使用道具 举报

7ack 

1

主题

32

回帖

372

积分

中级会员

积分
372
金钱
339
HASS币
0
发表于 2020-3-21 10:25:45 | 显示全部楼层
谢谢分享 学习了
回复

使用道具 举报

0

主题

17

回帖

70

积分

注册会员

积分
70
金钱
53
HASS币
0
发表于 2020-4-8 21:20:51 | 显示全部楼层
目前看不懂@期待自己的!
回复

使用道具 举报

5

主题

56

回帖

472

积分

中级会员

积分
472
金钱
411
HASS币
0
发表于 2020-5-3 18:02:13 | 显示全部楼层
真的太感谢楼主了。目前功能都正常,只是启动时有一个错误:
2020-05-03 15:40:10 ERROR (MainThread) [homeassistant.config] Platform error: weather
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config.py", line 769, in async_process_component_config
    platform = p_integration.get_platform(domain)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 277, in get_platform
    f"{self.pkg_path}.{platform_name}"
  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'homeassistant.components.template.weather'
回复

使用道具 举报

2

主题

9

回帖

72

积分

注册会员

积分
72
金钱
61
HASS币
0
发表于 2020-5-20 22:12:27 | 显示全部楼层
你好,请问我这个js文件无论是刷新、清除缓存还是disable cache,它还是会加载,已经在原始配置器中屏蔽掉resources的内容,如何才能不加载这个js文件

原始配置器的代码

原始配置器的代码

错误的js文件

错误的js文件
回复

使用道具 举报

6

主题

58

回帖

169

积分

注册会员

积分
169
金钱
105
HASS币
0
发表于 2020-10-19 20:02:09 | 显示全部楼层
先赞再看;
回复

使用道具 举报

33

主题

2162

回帖

5869

积分

论坛元老

积分
5869
金钱
3674
HASS币
60
QQ
发表于 2021-2-24 19:42:03 | 显示全部楼层
好多老插件不能用了,没少一遍遍折腾。
不过最终搞好了,还是挺好的。
我不生产技术,我只是技术的搬运工。
回复

使用道具 举报

0

主题

38

回帖

241

积分

中级会员

积分
241
金钱
203
HASS币
0
发表于 2021-3-30 23:09:28 | 显示全部楼层
SSH进不去
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2025-5-1 12:28 , Processed in 0.317458 second(s), 25 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表