[Bug]: 12.8.0 not works
xtymmms1021 opened this issue · comments
What happened?
After upgrading to 12.8.0, this integration no longer works.
According to the log, there is an incorrect attribute call in 12.8.0.
Wrong:
UnitOfTemperature.TEMP_CELSIUS
UnitOfTemperature.TEMP_FAHRENHEIT
Correct:
UnitOfTemperature.CELSIUS
UnitOfTemperature.FAHRENHEIT
Sensor type
No response
Relevant log output
2024-01-08 05:54:34.673 ERROR (MainThread) [homeassistant.loader] Unexpected exception importing platform custom_components.ble_monitor.config_flow
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 842, in get_platform
cache[full_name] = self._import_platform(platform_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 859, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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/ble_monitor/config_flow.py", line 49, in <module>
vol.Optional(CONF_TEMPERATURE_UNIT, default=UnitOfTemperature.TEMP_CELSIUS): vol.In(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/enum.py", line 784, in __getattr__
raise AttributeError(name) from None
AttributeError: TEMP_CELSIUS
Well, it seems something went wrong in the "Fix for outdated temperature units in the configuration process".
Same happened to me.
Same here, all my Xiaomi LYWSD03MMC Hygro thermometers show N/A
Sorry, my mistake. Will release an update in a minute
12.8.1 is released. Thanks for the fix @xtymmms1021