From 67f9387b1998061f6de0ab8ca6454617d49794d4 Mon Sep 17 00:00:00 2001 From: huyuwei1996 Date: Mon, 20 Jan 2025 21:03:08 +0800 Subject: [PATCH 1/6] Record IQS for Switchbot --- .../components/switchbot/quality_scale.yaml | 66 +++++++++++++++++++ script/hassfest/quality_scale.py | 1 - 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 homeassistant/components/switchbot/quality_scale.yaml diff --git a/homeassistant/components/switchbot/quality_scale.yaml b/homeassistant/components/switchbot/quality_scale.yaml new file mode 100644 index 0000000000000..18b04d088ea1e --- /dev/null +++ b/homeassistant/components/switchbot/quality_scale.yaml @@ -0,0 +1,66 @@ +rules: + # Bronze + action-setup: done + appropriate-polling: done + brands: todo + common-modules: done + config-flow-test-coverage: todo + config-flow: done + dependency-transparency: done + docs-actions: + status: exempt + comment: | + No custom actions + docs-high-level-description: done + docs-installation-instructions: done + docs-removal-instructions: todo + entity-event-setup: done + entity-unique-id: done + has-entity-name: todo + runtime-data: done + test-before-configure: done + test-before-setup: done + unique-config-entry: done + + # Silver + action-exceptions: done + config-entry-unloading: done + docs-configuration-parameters: todo + docs-installation-parameters: todo + entity-unavailable: done + integration-owner: done + log-when-unavailable: todo + parallel-updates: done + reauthentication-flow: todo + test-coverage: todo + + # Gold + devices: done + diagnostics: todo + discovery-update-info: + status: exempt + comment: | + Not possible to discover these devices. + discovery: done + docs-data-update: todo + docs-examples: todo + docs-known-limitations: todo + docs-supported-devices: done + docs-supported-functions: todo + docs-troubleshooting: done + docs-use-cases: todo + dynamic-devices: todo + entity-category: done + entity-device-class: done + entity-disabled-by-default: done + entity-translations: done + exception-translations: todo + icon-translations: todo + reconfiguration-flow: todo + repair-issues: todo + stale-devices: todo + + # Platinum + async-dependency: done + inject-websession: done + strict-typing: todo diff --git a/script/hassfest/quality_scale.py b/script/hassfest/quality_scale.py index 7ca7110c49bb7..4e028201d27b1 100644 --- a/script/hassfest/quality_scale.py +++ b/script/hassfest/quality_scale.py @@ -979,7 +979,6 @@ class Rule: "swisscom", "switch_as_x", "switchbee", - "switchbot", "switchbot_cloud", "switcher_kis", "switchmate", From 4b85a9700cdf856af542be098e14ac1bf2386a72 Mon Sep 17 00:00:00 2001 From: huyuwei1996 Date: Tue, 21 Jan 2025 15:21:00 +0800 Subject: [PATCH 2/6] Update quality scale for Switchbot integration with status and comments --- .../components/switchbot/quality_scale.yaml | 54 ++++++++++++++----- 1 file changed, 42 insertions(+), 12 deletions(-) diff --git a/homeassistant/components/switchbot/quality_scale.yaml b/homeassistant/components/switchbot/quality_scale.yaml index 18b04d088ea1e..7ef1a38eab1e9 100644 --- a/homeassistant/components/switchbot/quality_scale.yaml +++ b/homeassistant/components/switchbot/quality_scale.yaml @@ -1,8 +1,11 @@ rules: # Bronze - action-setup: done + action-setup: + status: exempt + comment: | + No custom actions appropriate-polling: done - brands: todo + brands: done common-modules: done config-flow-test-coverage: todo config-flow: done @@ -16,7 +19,7 @@ rules: docs-removal-instructions: todo entity-event-setup: done entity-unique-id: done - has-entity-name: todo + has-entity-name: done runtime-data: done test-before-configure: done test-before-setup: done @@ -30,7 +33,10 @@ rules: entity-unavailable: done integration-owner: done log-when-unavailable: todo - parallel-updates: done + parallel-updates: + status: todo + comment: | + set `PARALLEL_UPDATES` in lock.py reauthentication-flow: todo test-coverage: todo @@ -41,7 +47,10 @@ rules: status: exempt comment: | Not possible to discover these devices. - discovery: done + discovery: + status: done + comment: | + TODO: Device type scan filtering is applied to only show devices that are actually supported. docs-data-update: todo docs-examples: todo docs-known-limitations: todo @@ -49,16 +58,37 @@ rules: docs-supported-functions: todo docs-troubleshooting: done docs-use-cases: todo - dynamic-devices: todo + dynamic-devices: + status: exempt + comment: | + Only one device per config entry. New devices are set up as new entries. entity-category: done entity-device-class: done entity-disabled-by-default: done - entity-translations: done - exception-translations: todo - icon-translations: todo - reconfiguration-flow: todo - repair-issues: todo - stale-devices: todo + entity-translations: + status: todo + comment: | + Needs to provide translations for hub2 temperature entity + exception-translations: + status: exempt + comment: | + No custom exceptions. + icon-translations: + status: exempt + comment: | + No custom icons. + reconfiguration-flow: + status: exempt + comment: | + No need for reconfiguration flow. + repair-issues: + status: exempt + comment: | + No repairs/issues. + stale-devices: + status: exempt + comment: | + Device type integration. # Platinum async-dependency: done From 557ebc21dbddc31e83655e5131a33f73c87510ef Mon Sep 17 00:00:00 2001 From: huyuwei1996 Date: Tue, 21 Jan 2025 16:16:16 +0800 Subject: [PATCH 3/6] Update discovery-update-info comment --- homeassistant/components/switchbot/quality_scale.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/switchbot/quality_scale.yaml b/homeassistant/components/switchbot/quality_scale.yaml index 7ef1a38eab1e9..9ec5eb5a6f8fe 100644 --- a/homeassistant/components/switchbot/quality_scale.yaml +++ b/homeassistant/components/switchbot/quality_scale.yaml @@ -46,7 +46,7 @@ rules: discovery-update-info: status: exempt comment: | - Not possible to discover these devices. + No network discovery. discovery: status: done comment: | From 8013c1e3cc79cc183a773a110e0a53a3b59a2c21 Mon Sep 17 00:00:00 2001 From: Huyuwei Date: Tue, 21 Jan 2025 16:17:31 +0000 Subject: [PATCH 4/6] update comment --- .../components/switchbot/quality_scale.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/switchbot/quality_scale.yaml b/homeassistant/components/switchbot/quality_scale.yaml index 9ec5eb5a6f8fe..328c059ea158b 100644 --- a/homeassistant/components/switchbot/quality_scale.yaml +++ b/homeassistant/components/switchbot/quality_scale.yaml @@ -37,8 +37,15 @@ rules: status: todo comment: | set `PARALLEL_UPDATES` in lock.py - reauthentication-flow: todo - test-coverage: todo + reauthentication-flow: + status: todo + comment: | + Consider using snapshots for fixating all the entities a device creates. + E.g., reconfiguring device encryption key or password + test-coverage: + status: todo + comment: | + To be completed. # Gold devices: done @@ -50,7 +57,7 @@ rules: discovery: status: done comment: | - TODO: Device type scan filtering is applied to only show devices that are actually supported. + Can be improved: Device type scan filtering is applied to only show devices that are actually supported. docs-data-update: todo docs-examples: todo docs-known-limitations: todo From 2cd406255229ad847245c5914a51acdef93c1174 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Wed, 22 Jan 2025 14:22:23 +0100 Subject: [PATCH 5/6] Update homeassistant/components/switchbot/quality_scale.yaml --- homeassistant/components/switchbot/quality_scale.yaml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/switchbot/quality_scale.yaml b/homeassistant/components/switchbot/quality_scale.yaml index 328c059ea158b..f94066b5b27b2 100644 --- a/homeassistant/components/switchbot/quality_scale.yaml +++ b/homeassistant/components/switchbot/quality_scale.yaml @@ -37,15 +37,11 @@ rules: status: todo comment: | set `PARALLEL_UPDATES` in lock.py - reauthentication-flow: - status: todo - comment: | - Consider using snapshots for fixating all the entities a device creates. - E.g., reconfiguring device encryption key or password + reauthentication-flow: todo test-coverage: status: todo comment: | - To be completed. + Consider using snapshots for fixating all the entities a device creates. # Gold devices: done From 32eeb421272db746ea2f5b5d57746e313bb6dd90 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Wed, 22 Jan 2025 14:22:30 +0100 Subject: [PATCH 6/6] Update homeassistant/components/switchbot/quality_scale.yaml --- homeassistant/components/switchbot/quality_scale.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/homeassistant/components/switchbot/quality_scale.yaml b/homeassistant/components/switchbot/quality_scale.yaml index f94066b5b27b2..3b8976aeb8e2a 100644 --- a/homeassistant/components/switchbot/quality_scale.yaml +++ b/homeassistant/components/switchbot/quality_scale.yaml @@ -72,10 +72,7 @@ rules: status: todo comment: | Needs to provide translations for hub2 temperature entity - exception-translations: - status: exempt - comment: | - No custom exceptions. + exception-translations: todo icon-translations: status: exempt comment: |