From 754e39130d906980ab55b9995706adaa7926a90a Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 11 Jun 2022 09:51:24 -1000 Subject: [PATCH] Link handling setup failures to integration quality scale and add expired credentials (#1361) --- docs/integration_quality_scale_index.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/integration_quality_scale_index.md b/docs/integration_quality_scale_index.md index 5ef38e48..3474c056 100644 --- a/docs/integration_quality_scale_index.md +++ b/docs/integration_quality_scale_index.md @@ -22,7 +22,7 @@ This integration is able to cope when things go wrong. It will not print any exc - Satisfying all No score level requirements. - Connection/configuration is handled via a component. - Set an appropriate `SCAN_INTERVAL` (if a polling integration) -- Raise `PlatformNotReady` if unable to connect during platform setup (if appropriate) +- Raise [`PlatformNotReady`](integration_setup_failures/#integrations-using-async_setup_platform) if unable to connect during platform setup (if appropriate) - Handles expiration of auth credentials. Refresh if possible or print correct error and fail setup. If based on a config entry, should trigger a new config entry flow to re-authorize. ([docs](config_entries_config_flow_handler.md#reauthentication)) - Handles internet unavailable. Log a warning once when unavailable, log once when reconnected. - Handles device/service unavailable. Log a warning once when unavailable, log once when reconnected. @@ -39,7 +39,7 @@ This is a solid integration that is able to survive poor conditions and can be c - Don't allow configuring already configured device/service (example: no 2 entries for same hub) - Discoverable (if available) - Set unique ID in config flow (if available) - - Raise `ConfigEntryNotReady` if unable to connect during entry setup (if appropriate) + - Raise [`ConfigEntryNotReady`](integration_setup_failures/#integrations-using-async_setup_entry) if unable to connect during entry setup (if appropriate) - Entities have device info (if available) ([docs](device_registry_index.md#defining-devices)) - Tests - Full test coverage for the config flow @@ -60,6 +60,7 @@ Best of the best. The integration is completely async, meaning it's super fast. - Support config entry unloading (called when config entry is removed) - Integration + dependency are async ([docs](asyncio_working_with_async.md)) - Uses aiohttp or httpx and allows passing in websession (if making HTTP requests) +- [Handles expired credentials](integration_setup_failures/#handling-expired-credentials) (if appropriate) ## Internal 🏠