From a72af316bb289411384cf8448f534b94a1bc2cab Mon Sep 17 00:00:00 2001 From: Cyrill Raccaud Date: Tue, 26 Nov 2024 14:52:59 +0000 Subject: [PATCH 1/5] add quality scale --- .../swiss_public_transport/quality_scale.yaml | 84 +++++++++++++++++++ script/hassfest/quality_scale.py | 1 - 2 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 homeassistant/components/swiss_public_transport/quality_scale.yaml diff --git a/homeassistant/components/swiss_public_transport/quality_scale.yaml b/homeassistant/components/swiss_public_transport/quality_scale.yaml new file mode 100644 index 00000000000000..8b4c2d8f673ac3 --- /dev/null +++ b/homeassistant/components/swiss_public_transport/quality_scale.yaml @@ -0,0 +1,84 @@ +rules: + # Bronze + action-setup: done + appropriate-polling: + status: done + comment: > + Polling interval is set to support one connection. + There is a rate limit at 10000 calls per day. + brands: done + common-modules: done + config-flow-test-coverage: done + config-flow: done + dependency-transparency: done + docs-actions: done + docs-high-level-description: done + docs-installation-instructions: done + docs-removal-instructions: done + entity-event-setup: + status: exempt + comment: No events implemented + entity-unique-id: done + has-entity-name: done + runtime-data: done + test-before-configure: done + test-before-setup: done + unique-config-entry: done + + # Silver + config-entry-unloading: done + log-when-unavailable: + status: done + comment: Offloaded to coordinator + entity-unavailable: + status: done + comment: Offloaded to coordinator + action-exceptions: done + reauthentication-flow: + status: exempt + comment: No authentication needed + parallel-updates: done + 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: + status: done + comment: No disabled entities implemented + discovery: + status: exempt + comment: Nothing to discover + stale-devices: + status: exempt + comment: Stale not possible + diagnostics: todo + exception-translations: done + icon-translations: done + reconfiguration-flow: done + dynamic-devices: + status: exempt + comment: No dynamic devices + discovery-update-info: + status: exempt + comment: Nothing to discover + repair-issues: + status: exempt + comment: Nothing to repair + docs-use-cases: todo + docs-supported-devices: done + docs-supported-functions: done + docs-data-update: done + docs-known-limitations: done + docs-troubleshooting: done + 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 bbb2d3e4d0a17f..43afbf9eb56317 100644 --- a/script/hassfest/quality_scale.py +++ b/script/hassfest/quality_scale.py @@ -979,7 +979,6 @@ "supla", "surepetcare", "swiss_hydrological_data", - "swiss_public_transport", "swisscom", "switch_as_x", "switchbee", From 13fd67141271cadf953a69e0e3e2bcbd58aabebd Mon Sep 17 00:00:00 2001 From: Cyrill Raccaud Date: Tue, 26 Nov 2024 15:51:24 +0000 Subject: [PATCH 2/5] update --- .../components/swiss_public_transport/quality_scale.yaml | 6 ++++-- homeassistant/components/swiss_public_transport/sensor.py | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/swiss_public_transport/quality_scale.yaml b/homeassistant/components/swiss_public_transport/quality_scale.yaml index 8b4c2d8f673ac3..2dae7f40a640d8 100644 --- a/homeassistant/components/swiss_public_transport/quality_scale.yaml +++ b/homeassistant/components/swiss_public_transport/quality_scale.yaml @@ -41,7 +41,9 @@ rules: test-coverage: done integration-owner: done docs-installation-parameters: done - docs-configuration-parameters: done + docs-configuration-parameters: + status: exempt + comment: no options flow # Gold entity-translations: done @@ -75,7 +77,7 @@ rules: docs-supported-functions: done docs-data-update: done docs-known-limitations: done - docs-troubleshooting: done + docs-troubleshooting: todo docs-examples: todo # Platinum diff --git a/homeassistant/components/swiss_public_transport/sensor.py b/homeassistant/components/swiss_public_transport/sensor.py index 452ec31972f873..01ab8cb25a7cee 100644 --- a/homeassistant/components/swiss_public_transport/sensor.py +++ b/homeassistant/components/swiss_public_transport/sensor.py @@ -29,6 +29,8 @@ _LOGGER = logging.getLogger(__name__) +PARALLEL_UPDATES = 0 + SCAN_INTERVAL = timedelta(seconds=90) From 3c614eb04096c7d7e2633796f3b4be37346e33a8 Mon Sep 17 00:00:00 2001 From: Cyrill Raccaud Date: Wed, 27 Nov 2024 07:27:53 +0000 Subject: [PATCH 3/5] align current state --- .../swiss_public_transport/quality_scale.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/swiss_public_transport/quality_scale.yaml b/homeassistant/components/swiss_public_transport/quality_scale.yaml index 2dae7f40a640d8..4cd1f6be1c96cd 100644 --- a/homeassistant/components/swiss_public_transport/quality_scale.yaml +++ b/homeassistant/components/swiss_public_transport/quality_scale.yaml @@ -9,12 +9,12 @@ rules: brands: done common-modules: done config-flow-test-coverage: done - config-flow: done - dependency-transparency: done + config-flow: todo + dependency-transparency: todo docs-actions: done docs-high-level-description: done docs-installation-instructions: done - docs-removal-instructions: done + docs-removal-instructions: todo entity-event-setup: status: exempt comment: No events implemented @@ -38,9 +38,9 @@ rules: status: exempt comment: No authentication needed parallel-updates: done - test-coverage: done + test-coverage: todo integration-owner: done - docs-installation-parameters: done + docs-installation-parameters: todo docs-configuration-parameters: status: exempt comment: no options flow @@ -76,7 +76,7 @@ rules: docs-supported-devices: done docs-supported-functions: done docs-data-update: done - docs-known-limitations: done + docs-known-limitations: todo docs-troubleshooting: todo docs-examples: todo From a4b4588613006ccab21aabbef8faf7f42a47a7fc Mon Sep 17 00:00:00 2001 From: Cyrill Raccaud Date: Wed, 27 Nov 2024 11:28:08 +0000 Subject: [PATCH 4/5] revert sneaky update --- .../components/swiss_public_transport/quality_scale.yaml | 2 +- homeassistant/components/swiss_public_transport/sensor.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/homeassistant/components/swiss_public_transport/quality_scale.yaml b/homeassistant/components/swiss_public_transport/quality_scale.yaml index 4cd1f6be1c96cd..51ca2344db49f5 100644 --- a/homeassistant/components/swiss_public_transport/quality_scale.yaml +++ b/homeassistant/components/swiss_public_transport/quality_scale.yaml @@ -37,7 +37,7 @@ rules: reauthentication-flow: status: exempt comment: No authentication needed - parallel-updates: done + parallel-updates: todo test-coverage: todo integration-owner: done docs-installation-parameters: todo diff --git a/homeassistant/components/swiss_public_transport/sensor.py b/homeassistant/components/swiss_public_transport/sensor.py index 01ab8cb25a7cee..452ec31972f873 100644 --- a/homeassistant/components/swiss_public_transport/sensor.py +++ b/homeassistant/components/swiss_public_transport/sensor.py @@ -29,8 +29,6 @@ _LOGGER = logging.getLogger(__name__) -PARALLEL_UPDATES = 0 - SCAN_INTERVAL = timedelta(seconds=90) From 58e748df0e27351a863399a3c4ebea1f00975e11 Mon Sep 17 00:00:00 2001 From: Cyrill Raccaud Date: Wed, 27 Nov 2024 11:48:11 +0000 Subject: [PATCH 5/5] fix bronze (ha intern) --- .../components/swiss_public_transport/quality_scale.yaml | 8 ++++---- homeassistant/components/swiss_public_transport/sensor.py | 2 ++ .../components/swiss_public_transport/strings.json | 5 +++++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/swiss_public_transport/quality_scale.yaml b/homeassistant/components/swiss_public_transport/quality_scale.yaml index 51ca2344db49f5..b2b4f9084b77e3 100644 --- a/homeassistant/components/swiss_public_transport/quality_scale.yaml +++ b/homeassistant/components/swiss_public_transport/quality_scale.yaml @@ -9,12 +9,12 @@ rules: brands: done common-modules: done config-flow-test-coverage: done - config-flow: todo + config-flow: done dependency-transparency: todo docs-actions: done docs-high-level-description: done docs-installation-instructions: done - docs-removal-instructions: todo + docs-removal-instructions: done entity-event-setup: status: exempt comment: No events implemented @@ -37,10 +37,10 @@ rules: reauthentication-flow: status: exempt comment: No authentication needed - parallel-updates: todo + parallel-updates: done test-coverage: todo integration-owner: done - docs-installation-parameters: todo + docs-installation-parameters: done docs-configuration-parameters: status: exempt comment: no options flow diff --git a/homeassistant/components/swiss_public_transport/sensor.py b/homeassistant/components/swiss_public_transport/sensor.py index 452ec31972f873..01ab8cb25a7cee 100644 --- a/homeassistant/components/swiss_public_transport/sensor.py +++ b/homeassistant/components/swiss_public_transport/sensor.py @@ -29,6 +29,8 @@ _LOGGER = logging.getLogger(__name__) +PARALLEL_UPDATES = 0 + SCAN_INTERVAL = timedelta(seconds=90) diff --git a/homeassistant/components/swiss_public_transport/strings.json b/homeassistant/components/swiss_public_transport/strings.json index b3bfd9aea8ff02..859791a5457ad2 100644 --- a/homeassistant/components/swiss_public_transport/strings.json +++ b/homeassistant/components/swiss_public_transport/strings.json @@ -17,6 +17,11 @@ "data": { "from": "Start station", "to": "End station", + "via": "Via stations" + }, + "data_description": { + "from": "The departure station for the start of the connection.", + "to": "The arrival station for the end of the connection.", "via": "List of up to 5 via stations" }, "description": "Provide start and end station for your connection,\nand optionally up to 5 via stations.\n\nCheck the [stationboard]({stationboard_url}) for valid stations.",