On success, reconfiguration flows are expected to update the current entry and abort; they should not create a new entry. This is usually done with the return self.async_update_reload_and_abort helper. Automated tests should verify that the reconfigure flow updates the existing config entry and does not create additional entries.
I use the user configuration ‘feedback module’ yes/no to alter the behaviour of the event listener. user could say no, and I do not process the feedback module data, user say yes and I process the feedback module data
So I debugged by adding the self._has_feedback_module to the log, one time it’s true, one time it’s false. Should always be false in that case. deep diving…
Problem solved, I’ve made a stronger async_unload_entry in my init.py to make sure to stop any running instance of listener, command queue and connection…
The value of _has_feedback_module is read from the configuration entry at initialization, so its value is fixed in that instance once created. In your logs, one message shows it as False while another shows True. This discrepancy usually indicates that different instances of the listener are processing events—each one initialized with its own config entry value. For example:
If a reconfiguration updates the config entry (using your updated reconfiguration flow), a new instance of the event listener may be created with CONF_HAS_FEEDBACK_MODULE set to True while an older instance (still handling some events) was created with it set to False.
Alternatively, if the configuration was changed at different times (or even on restart), the listener’s initialization will reflect the value stored in the config entry at that moment.
Because the attribute is set only once during initialization (see ), any change in the config entry isn’t automatically applied to a running listener until it’s reloaded. This is why you see one log entry dropping a command (when the flag was False) and later another log entry handling a command (when a new instance with True was running).
To have a consistent behavior during runtime, you’d need to ensure that only one instance is active or add a mechanism to update the flag dynamically when the configuration changes.