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

how to revise custom components? #4

Open
bhouseski opened this issue Jul 3, 2024 · 1 comment
Open

how to revise custom components? #4

bhouseski opened this issue Jul 3, 2024 · 1 comment

Comments

@bhouseski
Copy link

bhouseski commented Jul 3, 2024

Trying to implement this, but do not understand how to implement the revised code for sensor.py, lc709203f.h, lc709203f.cpp.

can you advise.

log below

INFO ESPHome 2024.6.6
INFO Reading configuration /config/esphome/waveshare-e-ink.yaml...
ERROR Unable to load component sensor:
Traceback (most recent call last):
File "/esphome/esphome/loader.py", line 176, in _lookup_module
module = importlib.import_module(f"esphome.components.{domain}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1206, in _gcd_import
File "", line 1178, in _find_and_load
File "", line 1149, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "/config/esphome/components/sensor.py", line 18, in
sensor.sensor_schema(UNIT_VOLT, ICON_EMPTY, 2).extend({
^^^^^^^^^^^^^^^^^^^^
AttributeError: partially initialized module 'esphome.components.sensor' has no attribute 'sensor_schema' (most likely due to a circular import)
Failed config

sensor: [source /config/esphome/waveshare-e-ink.yaml:47]

Component not found: sensor.

  • platform: lc709203f
    i2c_id: bus_a
    address: 0x0B
@boverby
Copy link
Owner

boverby commented Jul 3, 2024

see issue 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants