jedmeng / homeassistant-konke

Apache License 2.0
35 stars 18 forks source link

能更新下支持0.92版本吗 #4

Open cachenow opened 5 years ago

cachenow commented 5 years ago

好久没见作者在hassbian发帖了,现在升级了0.92插件不能用了。

zhanghm110 commented 5 years ago

同求

zhanghm110 commented 5 years ago

小白不知道怎么改

Qetesh commented 5 years ago

➜ konke cat manifest.json
{ "domain": "konke", "name": "konke", "documentation": "https://github.com/jedmeng/homeassistant-konke", "dependencies": [], "codeowners": ["@jedmeng"], "requirements": ["pykonkeio==2.1.7"] }

➜ konke pwd
/home/homeassistant/.homeassistant/custom_components/konke

按照这个改下可以用的 @zhanghm110 @cachenow

5high commented 5 years ago

@Qetesh 你好.homeassistant/custom_components/konke 这个目录下面的结构是什么样子的?

请问您已经成功再0.92上面使用了吗? 我按照新格式改了一下,启动还是无法加载。

目前我是使用command_line配合konkeio的命令行来控制插座。

Qetesh commented 5 years ago

➜ custom_components cd /home/homeassistant/.homeassistant/custom_components/konke
➜ konke ll 总用量 28K -rw-r--r-- 1 homeassistant homeassistant 204 6月 10 16:19 manifest.json drwxr-xr-x 2 homeassistant homeassistant 4.0K 4月 24 09:49 pycache -rwxr-xr-x 1 homeassistant homeassistant 7.4K 4月 24 09:47 remote.py -rwxr-xr-x 1 homeassistant homeassistant 11K 4月 24 09:47 switch.py ➜ konke

主要是两方面变了,种类文件夹变成platfrom文件夹,另一个是添加manifest.json描述文件

5high commented 5 years ago

Traceback (most recent call last): File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step result = coro.send(None) File "/usr/local/lib/python3.5/dist-packages/homeassistant/helpers/entity_platform.py", line 270, in _async_add_entity if entity.unique_id is not None: File "/root/.homeassistant/custom_components/konke/switch.py", line 127, in unique_id return '%s:%s' % (self._device.uuid, self.type) AttributeError: 'MiniK' object has no attribute 'uuid' @Qetesh 插件还是报错了

我的版本是0.93

Qetesh commented 5 years ago

我的是0.94,奇怪你报错的127行和我的不一样呢,要用master分支代码。

zhanghm110 commented 5 years ago

你下载的版本不对https://bbs.hassbian.com/thread-5391-1-1.html 帖子下面压缩包可用,Github上的不可以那个 帖子压缩包里面要求是pykonkeio>=2.1.7 ,那个用的是mac不是uuid Github的要求是pykonkeio>=2.1.8 我是小白,只是跟着报错改,这个错误我是换了个版本解决的

------------------ 原始邮件 ------------------ 发件人: "Qetesh"notifications@github.com; 发送时间: 2019年6月20日(星期四) 下午2:07 收件人: "jedmeng/homeassistant-konke"homeassistant-konke@noreply.github.com; 抄送: "Ming"zhanghm110@qq.com;"Mention"mention@noreply.github.com; 主题: Re: [jedmeng/homeassistant-konke] 能更新下支持0.92版本吗 (#4)

我的是0.94,奇怪你报错的127行和我的不一样呢,要用master分支代码。或者加我微信我试着看看destiny-----

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

Scribing commented 4 years ago

主要是把最新版的 uuid 改回成 mac和pykonkeio == 2.1.7,HA 0.111.0已经能正常运行