Change config entry state to an enum (#49654)
* Change config entry state to an enum * Allow but deprecate EntryState str equality comparison * Test fixes * Rename to ConfigEntryState * Remove str comparability backcompat * Update new occurrences of strs cropped up during review
This commit is contained in:
parent
0e7409e617
commit
19d25cd901
101 changed files with 557 additions and 688 deletions
|
@ -245,7 +245,7 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
|
|||
async def async_step_init(self, user_input=None):
|
||||
"""Handle options flow."""
|
||||
|
||||
if self.config_entry.state != config_entries.ENTRY_STATE_LOADED:
|
||||
if self.config_entry.state is not config_entries.ConfigEntryState.LOADED:
|
||||
_LOGGER.error("Tuya integration not yet loaded")
|
||||
return self.async_abort(reason=RESULT_CONN_ERROR)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue