Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to prepare setup for platform 'xiaomi_gateway3.sensor' after HA udpate to 2024.01 #1253

Closed
JaCoLJcL opened this issue Jan 5, 2024 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@JaCoLJcL
Copy link

JaCoLJcL commented Jan 5, 2024

Hello, after udpate HA to 2024.01

Logger: homeassistant.loader
Source: loader.py:842
First occurred: 11:19:25 (1 occurrences)
Last logged: 11:19:25

Unexpected exception importing platform custom_components.xiaomi_gateway3.climate
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/xiaomi_gateway3/climate.py", line 14, in <module>
    HVAC_MODE_OFF: CURRENT_HVAC_OFF,
    ^^^^^^^^^^^^^
NameError: name 'HVAC_MODE_OFF' is not defined

and:

Logger: homeassistant.loader
Source: loader.py:842
First occurred: 11:19:25 (1 occurrences)
Last logged: 11:19:25

Unexpected exception importing platform custom_components.xiaomi_gateway3.sensor
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/xiaomi_gateway3/sensor.py", line 42, in <module>
    "power": POWER_WATT,
             ^^^^^^^^^^
NameError: name 'POWER_WATT' is not defined

and

Logger: homeassistant.setup
Source: setup.py:403
First occurred: 11:19:25 (2 occurrences)
Last logged: 11:19:25

Unable to prepare setup for platform 'xiaomi_gateway3.sensor': Platform not found (Exception importing custom_components.xiaomi_gateway3.sensor).
Unable to prepare setup for platform 'xiaomi_gateway3.climate': Platform not found (Exception importing custom_components.xiaomi_gateway3.climate).

I use it to conect my BLE temperature devices

@Martleta
Copy link

Martleta commented Jan 5, 2024

witness the same problem after upgrading to HA 2024.1.0

@AlexxIT AlexxIT added the duplicate This issue or pull request already exists label Jan 5, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented Jan 5, 2024

#1245

@AlexxIT AlexxIT closed this as completed Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants