『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
楼主:

最新小米空气净化器2代接入HASS方法及HA控制面板

  [复制链接]

3

主题

111

帖子

947

积分

论坛技术达人

积分
947
金钱
831
HASS币
0
发表于 2018-1-30 14:58:16 | 显示全部楼层
赞一个,强
回复

使用道具 举报

2

主题

712

帖子

4876

积分

论坛元老

Rank: 8Rank: 8

积分
4876
金钱
4164
HASS币
85
发表于 2018-2-3 18:20:21 | 显示全部楼层
感谢楼主分享
回复

使用道具 举报

0

主题

36

帖子

144

积分

注册会员

Rank: 2

积分
144
金钱
108
HASS币
0
发表于 2018-2-6 12:26:52 | 显示全部楼层
不错。那几个自动化可以隐藏吗?
回复

使用道具 举报

1

主题

36

帖子

163

积分

论坛分享达人

积分
163
金钱
127
HASS币
0
发表于 2018-2-6 19:51:51 | 显示全部楼层
下载不了附件
回复

使用道具 举报

1

主题

36

帖子

163

积分

论坛分享达人

积分
163
金钱
127
HASS币
0
发表于 2018-2-6 20:52:19 | 显示全部楼层
本帖最后由 duke 于 2018-2-6 21:09 编辑

成功了!不过我的LED灯 更改不好使
还有automation报错


1.png

2.png
回复

使用道具 举报

24

主题

882

帖子

4966

积分

论坛元老

Rank: 8Rank: 8

积分
4966
金钱
4079
HASS币
20
发表于 2018-2-11 00:07:14 | 显示全部楼层
"sudo su -s /bin/hash homeassistant"

没人发现这里写错了吗,都是手打不用复印代码的?
应该是bash吧
回复

使用道具 举报

0

主题

6

帖子

44

积分

新手上路

Rank: 1

积分
44
金钱
38
HASS币
0
发表于 2018-2-13 23:01:34 | 显示全部楼层
支持。。。。。
回复

使用道具 举报

2

主题

89

帖子

293

积分

中级会员

Rank: 3Rank: 3

积分
293
金钱
204
HASS币
0
发表于 2018-2-25 22:18:03 | 显示全部楼层
这个不错,正需要这个呢。
回复

使用道具 举报

0

主题

16

帖子

50

积分

注册会员

Rank: 2

积分
50
金钱
34
HASS币
0
发表于 2018-3-8 14:51:24 | 显示全部楼层
好好学习一下
回复

使用道具 举报

3

主题

78

帖子

467

积分

中级会员

Rank: 3Rank: 3

积分
467
金钱
389
HASS币
0
发表于 2018-3-8 15:06:07 | 显示全部楼层
把文件放到packages就报错如下:,什么原因,,HA版本0.64.3
Testing configuration at /config ERROR:homeassistant.config:Invalid config for [automation]: required key not provided @ data['action']. Got None required key not provided @ data['trigger']. Got None. (See ?, line ?). Please check the docs at https://home-assistant.io/components/automation/ Failed config automation: - action: [source /config/packages/xiaomi_air_purifier.yaml:81] data_template: [source /config/packages/xiaomi_air_purifier.yaml:83] entity_id: input_select.xiaomi_ap_mode option: {% if states.fan.xiaomi_air_purifier_2.attributes.mode == "auto" %}自动 {% elif states.fan.xiaomi_air_purifier_2.attributes.mode == "silent" %}睡眠 {% elif states.fan.xiaomi_air_purifier_2.attributes.mode == "favorite" %}最爱 {% elif states.fan.xiaomi_air_purifier_2.attributes.mode == "idle" %}待机 {% endif %} service: input_select.select_option alias: xiaomi_ap_get_mode initial_state: True trigger: [source /config/packages/xiaomi_air_purifier.yaml:78] platform: time seconds: /5 - action: [source /config/packages/xiaomi_air_purifier.yaml:97] data_template: [source /config/packages/xiaomi_air_purifier.yaml:99] entity_id: fan.xiaomi_air_purifier_2 speed: {% if states.input_select.xiaomi_ap_mode.state == "自动" %}Auto {% elif states.input_select.xiaomi_ap_mode.state == "睡眠" %}Silent {% elif states.input_select.xiaomi_ap_mode.state == "最爱" %}Favorite {% elif states.input_select.xiaomi_ap_mode.state == "待机" %}Idle {% endif %} service: fan.turn_on alias: xiaomi_ap_set_mode initial_state: True trigger: [source /config/packages/xiaomi_air_purifier.yaml:94] platform: state entity_id: input_select.xiaomi_ap_mode - action: [source /config/packages/xiaomi_air_purifier.yaml:113] data_template: [source /config/packages/xiaomi_air_purifier.yaml:115] entity_id: input_select.xiaomi_ap_led option: {% if states.fan.xiaomi_air_purifier_2.attributes.led_brightness == 0 %}亮光 {% elif states.fan.xiaomi_air_purifier_2.attributes.led_brightness == 1 %}微光 {% elif states.fan.xiaomi_air_purifier_2.attributes.led_brightness == 2 %}关闭 {% endif %} service: input_select.select_option alias: xiaomi_ap_get_led initial_state: True trigger: [source /config/packages/xiaomi_air_purifier.yaml:110] platform: time seconds: /5 - action: [source /config/packages/xiaomi_air_purifier.yaml:128] data_template: [source /config/packages/xiaomi_air_purifier.yaml:130] brightness: {% if states.input_select.xiaomi_ap_led.state == "亮光" %}0 {% elif states.input_select.xiaomi_ap_led.state == "微光" %}1 {% elif states.input_select.xiaomi_ap_led.state == "关闭" %}2 {% endif %} entity_id: fan.xiaomi_air_purifier_2 service: fan.xiaomi_miio_set_led_brightness alias: xiaomi_ap_set_led initial_state: True trigger: [source /config/packages/xiaomi_air_purifier.yaml:125] platform: state entity_id: input_select.xiaomi_ap_led Successful config (partial) automation: - action: ? - data_template: ? entity_id: <homeassistant.helpers.template.Template object at 0x74541c10> option: <homeassistant.helpers.template.Template object at 0x74541bb0> service: input_select.select_option alias: xiaomi_ap_get_mode hide_entity: False initial_state: True trigger: ? - platform: time seconds: /5 - action: ? - data_template: ? entity_id: <homeassistant.helpers.template.Template object at 0x74549690> speed: <homeassistant.helpers.template.Template object at 0x74549050> service: fan.turn_on alias: xiaomi_ap_set_mode hide_entity: False initial_state: True trigger: ? - platform: state entity_id: ? - input_select.xiaomi_ap_mode - action: ? - data_template: ? entity_id: <homeassistant.helpers.template.Template object at 0x74549ed0> option: <homeassistant.helpers.template.Template object at 0x74549f50> service: input_select.select_option alias: xiaomi_ap_get_led hide_entity: False initial_state: True trigger: ? - platform: time seconds: /5 - action: ? - data_template: ? brightness: <homeassistant.helpers.template.Template object at 0x745493b0> entity_id: <homeassistant.helpers.template.Template object at 0x74549a50> service: fan.xiaomi_miio_set_led_brightness alias: xiaomi_ap_set_led hide_entity: False initial_state: True trigger: ? - platform: state entity_id: ? - input_select.xiaomi_ap_led
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-4-20 03:09 , Processed in 4.605144 second(s), 32 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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