After updating python to the latest 3.7 and a HA to 0.84.5 versions mqtt does not want to start:
2018-12-21 11:54:37 ERROR (MainThread) [homeassistant.setup] Error during setup of component mqtt
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/homeassistant/setup.py", line 145, in _async_setup_component
hass, processed_config)
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/mqtt/__init__.py", line 397, in async_setup
broker_config = await _async_setup_server(hass, config)
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/mqtt/__init__.py", line 342, in _async_setup_server
hass, conf.get(CONF_PASSWORD), conf.get(CONF_EMBEDDED))
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/mqtt/server.py", line 40, in async_start
from hbmqtt.broker import Broker, BrokerException
File "/Users/Cezex/.homeassistant/deps/lib/python/site-packages/hbmqtt/broker.py", line 6, in <module>
import websockets
File "/Users/Cezex/.homeassistant/deps/lib/python/site-packages/websockets/__init__.py", line 3, in <module>
from .client import *
File "/Users/Cezex/.homeassistant/deps/lib/python/site-packages/websockets/client.py", line 20, in <module>
from .protocol import WebSocketCommonProtocol
File "/Users/Cezex/.homeassistant/deps/lib/python/site-packages/websockets/protocol.py", line 18, in <module>
from .compatibility import asyncio_ensure_future
File "/Users/Cezex/.homeassistant/deps/lib/python/site-packages/websockets/compatibility.py", line 15
asyncio_ensure_future = asyncio.async # Python < 3.5
^
SyntaxError: invalid syntax
Any ideas what’s wrong with this asyncio.async? Why it’s even executed if hass is using python 3.7?