From 870dc4dbeabe55a86d8d73d8e9184f55cdf3bfac Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Fri, 20 Dec 2024 13:14:41 +0100 Subject: [PATCH] Record Analytics Insights quality scale (#133571) * Record Analytics Insights quality scale * Record Analytics Insights quality scale * Record Analytics Insights quality scale * Update homeassistant/components/analytics_insights/quality_scale.yaml Co-authored-by: Josef Zweck * Update homeassistant/components/analytics_insights/quality_scale.yaml Co-authored-by: Josef Zweck --------- Co-authored-by: Josef Zweck --- .../analytics_insights/config_flow.py | 10 +- .../analytics_insights/quality_scale.yaml | 100 ++++++++++++++++++ script/hassfest/quality_scale.py | 1 - 3 files changed, 103 insertions(+), 8 deletions(-) create mode 100644 homeassistant/components/analytics_insights/quality_scale.yaml diff --git a/homeassistant/components/analytics_insights/config_flow.py b/homeassistant/components/analytics_insights/config_flow.py index c36755f5403ca..da77a35f789d3 100644 --- a/homeassistant/components/analytics_insights/config_flow.py +++ b/homeassistant/components/analytics_insights/config_flow.py @@ -11,12 +11,7 @@ from python_homeassistant_analytics.models import IntegrationType import voluptuous as vol -from homeassistant.config_entries import ( - ConfigEntry, - ConfigFlow, - ConfigFlowResult, - OptionsFlow, -) +from homeassistant.config_entries import ConfigFlow, ConfigFlowResult, OptionsFlow from homeassistant.core import callback from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.selector import ( @@ -25,6 +20,7 @@ SelectSelectorConfig, ) +from . import AnalyticsInsightsConfigEntry from .const import ( CONF_TRACKED_ADDONS, CONF_TRACKED_CUSTOM_INTEGRATIONS, @@ -46,7 +42,7 @@ class HomeassistantAnalyticsConfigFlow(ConfigFlow, domain=DOMAIN): @staticmethod @callback def async_get_options_flow( - config_entry: ConfigEntry, + config_entry: AnalyticsInsightsConfigEntry, ) -> HomeassistantAnalyticsOptionsFlowHandler: """Get the options flow for this handler.""" return HomeassistantAnalyticsOptionsFlowHandler() diff --git a/homeassistant/components/analytics_insights/quality_scale.yaml b/homeassistant/components/analytics_insights/quality_scale.yaml new file mode 100644 index 0000000000000..ff999d97d0302 --- /dev/null +++ b/homeassistant/components/analytics_insights/quality_scale.yaml @@ -0,0 +1,100 @@ +rules: + # Bronze + action-setup: + status: exempt + comment: | + This integration does not provide additional actions. + appropriate-polling: done + brands: done + common-modules: done + config-flow-test-coverage: done + config-flow: done + dependency-transparency: done + docs-actions: + status: exempt + comment: | + This integration does not provide additional actions. + docs-high-level-description: todo + docs-installation-instructions: todo + docs-removal-instructions: todo + entity-event-setup: + status: exempt + comment: | + Entities of this integration does not explicitly subscribe to events. + entity-unique-id: done + has-entity-name: done + runtime-data: done + test-before-configure: done + test-before-setup: done + unique-config-entry: done + + # Silver + action-exceptions: + status: exempt + comment: | + This integration does not provide actions. + config-entry-unloading: done + docs-configuration-parameters: todo + docs-installation-parameters: todo + entity-unavailable: + status: done + comment: | + The coordinator handles this. + integration-owner: done + log-when-unavailable: + status: done + comment: | + The coordinator handles this. + parallel-updates: todo + reauthentication-flow: + status: exempt + comment: | + This integration does not require authentication. + test-coverage: todo + # Gold + devices: done + diagnostics: todo + discovery-update-info: + status: exempt + comment: | + This integration is a cloud service and thus does not support discovery. + discovery: + status: exempt + comment: | + This integration is a cloud service and thus does not support discovery. + docs-data-update: todo + docs-examples: todo + docs-known-limitations: todo + docs-supported-devices: todo + docs-supported-functions: todo + docs-troubleshooting: todo + docs-use-cases: todo + dynamic-devices: + status: exempt + comment: | + This integration has a fixed single service. + entity-category: done + entity-device-class: + status: exempt + comment: | + This integration does not have entities with device classes. + entity-disabled-by-default: done + entity-translations: done + exception-translations: todo + icon-translations: done + reconfiguration-flow: + status: exempt + comment: All the options of this integration are managed via the options flow + repair-issues: + status: exempt + comment: | + This integration doesn't have any cases where raising an issue is needed. + stale-devices: + status: exempt + comment: | + This integration has a fixed single service. + + # 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 e2eedea9a2cb9..3d880d7b53685 100644 --- a/script/hassfest/quality_scale.py +++ b/script/hassfest/quality_scale.py @@ -151,7 +151,6 @@ class Rule: "amcrest", "ampio", "analytics", - "analytics_insights", "android_ip_webcam", "androidtv", "androidtv_remote",