Closed ggsddu-007 closed 4 years ago
What is your toiletlid model? Currently only tinymu
toilet lid is supported
tinymu.toiletlid.v1
toiletlid:
copyed only toiletlid or only xiaomi_toiletlid or both of them,ha still show:
Logger: homeassistant.setup Source: setup.py:118 First occurred: 下午2:32:50 (1 occurrences) Last logged: 下午2:32:50
Setup failed for toiletlid: No setup function defined.
Directory tree:
custom_components $ ls /root/config/custom_components/{toiletlid,xiaomi_toiletlid}
/root/config/custom_components/toiletlid:
__init__.py manifest.json services.yaml
/root/config/custom_components/xiaomi_toiletlid:
__init__.py manifest.json toiletlid.py
config:
toiletlid:
- platform: xiaomi_toiletlid
name: iot-toiletlid
host: 192.168.198.121
token: 110d41e2ee88392ee8d98b6b7cca2311
对,就是按照这个格式配置的,文件也都复制进去了。我打的内容在github里面格式显示的总是有问题
更新下新代码试试
感谢大佬修改,然鹅还是同样的问题
你用的hassio还是homeassistant, 看一下python-miio版本是不是太老了
用的hassos直接虚拟机部署,os是4.13,ha是0.115.0
还是同样的问题 😅
你吧log level设成debug试试,我升级0.115使用正常
大佬 我放弃了🤣
0.115.6 一样的问题
改了log level还是原来那条log,没有其他的
你执行下ls /config/custom_components -la
和 ls -la /config/custom_components/{toiletlid,xiaomi_toiletlid}
custom_components ls -la total 124 drwxr-xr-x 17 root root 4096 Oct 9 14:52 . drwxr-xr-x 8 root root 4096 Oct 9 17:29 .. -rw-r--r-- 1 root root 11357 Sep 30 12:11 LICENSE -rw-r--r-- 1 root root 3416 Sep 30 12:11 README.md drwxr-xr-x 3 root root 4096 Sep 10 16:00 dairfresh drwxr-xr-x 12 root root 4096 Sep 28 15:44 hacs -rw-r--r-- 1 root root 112 Sep 30 12:11 hacs.json -rw-r--r-- 1 root root 2 Sep 30 12:11 info.md drwxr-xr-x 3 root root 4096 Sep 30 14:30 mi_water_purifier_1a drwxr-xr-x 4 root root 4096 Sep 28 22:50 miio drwxr-xr-x 3 root root 4096 Sep 30 14:30 mycamera drwxr-xr-x 2 root root 4096 Sep 30 12:11 preview drwxr-xr-x 2 root root 4096 Sep 18 12:45 toiletlid -rw-r--r-- 1 root root 23367 Sep 30 12:11 xiaomi-smartfan.js -rw-r--r-- 1 root root 5175 Sep 30 12:11 xiaomi-smartfan.js.gz drwxr-xr-x 3 root root 4096 Oct 5 13:23 xiaomi_cover drwxr-xr-x 3 root root 4096 Oct 9 14:52 xiaomi_gateway3 drwxr-xr-x 3 root root 4096 Sep 10 11:28 xiaomi_miio_airconditioningcompanion drwxr-xr-x 3 root root 4096 Sep 10 14:51 xiaomi_miio_airpurifier drwxr-xr-x 3 root root 4096 Sep 10 14:52 xiaomi_miio_fan drwxr-xr-x 3 root root 4096 Sep 30 15:32 xiaomi_miio_raw drwxr-xr-x 3 root root 4096 Sep 29 12:44 xiaomi_toiletlid drwxr-xr-x 3 root root 4096 Sep 30 12:31 yunmi
ls -la /config/custom_components/{toiletlid,xiaomi_toiletlid} /config/custom_components/toiletlid: total 20 drwxr-xr-x 2 root root 4096 Sep 18 12:45 . drwxr-xr-x 17 root root 4096 Oct 9 14:52 .. -rwxr--r-- 1 root root 1030 Sep 30 11:30 init.py -rwxr--r-- 1 root root 209 Sep 30 11:30 manifest.json -rwxr--r-- 1 root root 437 Sep 30 11:30 services.yaml
/config/custom_components/xiaomi_toiletlid: total 28 drwxr-xr-x 3 root root 4096 Sep 29 12:44 . drwxr-xr-x 17 root root 4096 Oct 9 14:52 .. -rwxr--r-- 1 root root 23 Sep 18 12:44 init.py drwxr-xr-x 2 root root 4096 Sep 29 12:44 pycache -rwxr--r-- 1 root root 225 Sep 18 12:44 manifest.json -rwxr--r-- 1 root root 7134 Sep 29 12:39 toiletlid.py ➜ ~
设置/config/configuration.yaml
logger:
default: debug
查日志tail -f /config/home-assistant.log
(MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=persistent_notification, service=create, service_data=title=Invalid config, message=The following integrations and platforms could not be set up:
Please check your config., notification_id=invalid_config>
(MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=persistent_notification.invalid_config, old_state=None, new_state=<state persistent_notification.invalid_config=notifying; title=Invalid config, message=The following integrations and platforms could not be set up:
Please check your config. @ 2020-10-09T19:00:22.268616+08:00>>
这两条有用么?
直接把log文件发我看看
不科学啊,你完全照着我的输入 编辑 /config/configuration.yaml
toiletlid:
- platform: xiaomi_toiletlid
name: iot-toiletlid
host: 192.168.198.121
token: 110d41e2ee88392ee8d98b6b7cca2311
shell下输入
rm -rf /config/custom_components/{toiletlid,xiaomi_toiletlid}
wget https://github.com/scp10011/xiaomi_toiletlid/releases/download/v0.1-0.114/xiaomi_toiletlid.tar -O - | tar x -C /config/custom_components/
chown root:root /config/custom_components/{toiletlid,xiaomi_toiletlid}
ha core restart
一顿操作猛如虎 重启还是老样子
你开个虚拟机新建个hassio只加这个包试试,我前两天重装了一次都是正常的.
刚才把其他包都删了,重建了configuration.yaml还是报错,我重装一个试试
厉害了!重装搞定,等我挨个配置改回去,看看是不是和什么东西有冲突
感谢大佬 我终于把小沐加进去了 这下家里的自动化都可以改成本地执行了😀
找到是啥冲突了吗,我改改
请问结果到底是怎么改好的?
我把原来的设备都加回来了 目前没有报错……等我再折腾几天试试
请问结果到底是怎么改好的?
貌似有一些奇怪的兼容问题 重装一下hassio就好了
请问结果到底是怎么改好的?
貌似有一些奇怪的兼容问题 重装一下hassio就好了
我试过两个环境都不行,但没有试过只有这一个插件可不可以 看日志的情况,应该是走到了下面的这个文件的208行 https://github.com/home-assistant/core/blob/dev/homeassistant/setup.py
@mickey50 重做了一个虚拟机装的hassos,第一个部署了这个包,重启没问题,又导入了原来的各种包和配置文件,也没再出问题……
it still show
Invalid config The following integrations and platforms could not be set up:
toiletlid Please check your config.