Hi Daniel,
i received your board a couple of days before.
Following your instructions i get this log in ESPHome:
INFO Reading configuration /config/esphome/km271-for-friends-6427c8.yaml...
INFO Updating https://github.com/the78mole/esphome_components.git@main
ERROR Unable to load component km271_wifi.binary_sensor:
Traceback (most recent call last):
File "/esphome/esphome/loader.py", line 162, in _lookup_module
module = importlib.import_module(f"esphome.components.{domain}")
File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/config/esphome/.esphome/external_components/040b63aa/components/km271_wifi/binary_sensor.py", line 106, in <module>
cv.Optional(HC1_IS_OPT_SWOFF): binary_sensor.binary_sensor_schema(
AttributeError: module 'esphome.components.binary_sensor' has no attribute 'binary_sensor_schema'
ERROR Unable to import component km271_wifi.sensor:
Traceback (most recent call last):
File "/esphome/esphome/loader.py", line 162, in _lookup_module
module = importlib.import_module(f"esphome.components.{domain}")
File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/config/esphome/.esphome/external_components/040b63aa/components/km271_wifi/sensor.py", line 5, in <module>
from esphome.const import (
ImportError: cannot import name 'DEVICE_CLASS_DURATION' from 'esphome.const' (/esphome/esphome/const.py)
ERROR Unable to load component km271_wifi.text_sensor:
Traceback (most recent call last):
File "/esphome/esphome/loader.py", line 162, in _lookup_module
module = importlib.import_module(f"esphome.components.{domain}")
File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/config/esphome/.esphome/external_components/040b63aa/components/km271_wifi/text_sensor.py", line 31, in <module>
cv.Optional(FIRMWARE_VERSION): text_sensor.text_sensor_schema(
AttributeError: module 'esphome.components.text_sensor' has no attribute 'text_sensor_schema'
WARNING GPIO2 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
WARNING GPIO4 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
Failed config
binary_sensor.km271_wifi: [source /config/esphome/.esphome/packages/040b63aa/components/km271_wifi/km271-for-friends.yaml:113]
Platform not found: 'binary_sensor.km271_wifi'.
What did i wrong?
Thanks
Sascha