Some progress to report but it’s pretty clear people will experience headaches. I know because I’m living it right now.
I copied the entire stock MQTT component directory (and its sub-directory for light
) to custom_components/mqtt
. For good measure, I also purged the contents of the __pycache__
sub-directory.
Now 0.89 finds my customized alarm_control_panel.py
(and loads it successfully) as well as the non-customized components I use such as light
, switch
, sensor
, binary_sensor
, and cover
. Progress!
However, there’s still no joy in Hassville because 0.89 stumbles with my customized climate.py
. It rejects it because it is unable to resolve STATE_AUTO
.
Well now, that’s a head-scratcher because STATE_AUTO
is not something I added to my customized climate.py
. It also exists in the 0.89 version of climate.py
.
Here’s the error message:
HASS[1457]: 2019-03-07 09:05:52 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.mqtt.climate. Make sure all dependencies are installed
HASS[1457]: Traceback (most recent call last):
HASS[1457]: File "/usr/src/app/homeassistant/loader.py", line 166, in _load_file
HASS[1457]: module = importlib.import_module(path)
HASS[1457]: File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
HASS[1457]: return _bootstrap._gcd_import(name[level:], package, level)
HASS[1457]: File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
HASS[1457]: File "<frozen importlib._bootstrap>", line 983, in _find_and_load
HASS[1457]: File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
HASS[1457]: File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
HASS[1457]: File "<frozen importlib._bootstrap_external>", line 728, in exec_module
HASS[1457]: File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
HASS[1457]: File "/config/custom_components/mqtt/climate.py", line 16, in <module>
HASS[1457]: from homeassistant.components.climate import (
HASS[1457]: ImportError: cannot import name 'STATE_AUTO' from 'homeassistant.components.climate' (/usr/src/app/homeassistant/components/climate/__init__.py)
HASS[1457]: 2019-03-07 09:05:52 ERROR (MainThread) [homeassistant.loader] Unable to find platform mqtt. Search path was limited to path of component: custom_components
HASS[1457]: 2019-03-07 09:05:52 INFO (MainThread) [homeassistant.setup] Setting up climate
HASS[1457]: 2019-03-07 09:05:52 INFO (MainThread) [homeassistant.setup] Setup of domain climate took 0.0 seconds.
STATE_AUTO
is defined outside the realm of the MQTT component. It’s defined in the Climate component, in homeassistant/components/climate/const.py
.
Do I also need to copy that file into custom_components/climate/
?
Based on what I’m experiencing, I’d say the breezy, easy-peasy documentation for this Breaking Change assumes a ‘best-case’ scenario.