Error while setting up platform eq3btsmart
18:04 components/climate/eq3btsmart.py (ERROR)
Error while setting up platform eq3btsmart
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/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/lib/python3.6/site-packages/homeassistant/components/climate/eq3btsmart.py", line 51, in setup_platform
devices.append(EQ3BTSmartThermostat(mac, name))
File "/usr/lib/python3.6/site-packages/homeassistant/components/climate/eq3btsmart.py", line 63, in __init__
import eq3bt as eq3
File "/usr/lib/python3.6/site-packages/eq3bt/__init__.py", line 2, in <module>
from .eq3btsmart import Thermostat, TemperatureException, Mode
File "/usr/lib/python3.6/site-packages/eq3bt/eq3btsmart.py", line 17, in <module>
from .structures import *
File "/usr/lib/python3.6/site-packages/eq3bt/structures.py", line 79, in <module>
"cmd" / Const(PROP_INFO_RETURN, Int8ub),
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
I seem to be having the exact same issue, after the update to 0.62.0. For reference:
2018-01-28 21:59:37 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform eq3btsmart
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/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/lib/python3.6/site-packages/homeassistant/components/climate/eq3btsmart.py", line 51, in setup_platform
devices.append(EQ3BTSmartThermostat(mac, name))
File "/usr/lib/python3.6/site-packages/homeassistant/components/climate/eq3btsmart.py", line 63, in __init__
import eq3bt as eq3
File "/usr/lib/python3.6/site-packages/eq3bt/__init__.py", line 2, in <module>
from .eq3btsmart import Thermostat, TemperatureException, Mode
File "/usr/lib/python3.6/site-packages/eq3bt/eq3btsmart.py", line 17, in <module>
from .structures import *
File "/usr/lib/python3.6/site-packages/eq3bt/structures.py", line 79, in <module>
"cmd" / Const(PROP_INFO_RETURN, Int8ub),
File "/config/deps/lib/python3.6/site-packages/construct/core.py", line 1930, in __init__
super(Const, self).__init__(subcon)
File "/config/deps/lib/python3.6/site-packages/construct/core.py", line 288, in __init__
raise TypeError("subcon should be a Construct field")
TypeError: subcon should be a Construct field
The construct library changed the order of some structures which caused this break. Updating to a newer release of python-eq3bt (e.g. pip install python-eq3bt, release 0.1.8 has this issue fixed) will fix it.
It is odd though how come it’s broken, as the fix should have already been released with 0.62 (https://github.com/home-assistant/home-assistant/pull/11834). Could you please verify which versions of python-eq3bt and construct you have installed? pip show python-eq3bt (and the same for construct) will show the installed versions.
Maybe it is something different between hassio and the normal installation?
Maybe I can find something more in this direction but now I have to go to work first.
Edit:
After manually upgrade construct it is okay.
The requirements of python-eq3bt have to be updated to the lowest version of construct with the new api.
Having it to pin the version / depend on a newer version after that API change will only remedy this until the API breaks again, which is why I’m not such a great fan of version pinning. This will be fixed on its own time, but if you really want, I’ll accept a PR for that.
Can you tell me how you updated this within hass.io? I’m struggling with the same problem, even with the 0.64.3 release. Too bad I cannot use the Bluetooth thermostats anymore.