Fix: MQTT reconfiguration reverts to old settings on save#370
Conversation
Fix: CI failure due to
|
|
I am seeing persistent CI failures related to a dependency update, and I could use some guidance on how to resolve this in this repo's environment. The tests are failing with I attempted to fix this by adding Plaintext Since the runner isn't picking up the constraint despite it being present in my branch, I am struggling to get the tests to pass. Could you advise if there is a specific workflow for updating dependencies here, or if this pin needs to be applied upstream? |
|
You can take the dependency change out of your PR. Thanks for identifying the cause. I copied it to PR #371 but run into the same problem. |
Problem
When reconfiguring the integration via the "MQTT Broker" option, changes to the connection details (e.g., updating the Broker IP or port) were not being saved. After submitting the new details, the configuration would revert to the previous values.
Cause
The
async_step_configure_serial_portmethod was callingself.get_options()at the start of the step. This causedself.optionsto be reloaded from the stored config entry, overwriting the new values that had just been set in the precedingasync_step_mqtt_configstep.Fix
Removed the redundant
self.get_options()call incustom_components/ramses_cc/config_flow.py. Theself.optionsdictionary is already correctly populated by the previous step, so reloading it is unnecessary and destructive in this context.Verification