dmitry-cherkas / esphome-danfoss-eco

Extend Danfoss Eco eTRV BLE range over WiFi with ESPHome.
MIT License
21 stars 11 forks source link

Platform not found: 'climate.danfoss_eco'. #8

Closed FransOv closed 1 year ago

FransOv commented 1 year ago

When compiling with the simple sample configuration I get the error "Platform not found: 'climate.danfoss_eco'" (same issue as nr 7). Also I needed to add the line "esp32_ble_tracker:" to the esphome configuration. Using Esphome version 2022.5.1.

Compling and executing the sample configuration was OK.

ERROR Unable to load component danfoss_eco.climate:
Traceback (most recent call last):
  File "/mnt/c/Users/Frans/.venv/lib/python3.8/site-packages/esphome/loader.py", line 162, in _lookup_module
    module = importlib.import_module(f"esphome.components.{domain}")
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/mnt/c/Users/Frans/pytest/.esphome/external_components/085cc3fe/components/danfoss_eco/climate.py", line 74, in <module>
    cv.Optional(CONF_DEVICE_CLASS, default=DEVICE_CLASS_PROBLEM): binary_sensor.device_class
AttributeError: module 'esphome.components.binary_sensor' has no attribute 'device_class'
Failed config

climate.danfoss_eco: [source esptest.yaml:33]

  Platform not found: 'climate.danfoss_eco'.
FransOv commented 1 year ago

Removing the line:

cv.Optional(CONF_DEVICE_CLASS, default=DEVICE_CLASS_PROBLEM): binary_sensor.device_class

(including the comma in the preceding line) solved the problem with no noticeable effect on functionality.

dmitry-cherkas commented 1 year ago

fixed in v1.1.2