Skip to content

Startup error in 2.0.0 #836

@attila123456

Description

@attila123456

After updating to release 2.0.0 and restarting HA, I get several errors in the log:

ERROR (MainThread) [custom_components.pyscript.file.lights] FunctionDecoratorManager(running) [@webhook_trigger(...), @time_active(...)] for file.lights...> start failed: Handler is already defined!
Traceback (most recent call last):
  File "/config/custom_components/pyscript/decorator_abc.py", line 180, in start
    await decorator.start()
  File "/config/custom_components/pyscript/decorators/webhook.py", line 69, in start
    webhook.async_register(
    ~~~~~~~~~~~~~~~~~~~~~~^
        self.dm.hass,
        ^^^^^^^^^^^^^
    ...<5 lines>...
        allowed_methods=self.methods,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/src/homeassistant/homeassistant/components/webhook/__init__.py", line 54, in async_register
    raise ValueError("Handler is already defined!")
ValueError: Handler is already defined!

Enabling legacy decorators in the options does resolve the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions