Comments (14)
请问是docker部署的HA吗?
hassbian论坛也有人遇到过,原因不明,你可以尝试下在命令行重启HA
from hass-xiaomi-miot.
不是docker,自建Linux服务器直接安装的homeassistant,Web UI重启,命令行重启homeassistant服务都试过了,日志提示一直都是这样的。
from hass-xiaomi-miot.
请下载最新版master分支重试下,另外有灯的晾衣机无需单独配置light,只需配置cover,通过yaml集成时model也是必须的。
当前版本的插件不确定能否支持您这款晾衣架,如果你确定miio props中包含led
和motor
,则支持。
cover:
- platform: xiaomi_miot
name: 晾衣机
host: 192.168.2.55
token: af0f2be5d00d70f85a2753ee837d1475
model: hyd.airer.znlyj1
from hass-xiaomi-miot.
更新了最新版,WebUI的集成里仍然看不到;配置文件里我把model加上了,日志里同样没有任何相关提示,也没有生成相关实体。
补充一下,我使用xiaomi_miot_raw这个集成是可以添加使用这个晾衣机的,但它不支持灯,所以想试试看您的这个集成。
from hass-xiaomi-miot.
事实上目前xiaomi_miot这个集成是使用旧的miio协议实现对晾衣机的支持,且晾衣机类设备应该仅支持mrbond.airer.m1pro。
至于WebUI集成中搜不到xiaomi_miot,我觉得应该是其他未知问题造成的。目前我本人已经通过这个插件集成了好几个设备都正常运行。
from hass-xiaomi-miot.
你好,我升级homeassistant到2021.1.1,xiaomi_miot在集成中能显示了,我的这个晾衣机可以在集成中添加,但仍然没有生成任何实体,应该是不支持了。感谢您的跟进。
from hass-xiaomi-miot.
我刚添加了对hyd.airer.znlyj1
的支持,你可以尝试下分支add-airer
from hass-xiaomi-miot.
我刚添加了对
hyd.airer.znlyj1
的支持,你可以尝试下分支add-airer
更新试了下,日志报错误:
2021-01-13 22:46:49 ERROR (MainThread) [homeassistant.components.cover] xiaomi_miot: Error on device update!
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/homeassistant/helpers/entity_platform.py", line 359, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 466, in async_device_update
await task
File "/etc/homeassistant/custom_components/xiaomi_miot/cover.py", line 246, in async_update
self._position = 100 - round(attrs.get('current_position', 0), -1) * 50
TypeError: type NoneType doesn't define __round__ method
from hass-xiaomi-miot.
下载最新的提交再试下
from hass-xiaomi-miot.
看来还有几个位置得改:
2021-01-13 23:20:50 ERROR (MainThread) [homeassistant.components.cover] xiaomi_miot: Error on device update!
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/homeassistant/helpers/entity_platform.py", line 359, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 466, in async_device_update
await task
File "/etc/homeassistant/custom_components/xiaomi_miot/cover.py", line 247, in async_update
self._is_opening = int(attrs.get('status', 0)) == 1
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
2021-01-13 23:25:54 ERROR (MainThread) [homeassistant.components.cover] xiaomi_miot: Error on device update!
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/homeassistant/helpers/entity_platform.py", line 359, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 466, in async_device_update
await task
File "/etc/homeassistant/custom_components/xiaomi_miot/cover.py", line 257, in async_update
add_lights = self._add_entities.get('light', None)
AttributeError: 'MijiaAirerEntity' object has no attribute '_add_entities'
2021-01-13 23:35:28 ERROR (MainThread) [homeassistant.components.cover] xiaomi_miot: Error on device update!
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/homeassistant/helpers/entity_platform.py", line 359, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 466, in async_device_update
await task
File "/etc/homeassistant/custom_components/xiaomi_miot/cover.py", line 259, in async_update
if 'light' in self._subs:
AttributeError: 'MijiaAirerEntity' object has no attribute '_subs'
from hass-xiaomi-miot.
我从邦先生的类中把这几个缺少的属性复制过去了,具体修改代码如下:
--- cover.py.old 2021-01-13 23:44:50.172849081 +0800
+++ cover.py 2021-01-13 23:37:30.721860489 +0800
@@ -234,18 +234,20 @@
_LOGGER.info('Initializing with host %s (token %s...)', host, token[:5])
self._device = MiotDevice(self.mapping, host, token)
+ self._add_entities = config.get('add_entities')
super().__init__(name, self._device)
self._device_class = DEVICE_CLASS_DAMPER
self._supported_features = SUPPORT_OPEN | SUPPORT_CLOSE | SUPPORT_STOP
self._state_attrs.update({'entity_class': self.__class__.__name__})
+ self._subs = {}
async def async_update(self):
await super().async_update()
if self._available:
attrs = self._state_attrs
self._position = 100 - round(attrs.get('current_position') or 0, -1) * 50
- self._is_opening = int(attrs.get('status', 0)) == 1
- self._is_closing = int(attrs.get('status', 0)) == 2
+ self._is_opening = int(attrs.get('status') or 0) == 1
+ self._is_closing = int(attrs.get('status') or 0) == 2
self._closed = self._position <= 0
self._state_attrs.update({
'stopped': bool(not self._is_opening and not self._is_closing),
出现了两个实体:灯和升降帘,但灯的开关无效,升级帘可以降下来,可以暂停,不能升上去。
from hass-xiaomi-miot.
您好,新的提交可以正常升降和开关灯了,但灯的开关状态获取不正常,任何时候灯的状态在HA都显示为关,要在HA里关灯的话,需要打开的时候趁灯的状态还没自动变回“关”的时候点关才行。
from hass-xiaomi-miot.
强烈推荐使用auto-miot分支,该分支通过miot-spec.org提供的数据自动适配设备。
from hass-xiaomi-miot.
请问有尝试最新版本吗?是否正常接入?
from hass-xiaomi-miot.
Related Issues (20)
- Unable to Retrieve Bindkey using service: xiaomi_miot.get_bindkey HOT 4
- 米科智能浴霸不可用 HOT 3
- Missing property for Lydsto S1 HOT 2
- cant get xiaomi feed
- T5 intelligent door lock Lock Operation Method lock_action HOT 1
- 小米音箱本地模式不可用 HOT 1
- 如何翻译非选项文本?具体格式是什么?
- Unable to discover the device HOT 1
- 智能窗帘失效 babai.curtain.lsxf83
- 小米空气净化器4 屏幕控制不正常 HOT 2
- functions are missing in the xiaomi vacuum s12
- Xiaomi
- 关于循环扇(xiaomi.fan.p51)的角度实体的属性,以及其他设备的属性应该如何参照miot来添加?
- 在自动模式下如何查看某个设备是通过本地连接,还是云端链接 HOT 1
- Xiaomi Smart Plug WIFI
- Sending the command set_cover "on" a second time doesn't open the toilet ring HOT 1
- 邦先生M33A电动晾衣架最大最低色温值反了
- Request: Display On/Off for Qingping Air Monitor Lite - cgd1st
- 为什么我的净水器没有tds数值 HOT 1
- Devices offline HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hass-xiaomi-miot.