Skip to content

LocalTuya options flow broken on Home Assistant 2025.12.x – `property 'config_entry' ... has no setter #2132

Description

@vincetek-f

Hello,

Since upgrading to Home Assistant 2025.12.2 and using LocalTuya 5.2.x (tested 5.2.4, 5.2.3, 5.2.1, 5.2.0), I can no longer add or configure any LocalTuya devices.
The configuration / options flow crashes immediately after the “Cloud API account configuration” dialog (or when I click on the gear icon), and no further step (device list / add device) is shown.

Environment

  • Home Assistant: 2025.12.2 (Home Assistant OS)
  • LocalTuya: 5.2.4 → 5.2.0 (same behaviour on all tested versions)
  • Installation: HACS
  • Region: EU
  • Tuya IoT project correctly configured (devices visible, resource pack active)

Steps to reproduce

  1. Install LocalTuya from HACS and restart Home Assistant.
  2. Go to Settings → Devices & Services → LocalTuya integration.
  3. Click on “Add entry”.
  4. Fill in the Cloud API account configuration (or tick “Do not configure a Cloud API account”) and validate.

Actual behaviour

  • After validating the Cloud API dialog (or ticking “Do not configure…”), I am returned to the integration page.
  • No device list and no “Add device” wizard appears.
  • In the Home Assistant logs, the following error is raised every time:
AttributeError: property 'config_entry' of 'LocalTuyaOptionsFlowHandler' object has no setter

File "/usr/src/homeassistant/homeassistant/config_entries.py", line 3682, in async_create_flow
    return handler.async_get_options_flow(entry)
  File "/config/custom_components/localtuya/config_flow.py", line 339, in async_get_options_flow
    return LocalTuyaOptionsFlowHandler(config_entry)
  File "/config/custom_components/localtuya/config_flow.py", line 396, in __init__
    self.config_entry = config_entry
    ^^^^^^^^^^^^^^^^^
AttributeError: property 'config_entry' of 'LocalTuyaOptionsFlowHandler' object has no setter

(Complete traceback available if needed.)

Expected behaviour

  • After validating the Cloud API dialog, the LocalTuya config flow should continue to the device selection / “Add device” steps, allowing me to add or edit devices.

Additional notes

  • I also see occasional UDP discovery errors in discovery.py (ValueError: The length of the provided data is not a multiple of the block length), but they do not seem related to the options flow crash.[2]
  • Tuya Cloud API itself works (devices visible in Tuya IoT; official Tuya cloud integration works).[3][4]

Could you please adapt LocalTuyaOptionsFlowHandler (or the config/option flow) so that it is compatible with current Home Assistant versions again, or indicate which HA / LocalTuya version combination is officially supported?

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions