Environment
- Home Assistant: 2026.7.4
- HACS installation
- Danalock Cloud: v1.2.0
Problem
After installing the integration from HACS and adding it via Settings > Devices & Services, Home Assistant displays:
"Config flow could not be loaded: {"message":"invalid handler specified"}"
Cause
config_flow.py contains a syntax error:
from .const import (
...
EXPIRES IN,
...
)
This should be:
There is also another issue later in config_flow.py:
auth_result.get(TOKEN_EXPIRES_IN)
should be:
auth_result.get(EXPIRES_IN)
since const.py defines:
EXPIRES_IN = "expires_in"
After correcting the import (and the constant reference), the integration loads and the config flow works correctly.
Environment
Problem
After installing the integration from HACS and adding it via Settings > Devices & Services, Home Assistant displays:
"Config flow could not be loaded: {"message":"invalid handler specified"}"
Cause
config_flow.py contains a syntax error:
from .const import (
...
EXPIRES IN,
...
)
This should be:
There is also another issue later in config_flow.py:
auth_result.get(TOKEN_EXPIRES_IN)
should be:
auth_result.get(EXPIRES_IN)
since const.py defines:
EXPIRES_IN = "expires_in"
After correcting the import (and the constant reference), the integration loads and the config flow works correctly.