From 6c8b3c17df43b9fba0b3b18eeeac2d0c1488249f Mon Sep 17 00:00:00 2001 From: Tom Scholten Date: Thu, 28 Nov 2024 22:32:07 +0100 Subject: [PATCH 1/6] Initial quality scale --- .../components/plugwise/quality_scale.yaml | 69 +++++++++++++++++++ script/hassfest/quality_scale.py | 1 - 2 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 homeassistant/components/plugwise/quality_scale.yaml diff --git a/homeassistant/components/plugwise/quality_scale.yaml b/homeassistant/components/plugwise/quality_scale.yaml new file mode 100644 index 00000000000000..27ef359ec4f031 --- /dev/null +++ b/homeassistant/components/plugwise/quality_scale.yaml @@ -0,0 +1,69 @@ +rules: + ## Bronze + config-flow: done + test-before-configure: done + unique-config-entry: done + config-flow-test-coverage: done + runtime-data: done + test-before-setup: done + appropriate-polling: done + entity-unique-id: done + has-entity-name: done + entity-event-setup: done + dependency-transparency: done + action-setup: done + common-modules: done + docs-high-level-description: done + docs-installation-instructions: done + docs-removal-instructions: + status: todo + comment: Add to docs that one can safely remove (no extra steps needed) + docs-actions: done + brands: done + ## Silver + config-entry-unloading: done + log-when-unavailable: done + entity-unavailable: done + action-exceptions: done + reauthentication-flow: + status: exempt + comment: This integration does not have reauthentication (e.g. fixed authentication for Plugwise Smiles) + parallel-updates: + status: done + comment: Using coordinator + test-coverage: done + integration-owner: done + docs-installation-parameters: done + docs-configuration-parameters: done + ## Gold + entity-translations: done + entity-device-class: done + devices: done + entity-category: done + entity-disabled-by-default: done + discovery: done + stale-devices: done + diagnostics: done + exception-translations: done + icon-translations: done + reconfiguration-flow: + status: exempt + comment: This integration does not have any reconfiguration steps + dynamic-devices: done + discovery-update-info: done + repair-issues: + status: exempt + comment: This integration does not have repairs + docs-use-cases: done + docs-supported-devices: done + docs-supported-functions: done + docs-data-update: + status: todo + comment: Add to docu + docs-known-limitations: done + docs-troubleshooting: done + docs-examples: done + ## Platinum + async-dependency: done + inject-websession: done + strict-typing: done diff --git a/script/hassfest/quality_scale.py b/script/hassfest/quality_scale.py index 734c6d57fafbd0..4af580dca84173 100644 --- a/script/hassfest/quality_scale.py +++ b/script/hassfest/quality_scale.py @@ -819,7 +819,6 @@ class Rule: "plaato", "plant", "plex", - "plugwise", "plum_lightpad", "pocketcasts", "point", From 3dbe22a07a2dc231fec9d4e04cac73e9f5037ab0 Mon Sep 17 00:00:00 2001 From: Tom Scholten Date: Fri, 29 Nov 2024 08:38:48 +0100 Subject: [PATCH 2/6] Mark done through docs PR 36055 --- homeassistant/components/plugwise/quality_scale.yaml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/plugwise/quality_scale.yaml b/homeassistant/components/plugwise/quality_scale.yaml index 27ef359ec4f031..c82211af0e07fe 100644 --- a/homeassistant/components/plugwise/quality_scale.yaml +++ b/homeassistant/components/plugwise/quality_scale.yaml @@ -15,9 +15,7 @@ rules: common-modules: done docs-high-level-description: done docs-installation-instructions: done - docs-removal-instructions: - status: todo - comment: Add to docs that one can safely remove (no extra steps needed) + docs-removal-instructions: done docs-actions: done brands: done ## Silver @@ -57,9 +55,7 @@ rules: docs-use-cases: done docs-supported-devices: done docs-supported-functions: done - docs-data-update: - status: todo - comment: Add to docu + docs-data-update: done docs-known-limitations: done docs-troubleshooting: done docs-examples: done From 306620bc24407eab87f243af85fcdfc2a0c6b994 Mon Sep 17 00:00:00 2001 From: Tom Scholten Date: Mon, 2 Dec 2024 11:27:13 +0100 Subject: [PATCH 3/6] Update accordingly --- .../components/plugwise/quality_scale.yaml | 58 +++++++++++++------ 1 file changed, 41 insertions(+), 17 deletions(-) diff --git a/homeassistant/components/plugwise/quality_scale.yaml b/homeassistant/components/plugwise/quality_scale.yaml index c82211af0e07fe..da57d5c897fac8 100644 --- a/homeassistant/components/plugwise/quality_scale.yaml +++ b/homeassistant/components/plugwise/quality_scale.yaml @@ -2,17 +2,31 @@ rules: ## Bronze config-flow: done test-before-configure: done - unique-config-entry: done - config-flow-test-coverage: done - runtime-data: done + unique-config-entry: + status: todo + comment: Add tests preventing second entry for same device + config-flow-test-coverage: + status: todo + comment: Cover test_form and zeroconf + runtime-data: + status: todo + comment: Clean up test_init for testing internals test-before-setup: done - appropriate-polling: done + appropriate-polling: + status: todo + comment: Clean up coordinator (L71) check for mypy happiness entity-unique-id: done - has-entity-name: done + has-entity-name: + status: todo + comment: Clean up climate (already in superclass) entity-event-setup: done dependency-transparency: done - action-setup: done - common-modules: done + action-setup: + status: todo + comment: Check if we have these, otherwise exempt + common-modules: + status: todo + comment: Verify entity for async_added_to_hass usage (discard?) docs-high-level-description: done docs-installation-instructions: done docs-removal-instructions: done @@ -22,19 +36,25 @@ rules: config-entry-unloading: done log-when-unavailable: done entity-unavailable: done - action-exceptions: done + action-exceptions: + status: todo + comment: Climate exception on ValueError should be ServiceValidationError reauthentication-flow: status: exempt - comment: This integration does not have reauthentication (e.g. fixed authentication for Plugwise Smiles) + comment: The hubs have a hardcoded `Smile ID` printed on there sticker, it can not be changed parallel-updates: - status: done - comment: Using coordinator - test-coverage: done + status: todo + comment: Using coordinator, but required due to mutable platform + test-coverage: + status: todo + comment: Consider using snapshots + consistency in setup calls + add numerical tests + use fixtures integration-owner: done docs-installation-parameters: done docs-configuration-parameters: done ## Gold - entity-translations: done + entity-translations: + status: todo + comment: Clean up name where not needed, remove translation key on deviceclasses entity-device-class: done devices: done entity-category: done @@ -42,12 +62,16 @@ rules: discovery: done stale-devices: done diagnostics: done - exception-translations: done + exception-translations: + status: todo + comment: Add coordinator, util and climate exceptions icon-translations: done reconfiguration-flow: - status: exempt - comment: This integration does not have any reconfiguration steps - dynamic-devices: done + status: todo + comment: This integration does not have any reconfiguration steps (yet) investigate how/why + dynamic-devices: + status: todo + comment: Add missing logic to button for unloading and creation discovery-update-info: done repair-issues: status: exempt From 0b55bac85a0c6fdb3d25f5692855a78f27fbec15 Mon Sep 17 00:00:00 2001 From: Tom Date: Mon, 2 Dec 2024 12:41:46 +0100 Subject: [PATCH 4/6] Update homeassistant/components/plugwise/quality_scale.yaml Co-authored-by: Joost Lekkerkerker --- homeassistant/components/plugwise/quality_scale.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/plugwise/quality_scale.yaml b/homeassistant/components/plugwise/quality_scale.yaml index da57d5c897fac8..655aaf3eedc6cd 100644 --- a/homeassistant/components/plugwise/quality_scale.yaml +++ b/homeassistant/components/plugwise/quality_scale.yaml @@ -41,7 +41,7 @@ rules: comment: Climate exception on ValueError should be ServiceValidationError reauthentication-flow: status: exempt - comment: The hubs have a hardcoded `Smile ID` printed on there sticker, it can not be changed + comment: The hubs have a hardcoded `Smile ID` printed on the sticker used as password, it can not be changed parallel-updates: status: todo comment: Using coordinator, but required due to mutable platform From 0bfba7625dc20ea57a7be613430834a1444091f3 Mon Sep 17 00:00:00 2001 From: Tom Scholten Date: Mon, 2 Dec 2024 14:34:54 +0100 Subject: [PATCH 5/6] Set docs for re-check, link existing PRs --- .../components/plugwise/quality_scale.yaml | 40 ++++++++++++++----- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/homeassistant/components/plugwise/quality_scale.yaml b/homeassistant/components/plugwise/quality_scale.yaml index 655aaf3eedc6cd..ceb487b4645ed2 100644 --- a/homeassistant/components/plugwise/quality_scale.yaml +++ b/homeassistant/components/plugwise/quality_scale.yaml @@ -29,7 +29,9 @@ rules: comment: Verify entity for async_added_to_hass usage (discard?) docs-high-level-description: done docs-installation-instructions: done - docs-removal-instructions: done + docs-removal-instructions: + status: todo + comment: Docs PR 36055 docs-actions: done brands: done ## Silver @@ -49,8 +51,12 @@ rules: status: todo comment: Consider using snapshots + consistency in setup calls + add numerical tests + use fixtures integration-owner: done - docs-installation-parameters: done - docs-configuration-parameters: done + docs-installation-parameters: + status: todo + comment: Docs PR 36087 (partial) + todo rewrite generically + docs-configuration-parameters: + status: exempt + comment: Plugwise has no options flow ## Gold entity-translations: status: todo @@ -76,13 +82,27 @@ rules: repair-issues: status: exempt comment: This integration does not have repairs - docs-use-cases: done - docs-supported-devices: done - docs-supported-functions: done - docs-data-update: done - docs-known-limitations: done - docs-troubleshooting: done - docs-examples: done + docs-use-cases: + status: todo + comment: Check for completeness + docs-supported-devices: + status: todo + comment: The list is there but could be improved for readability + docs-supported-functions: + status: todo + comment: Check for completeness + docs-data-update: + status: todo + comment: Docs PR 36055 + docs-known-limitations: + status: todo + comment: Partial in 36087 but could be more elaborat + docs-troubleshooting: + status: todo + comment: Check for completeness + docs-examples: + status: todo + comment: Check for completeness ## Platinum async-dependency: done inject-websession: done From 64c3ffa28580ab0e3f666f74c2a8b3306bd6ae02 Mon Sep 17 00:00:00 2001 From: Tom Scholten Date: Mon, 2 Dec 2024 15:03:07 +0100 Subject: [PATCH 6/6] Update status and correct hld+install --- homeassistant/components/plugwise/quality_scale.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/plugwise/quality_scale.yaml b/homeassistant/components/plugwise/quality_scale.yaml index ceb487b4645ed2..b61071a285dfe0 100644 --- a/homeassistant/components/plugwise/quality_scale.yaml +++ b/homeassistant/components/plugwise/quality_scale.yaml @@ -27,11 +27,15 @@ rules: common-modules: status: todo comment: Verify entity for async_added_to_hass usage (discard?) - docs-high-level-description: done - docs-installation-instructions: done + docs-high-level-description: + status: todo + comment: Rewrite top section + docs-installation-instructions: + status: todo + comment: Docs PR 36087 docs-removal-instructions: status: todo - comment: Docs PR 36055 + comment: Docs PR 36055 (done, but mark todo for benchmark) docs-actions: done brands: done ## Silver @@ -93,7 +97,7 @@ rules: comment: Check for completeness docs-data-update: status: todo - comment: Docs PR 36055 + comment: Docs PR 36055 (done, but mark todo for benchmark) docs-known-limitations: status: todo comment: Partial in 36087 but could be more elaborat