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

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

[插件集成] 小米一级能效空调接入HA

[复制链接]

0

主题

3

帖子

10

积分

新手上路

Rank: 1

积分
10
金钱
7
HASS币
0
发表于 2021-2-7 23:36:22 | 显示全部楼层
本帖最后由 aceralon 于 2021-2-8 09:39 编辑
npduy92 发表于 2020-11-26 22:24
我修复了它,使其仅支持zhimi.aircondition.ma4模型
将此代码添加到configuration.yaml文件中

使用的是 ma4 运行后产生错误,无法生成实体,日志如下:
Using ma4, but can not get it running and generate entity. Logs:

2021-02-07 23:33:44 ERROR (MainThread) [homeassistant.components.climate] miio_duy: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 358, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 466, in async_device_update
await task
File "/config/custom_components/miio_duy/climate.py", line 220, in async_update
self._last_on_operation = HVACMode[state.mode.name].value
File "/config/custom_components/miio_duy/climate.py", line 476, in mode
return OperationMode(self.data['mode'])
File "/usr/local/lib/python3.8/enum.py", line 339, in __call__
return cls.__new__(cls, value)
File "/usr/local/lib/python3.8/enum.py", line 662, in __new__
raise ve_exc
ValueError: 'automode' is not a valid OperationMode

没找到好的修复方法。
开启空调的状态下重启hass即可。
Restart hass while the ac is on solve the problem.


回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-4-29 05:32 , Processed in 0.048301 second(s), 27 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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