Hi, I am on 0.62.0 too and I have now a different error:
2018-01-29 13:19:44 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform xiaomi_miio
Traceback (most recent call last):
File "/home/hcooh/hass/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 189, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
File "/usr/lib64/python3.6/asyncio/tasks.py", line 358, in wait_for
return fut.result()
File "/usr/lib64/python3.6/asyncio/futures.py", line 243, in result
raise self._exception
File "/usr/lib64/python3.6/asyncio/tasks.py", line 180, in _step
result = coro.send(None)
File "/usr/lib64/python3.6/asyncio/coroutines.py", line 212, in coro
res = func(*args, **kw)
File "/home/hcooh/hass/lib/python3.6/site-packages/homeassistant/components/switch/xiaomi_miio.py", line 52, in async_setup_platform
device_info = plug.info()
File "/home/hcooh/hass/lib/python3.6/site-packages/miio/device.py", line 271, in info
return DeviceInfo(self.send("miIO.info", []))
File "/home/hcooh/hass/lib/python3.6/site-packages/miio/device.py", line 216, in send
m = Message.build(msg, ctx)
TypeError: build() takes 2 positional arguments but 3 were given
It seems the build function does not like those parameters anymore…
replacing ctx by token=self.token in the device.py seems to fix the issue (as fixed in github already)
I am running 0.62 on hassio 1.1 and seem to have the same problem as above, though my errors differs a bit (the first lines are the same but not the end) :
Error while setting up platform xiaomi_miio
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 189, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
File "/usr/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
return fut.result()
File "/usr/lib/python3.6/asyncio/futures.py", line 245, in result
raise self._exception
File "/usr/lib/python3.6/asyncio/tasks.py", line 180, in _step
result = coro.send(None)
File "/usr/lib/python3.6/asyncio/coroutines.py", line 210, in coro
res = func(*args, **kw)
File "/usr/lib/python3.6/site-packages/homeassistant/components/vacuum/xiaomi_miio.py", line 90, in async_setup_platform
from miio import Vacuum
File "/usr/lib/python3.6/site-packages/miio/__init__.py", line 2, in <module>
from miio.protocol import Message, Utils
File "/usr/lib/python3.6/site-packages/miio/protocol.py", line 179, in <module>
Const(0x2131, Int16ub),
File "/usr/lib/python3.6/site-packages/construct/core.py", line 1894, in __init__
super(Const, self).__init__(subcon)
File "/usr/lib/python3.6/site-packages/construct/core.py", line 291, in __init__
raise TypeError("subcon should be a Construct field")
TypeError: subcon should be a Construct field
pip3 is not possible to run as I am on hassio and I do not find a device.py anywhere.
I had the problem starting in 0.62.0, just upgraded to 0.62.1 still the same. I don’t know exactly what @syssi is referring to but I will try to figure it out