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:
Ville Skyttä 2021-05-20 20:19:20 +03:00 committed by GitHub
parent 0e7409e617
commit 19d25cd901
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
101 changed files with 557 additions and 688 deletions

View file

@ -2,7 +2,7 @@
from unittest.mock import patch
from homeassistant.components.totalconnect.const import DOMAIN
from homeassistant.config_entries import ENTRY_STATE_SETUP_ERROR
from homeassistant.config_entries import ConfigEntryState
from homeassistant.setup import async_setup_component
from .common import CONFIG_DATA
@ -26,4 +26,4 @@ async def test_reauth_started(hass):
assert await async_setup_component(hass, DOMAIN, {})
await hass.async_block_till_done()
assert mock_entry.state == ENTRY_STATE_SETUP_ERROR
assert mock_entry.state is ConfigEntryState.SETUP_ERROR