mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Add quality_scale.yaml to enphase_envoy (#132489)
This commit is contained in:
parent
0dbd5bffe6
commit
084ef20695
@ -31,6 +31,7 @@ from .const import (
|
|||||||
OPTION_DISABLE_KEEP_ALIVE,
|
OPTION_DISABLE_KEEP_ALIVE,
|
||||||
OPTION_DISABLE_KEEP_ALIVE_DEFAULT_VALUE,
|
OPTION_DISABLE_KEEP_ALIVE_DEFAULT_VALUE,
|
||||||
)
|
)
|
||||||
|
from .coordinator import EnphaseConfigEntry
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -67,7 +68,7 @@ class EnphaseConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
@callback
|
@callback
|
||||||
def async_get_options_flow(
|
def async_get_options_flow(
|
||||||
config_entry: ConfigEntry,
|
config_entry: EnphaseConfigEntry,
|
||||||
) -> EnvoyOptionsFlowHandler:
|
) -> EnvoyOptionsFlowHandler:
|
||||||
"""Options flow handler for Enphase_Envoy."""
|
"""Options flow handler for Enphase_Envoy."""
|
||||||
return EnvoyOptionsFlowHandler()
|
return EnvoyOptionsFlowHandler()
|
||||||
|
124
homeassistant/components/enphase_envoy/quality_scale.yaml
Normal file
124
homeassistant/components/enphase_envoy/quality_scale.yaml
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
rules:
|
||||||
|
# Bronze
|
||||||
|
action-setup:
|
||||||
|
status: done
|
||||||
|
comment: only actions implemented are platform native ones.
|
||||||
|
appropriate-polling:
|
||||||
|
status: done
|
||||||
|
comment: fixed 1 minute cycle based on Enphase Envoy device characteristics
|
||||||
|
brands: done
|
||||||
|
common-modules:
|
||||||
|
status: done
|
||||||
|
comment: |
|
||||||
|
In coordinator.py, you set self.entry = entry, while after the super constructor,
|
||||||
|
you can access the entry via self.config_entry (you would have to overwrite the
|
||||||
|
type to make sure you don't have to assert not None every time)done
|
||||||
|
config-flow-test-coverage:
|
||||||
|
status: todo
|
||||||
|
comment: |
|
||||||
|
- test_form is missing an assertion for the unique id of the resulting entry
|
||||||
|
- Let's also have test_user_no_serial_number assert the unique_id (as in, it can't be set to the serial_number since we dont have one, so let's assert what it will result in)
|
||||||
|
- Let's have every test result in either CREATE_ENTRY or ABORT (like test_form_invalid_auth or test_form_cannot_connect, they can be parametrized)
|
||||||
|
- test_zeroconf_token_firmware and test_zeroconf_pre_token_firmware can also be parametrized I think
|
||||||
|
- test_zero_conf_malformed_serial_property - with pytest.raises(KeyError) as ex::
|
||||||
|
I don't believe this should be able to raise a KeyError Shouldn't we abort the flow?
|
||||||
|
test_reauth -> Let's also assert result before we start with the async_configure part
|
||||||
|
config-flow:
|
||||||
|
status: todo
|
||||||
|
comment: |
|
||||||
|
- async_step_zeroconf -> a config entry title is considered userland,
|
||||||
|
so if someone renamed their entry, it will be reverted back with the code at L146.
|
||||||
|
- async_step_reaut L160: I believe that the unique is already set when starting a reauth flow
|
||||||
|
- The config flow is missing data descriptions for the other fields
|
||||||
|
dependency-transparency: done
|
||||||
|
docs-actions:
|
||||||
|
status: done
|
||||||
|
comment: https://www.home-assistant.io/integrations/enphase_envoy/#actions
|
||||||
|
docs-high-level-description:
|
||||||
|
status: done
|
||||||
|
comment: https://www.home-assistant.io/integrations/enphase_envoy
|
||||||
|
docs-installation-instructions:
|
||||||
|
status: done
|
||||||
|
comment: https://www.home-assistant.io/integrations/enphase_envoy#prerequisites
|
||||||
|
docs-removal-instructions:
|
||||||
|
status: done
|
||||||
|
comment: https://www.home-assistant.io/integrations/enphase_envoy#removing-the-integration
|
||||||
|
entity-event-setup:
|
||||||
|
status: done
|
||||||
|
comment: no events used.
|
||||||
|
entity-unique-id: done
|
||||||
|
has-entity-name: done
|
||||||
|
runtime-data:
|
||||||
|
status: done
|
||||||
|
comment: |
|
||||||
|
async_unload_entry- coordinator: EnphaseUpdateCoordinator = entry.runtime_data
|
||||||
|
You can remove the EnphaseUpdateCoordinator as the type can now be inferred thanks to the typed config entry
|
||||||
|
test-before-configure: done
|
||||||
|
test-before-setup: done
|
||||||
|
unique-config-entry: done
|
||||||
|
|
||||||
|
# Silver
|
||||||
|
action-exceptions:
|
||||||
|
status: todo
|
||||||
|
comment: |
|
||||||
|
needs to raise appropriate error when exception occurs.
|
||||||
|
Pending https://github.com/pyenphase/pyenphase/pull/194
|
||||||
|
config-entry-unloading: done
|
||||||
|
docs-configuration-parameters:
|
||||||
|
status: done
|
||||||
|
comment: https://www.home-assistant.io/integrations/enphase_envoy#configuration
|
||||||
|
docs-installation-parameters:
|
||||||
|
status: done
|
||||||
|
comment: https://www.home-assistant.io/integrations/enphase_envoy#required-manual-input
|
||||||
|
entity-unavailable: done
|
||||||
|
integration-owner: done
|
||||||
|
log-when-unavailable: done
|
||||||
|
parallel-updates:
|
||||||
|
status: done
|
||||||
|
comment: pending https://github.com/home-assistant/core/pull/132373
|
||||||
|
reauthentication-flow: done
|
||||||
|
test-coverage:
|
||||||
|
status: todo
|
||||||
|
comment: |
|
||||||
|
- test_config_different_unique_id -> unique_id set to the mock config entry is an int, not a str
|
||||||
|
- Apart from the coverage, test_option_change_reload does not verify that the config entry is reloaded
|
||||||
|
|
||||||
|
# Gold
|
||||||
|
devices: done
|
||||||
|
diagnostics: done
|
||||||
|
discovery-update-info: done
|
||||||
|
discovery: done
|
||||||
|
docs-data-update:
|
||||||
|
status: done
|
||||||
|
comment: https://www.home-assistant.io/integrations/enphase_envoy#data-updates
|
||||||
|
docs-examples:
|
||||||
|
status: todo
|
||||||
|
comment: add blue-print examples, if any
|
||||||
|
docs-known-limitations: todo
|
||||||
|
docs-supported-devices:
|
||||||
|
status: done
|
||||||
|
comment: https://www.home-assistant.io/integrations/enphase_envoy#supported-devices
|
||||||
|
docs-supported-functions: todo
|
||||||
|
docs-troubleshooting:
|
||||||
|
status: done
|
||||||
|
comment: https://www.home-assistant.io/integrations/enphase_envoy#troubleshooting
|
||||||
|
docs-use-cases: todo
|
||||||
|
dynamic-devices: todo
|
||||||
|
entity-category: todo
|
||||||
|
entity-device-class: done
|
||||||
|
entity-disabled-by-default: done
|
||||||
|
entity-translations: done
|
||||||
|
exception-translations:
|
||||||
|
status: todo
|
||||||
|
comment: pending https://github.com/home-assistant/core/pull/132483
|
||||||
|
icon-translations: todo
|
||||||
|
reconfiguration-flow: done
|
||||||
|
repair-issues:
|
||||||
|
status: exempt
|
||||||
|
comment: no general issues or repair.py
|
||||||
|
stale-devices: todo
|
||||||
|
|
||||||
|
# Platinum
|
||||||
|
async-dependency: done
|
||||||
|
inject-websession: done
|
||||||
|
strict-typing: done
|
@ -355,7 +355,6 @@ INTEGRATIONS_WITHOUT_QUALITY_SCALE_FILE = [
|
|||||||
"energyzero",
|
"energyzero",
|
||||||
"enigma2",
|
"enigma2",
|
||||||
"enocean",
|
"enocean",
|
||||||
"enphase_envoy",
|
|
||||||
"entur_public_transport",
|
"entur_public_transport",
|
||||||
"environment_canada",
|
"environment_canada",
|
||||||
"envisalink",
|
"envisalink",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user