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

Empty Fan fails to compile #5

Open
thargy opened this issue Oct 24, 2023 · 0 comments
Open

Empty Fan fails to compile #5

thargy opened this issue Oct 24, 2023 · 0 comments

Comments

@thargy
Copy link

thargy commented Oct 24, 2023

When I use the empty_fan component, I get the following:

INFO ESPHome 2023.9.1
INFO Reading configuration hot-water-controller.yaml...
INFO Generating C++ source...
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Python311\Scripts\esphome.exe\__main__.py", line 7, in <module>
  File "C:\Python311\Lib\site-packages\esphome\__main__.py", line 1036, in main
    return run_esphome(sys.argv)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\esphome\__main__.py", line 1023, in run_esphome
    rc = POST_CONFIG_ACTIONS[args.command](args, config)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\esphome\__main__.py", line 403, in command_compile
    exit_code = write_cpp(config)
                ^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\esphome\__main__.py", line 189, in write_cpp
    generate_cpp_contents(config)
  File "C:\Python311\Lib\site-packages\esphome\__main__.py", line 201, in generate_cpp_contents
    CORE.flush_tasks()
  File "C:\Python311\Lib\site-packages\esphome\core\__init__.py", line 642, in flush_tasks
    self.event_loop.flush_tasks()
  File "C:\Python311\Lib\site-packages\esphome\coroutine.py", line 246, in flush_tasks
    next(task.iterator)
  File "C:\Python311\Lib\site-packages\esphome\__main__.py", line 181, in wrapped
    await coro(conf)
  File "C:\Python311\Lib\site-packages\esphome\coroutine.py", line 80, in coro
    ret = yield from _flatten_generator(gen)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\esphome\coroutine.py", line 132, in _flatten_generator
    to_send = yield from val.__await__()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\esphome\components\fan\__init__.py", line 168, in create_fan_state
    await cg.register_component(var, config)
  File "C:\Python311\Lib\site-packages\esphome\cpp_helpers.py", line 56, in register_component
    raise ValueError(
ValueError: Component ID fan_speed was not declared to inherit from Component, or was registered twice. Please create a bug report with your configuration.
sys:1: RuntimeWarning: coroutine 'to_code' was never awaited
sys:1: RuntimeWarning: coroutine 'add_arduino_global_workaround' was never awaited
sys:1: RuntimeWarning: coroutine '_add_platformio_options' was never awaited

for

fan:
  - platform: empty_fan
    id: fan_speed
    output: fan_pwm
    name: "Fan Speed"
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

1 participant