Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions homeassistant/components/huawei_lte/quality_scale.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
rules:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we clean up the entry unique id migration? I think at this time we can assume that everyone is running >2021.8 (and that if they decide to upgrade, they probably have bigger fish to fry)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I suppose that can go now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

    try:
        wlan_settings = await hass.async_add_executor_job(
            router.client.wlan.multi_basic_settings
        )
    except Exception:  # noqa: BLE001
        # Assume not supported, or authentication required but in unauthenticated mode
        wlan_settings = {}

We should catch more specific exceptions here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would strongly recommend to use entity descriptions in the binary sensor platform

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

switch could also use them

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this integration is fit to move to notify entities and config sub entries. Every sub entry could be a recipient and then you can just target an entity and be done with it. It would greatly improve the user experience by getting rid of the notify service

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can move some extra state attributes to separate entities

# Bronze
action-setup: done
appropriate-polling: done
brands: done
common-modules:
status: done
comment: When we refactor to use a coordinator, be sure to place it in coordinator.py.
config-flow-test-coverage:
status: todo
comment: Use mock calls to check test_urlize_plain_host instead of user_input mod checks, combine test_show_set_form with a happy path flow, finish test_connection_errors and test_login_error with CREATE_ENTRY to check error recovery, move test_success to top and assert unique id in it, split test_reauth to two so we can test incorrect password recovery.
config-flow:
status: todo
comment: See if we can catch more specific exceptions in get_device_info.
dependency-transparency:
status: todo
comment: huawei-lte-api and stringcase are not built and published to PyPI from a public CI pipeline.
docs-actions: done
docs-high-level-description: done
docs-installation-instructions: done
docs-removal-instructions: done
entity-event-setup: done
entity-unique-id: done
has-entity-name: done
runtime-data: todo
test-before-configure: done
test-before-setup: done
unique-config-entry: done

# Silver
action-exceptions: done
config-entry-unloading: done
docs-configuration-parameters: done
docs-installation-parameters: done
entity-unavailable: done
integration-owner: done
log-when-unavailable:
status: todo
comment: Kind of done, but to be reviewed, there's probably room for improvement. Maybe address this when converting to use a data update coordinator. See also https://github.com/home-assistant/core/issues/55495
parallel-updates: todo
reauthentication-flow: done
test-coverage:
status: todo
comment: Get percentage up there, add missing actual action press invocations in button tests' suspended state tests, rename test_switch.py to test_switch.py + make its functions receive hass as first parameter where applicable.

# Gold
devices: done
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the SSDP request you get the model name and number, we could use that in the device info

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True that. Note about model name added in 5e418ba, but model numbers these things send tend to be just something like Huawei Model or Model, so not really usable.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, this was about the model name for the device info in the device registry

diagnostics: done
discovery-update-info: done
discovery: done
docs-data-update: todo
docs-examples: todo
docs-known-limitations: todo
docs-supported-devices: done
docs-supported-functions:
status: todo
comment: Some info exists, but there's room for improvement.
docs-troubleshooting: todo
docs-use-cases: todo
dynamic-devices: done
entity-category: done
entity-device-class: done
entity-disabled-by-default: done
entity-translations:
status: todo
comment: Buttons and selects are lacking translations.
exception-translations: todo
icon-translations:
status: done
comment: Some use numeric state ranges or the like that are not available with icons.json state selectors.
reconfiguration-flow: todo
repair-issues:
status: todo
comment: Not sure if we have anything applicable.
stale-devices:
status: todo
comment: Not sure of applicability.

# Platinum
async-dependency:
status: todo
comment: The integration is async, but underlying huawei-lte-api is not.
inject-websession:
status: exempt
comment: Underlying huawei-lte-api does not use aiohttp or httpx, so this does not apply.
strict-typing:
status: todo
comment: Integration is strictly typechecked already, and huawei-lte-api and url-normalize are in order. stringcase is not typed.
1 change: 0 additions & 1 deletion script/hassfest/quality_scale.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,6 @@ class Rule:
"hp_ilo",
"html5",
"http",
"huawei_lte",
"hue",
"huisbaasje",
"hunterdouglas_powerview",
Expand Down
Loading