Commit dd0f834
committed
Fix OptionsFlow config_entry setter error in Home Assistant 2024.x+
In Home Assistant 2024.x and later, the OptionsFlow base class provides
config_entry as a read-only property. The previous implementation tried
to set self.config_entry in __init__, which fails with:
AttributeError: property 'config_entry' of 'OpenHASPOptionsFlowHandler'
object has no setter
This caused a 500 Internal Server Error when clicking the gear icon to
configure any openHASP device in the integration settings.
Fix: Remove the custom __init__ method and don't pass config_entry to the
constructor. The base class automatically provides self.config_entry.1 parent d82fa8b commit dd0f834
1 file changed
Lines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
| 223 | + | |
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | 229 | | |
234 | 230 | | |
235 | 231 | | |
| |||
0 commit comments