mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 10:17:09 +00:00
Ensure PVOutput connection error is logged (#65319)
This commit is contained in:
parent
87b20c6abe
commit
74632d26fa
@ -12,7 +12,7 @@ from homeassistant.core import HomeAssistant
|
|||||||
from homeassistant.data_entry_flow import FlowResult
|
from homeassistant.data_entry_flow import FlowResult
|
||||||
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||||
|
|
||||||
from .const import CONF_SYSTEM_ID, DOMAIN
|
from .const import CONF_SYSTEM_ID, DOMAIN, LOGGER
|
||||||
|
|
||||||
|
|
||||||
async def validate_input(hass: HomeAssistant, *, api_key: str, system_id: int) -> None:
|
async def validate_input(hass: HomeAssistant, *, api_key: str, system_id: int) -> None:
|
||||||
@ -50,6 +50,7 @@ class PVOutputFlowHandler(ConfigFlow, domain=DOMAIN):
|
|||||||
except PVOutputAuthenticationError:
|
except PVOutputAuthenticationError:
|
||||||
errors["base"] = "invalid_auth"
|
errors["base"] = "invalid_auth"
|
||||||
except PVOutputError:
|
except PVOutputError:
|
||||||
|
LOGGER.exception("Cannot connect to PVOutput")
|
||||||
errors["base"] = "cannot_connect"
|
errors["base"] = "cannot_connect"
|
||||||
else:
|
else:
|
||||||
await self.async_set_unique_id(str(user_input[CONF_SYSTEM_ID]))
|
await self.async_set_unique_id(str(user_input[CONF_SYSTEM_ID]))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user