After updating Home Assistant recently, the Tuya BLE custom integration started throwing import errors on startup. Specifically, there is now an error importing CONF_COUNTRY_CODE from homeassistant.components.tuya.const.
Details
Home Assistant version:
Component
Version
Core
2024.1.0
Supervisor
2023.12.0
Operating System
11.2
Frontend
20231208.2
Tuya BLE integration version: V0.1.8
Log details:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 251, in _async_setup_component
component = integration.get_component()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 822, in get_component
ComponentProtocol, importlib.import_module(self.pkg_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/config/custom_components/tuya_ble/__init__.py", line 17, in <module>
from .cloud import HASSTuyaBLEDeviceManager
File "/config/custom_components/tuya_ble/cloud.py", line 12, in <module>
from homeassistant.components.tuya.const import (
ImportError: cannot import name 'CONF_COUNTRY_CODE' from 'homeassistant.components.tuya.const' (/usr/src/homeassistant/homeassistant/components/tuya/const.py)
Steps to reproduce
Have Tuya BLE custom integration installed
Update Home Assistant to 2024.1.0
Restart and get import error on startup
Any troubleshooting help would be appreciated! Please let me know if any other details would be helpful for debugging this.
Description
After updating Home Assistant recently, the Tuya BLE custom integration started throwing import errors on startup. Specifically, there is now an error importing
CONF_COUNTRY_CODE
fromhomeassistant.components.tuya.const
.Details
V0.1.8
Log details:
Steps to reproduce
2024.1.0
Any troubleshooting help would be appreciated! Please let me know if any other details would be helpful for debugging this.