From 46824a2a5311c7252177db2fb4eb4e1e801da8ab Mon Sep 17 00:00:00 2001 From: G Johansson Date: Fri, 3 Jan 2025 10:23:25 +0100 Subject: [PATCH] Add quality scale to Sensibo (#134296) --- homeassistant/components/sensibo/__init__.py | 6 +- .../components/sensibo/quality_scale.yaml | 91 +++++++++++++++++++ script/hassfest/quality_scale.py | 1 - 3 files changed, 94 insertions(+), 4 deletions(-) create mode 100644 homeassistant/components/sensibo/quality_scale.yaml diff --git a/homeassistant/components/sensibo/__init__.py b/homeassistant/components/sensibo/__init__.py index 15ef3def1f5..06b5ea6588a 100644 --- a/homeassistant/components/sensibo/__init__.py +++ b/homeassistant/components/sensibo/__init__.py @@ -30,12 +30,12 @@ async def async_setup_entry(hass: HomeAssistant, entry: SensiboConfigEntry) -> b return True -async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: +async def async_unload_entry(hass: HomeAssistant, entry: SensiboConfigEntry) -> bool: """Unload Sensibo config entry.""" return await hass.config_entries.async_unload_platforms(entry, PLATFORMS) -async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: +async def async_migrate_entry(hass: HomeAssistant, entry: SensiboConfigEntry) -> bool: """Migrate old entry.""" # Change entry unique id from api_key to username if entry.version == 1: @@ -57,7 +57,7 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: async def async_remove_config_entry_device( - hass: HomeAssistant, entry: ConfigEntry, device: DeviceEntry + hass: HomeAssistant, entry: SensiboConfigEntry, device: DeviceEntry ) -> bool: """Remove Sensibo config entry from a device.""" entity_registry = er.async_get(hass) diff --git a/homeassistant/components/sensibo/quality_scale.yaml b/homeassistant/components/sensibo/quality_scale.yaml new file mode 100644 index 00000000000..b1e9f7763de --- /dev/null +++ b/homeassistant/components/sensibo/quality_scale.yaml @@ -0,0 +1,91 @@ +rules: + # Bronze + config-flow: + status: todo + comment: | + Data descriptions. Expand errors strings (no_devices,no_username etc.) + test-before-configure: done + unique-config-entry: done + config-flow-test-coverage: + status: todo + comment: | + Refresh docstrings, example test_form, add test unique id, end in entry or abort + runtime-data: done + test-before-setup: done + appropriate-polling: done + entity-unique-id: done + has-entity-name: done + entity-event-setup: + status: exempt + comment: | + Entities doesn't subscribe to events. + dependency-transparency: done + action-setup: + status: exempt + comment: | + No integrations services. + common-modules: done + docs-high-level-description: todo + docs-installation-instructions: done + docs-removal-instructions: todo + docs-actions: done + brands: done + # Silver + config-entry-unloading: done + log-when-unavailable: done + entity-unavailable: + status: done + comment: | + Move to base entity for common handling + action-exceptions: done + reauthentication-flow: done + parallel-updates: done + test-coverage: + status: done + comment: | + Tests are very complex and needs a rewrite for future additions + integration-owner: done + docs-installation-parameters: + status: todo + comment: configuration_basic + docs-configuration-parameters: + status: exempt + comment: | + This integration has no options flow. + + # Gold + entity-translations: done + entity-device-class: done + devices: done + entity-category: done + entity-disabled-by-default: done + discovery: done + stale-devices: todo + diagnostics: + status: done + comment: | + Change to only use redact once + exception-translations: done + icon-translations: done + reconfiguration-flow: done + dynamic-devices: todo + discovery-update-info: + status: exempt + comment: | + No local network connection, cloud based. + repair-issues: + status: exempt + comment: | + This integration doesn't have any cases where raising an issue is needed. + docs-use-cases: todo + docs-supported-devices: todo + docs-supported-functions: todo + docs-data-update: todo + docs-known-limitations: todo + docs-troubleshooting: todo + docs-examples: todo + + # 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 c50ecc95ee0..7e95d6afcdd 100644 --- a/script/hassfest/quality_scale.py +++ b/script/hassfest/quality_scale.py @@ -893,7 +893,6 @@ INTEGRATIONS_WITHOUT_QUALITY_SCALE_FILE = [ "season", "sendgrid", "sense", - "sensibo", "sensirion_ble", "sensorpro", "sensorpush",