junnikokuki / Meizu-BLE-Thermometer

31 stars 16 forks source link

ImportError: cannot import name 'esp32_ble_client' #6

Open T-REX-XP opened 4 years ago

T-REX-XP commented 4 years ago

Hi! I can't import your components.

I'm using hass.io and copied folders with custom components to all folders.

INFO Reading configuration /config/esphome/am43_test.yaml...
WARNING Unable to import custom component xiaomi_ble_mjhtv1.sensor:
Traceback (most recent call last):
  File "/opt/esphome/esphome/config.py", line 140, in _lookup_module
    module = importlib.import_module('custom_components.{}'.format(domain))
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/config/esphome/custom_components/xiaomi_ble_mjhtv1/sensor.py", line 3, in <module>
    from esphome.components import sensor, esp32_ble_client
ImportError: cannot import name 'esp32_ble_client'
Failed config

sensor.xiaomi_ble_mjhtv1: [source /config/esphome/am43_test.yaml:33]

  Platform not found: 'sensor.xiaomi_ble_mjhtv1'.
  platform: xiaomi_ble_mjhtv1
  update_interval: 180s
  mac_address: XX:XX:XX:XX:XX:XX
  temperature: 
    name: mjhtv1 Temperature
  humidity: 
    name: mjhtv1 Humidity