Skip to content

Config flow error #6

Description

@Flix6x

When filling in seita.energy as a host, I got an uninformative error in the UI. The HA logs showed more, though:

Traceback (most recent call last):
  File "/config/custom_components/flexmeasures_hacs/config_flow.py", line 98, in async_step_user
    info = await validate_input(self.hass, user_input)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/flexmeasures_hacs/config_flow.py", line 54, in validate_input
    host, ssl = get_host_and_ssl_from_url(data["url"])
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/flexmeasures_hacs/config_flow.py", line 239, in get_host_and_ssl_from_url
    return host, ssl
           ^^^^
UnboundLocalError: cannot access local variable 'host' where it is not associated with a value

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions