Add FlowResultType enum to data entry flow (#72955)

This commit is contained in:
epenet 2022-06-08 07:02:44 +02:00 committed by GitHub
parent 329595bf73
commit f91aa33c5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 79 additions and 53 deletions

View file

@ -11,7 +11,7 @@ import time
from homeassistant.const import CONF_DEVICE, CONF_PLATFORM
from homeassistant.core import HomeAssistant
from homeassistant.data_entry_flow import RESULT_TYPE_ABORT
from homeassistant.data_entry_flow import FlowResultType
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.dispatcher import (
async_dispatcher_connect,
@ -305,7 +305,7 @@ async def async_start( # noqa: C901
)
if (
result
and result["type"] == RESULT_TYPE_ABORT
and result["type"] == FlowResultType.ABORT
and result["reason"]
in ("already_configured", "single_instance_allowed")
):