Skip to content

Record current IQS for NextDNS #146895

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: dev
Choose a base branch
from
Draft

Conversation

bieniu
Copy link
Member

@bieniu bieniu commented Jun 15, 2025

Breaking change

Proposed change

Bronze

  • action-setup - Service actions are registered in async_setup
  • appropriate-polling - If it's a polling integration, set an appropriate polling interval
  • brands - Has branding assets available for the integration
  • common-modules - Place common patterns in common modules
  • config-flow-test-coverage - Full test coverage for the config flow
  • config-flow - Integration needs to be able to be set up via the UI
    • Uses data_description to give context to fields
    • Uses ConfigEntry.data and ConfigEntry.options correctly
  • dependency-transparency - Dependency transparency
  • docs-actions - The documentation describes the provided service actions that can be used
  • docs-high-level-description - The documentation includes a high-level description of the integration brand, product, or service
  • docs-installation-instructions - The documentation provides step-by-step installation instructions for the integration, including, if needed, prerequisites
  • docs-removal-instructions - The documentation provides removal instructions
  • entity-event-setup - Entity events are subscribed in the correct lifecycle methods
  • entity-unique-id - Entities have a unique ID
  • has-entity-name - Entities use has_entity_name = True
  • runtime-data - Use ConfigEntry.runtime_data to store runtime data
  • test-before-configure - Test a connection in the config flow
  • test-before-setup - Check during integration initialization if we are able to set it up correctly
  • unique-config-entry - Don't allow the same device or service to be able to be set up twice

Silver

  • action-exceptions - Service actions raise exceptions when encountering failures
  • config-entry-unloading - Support config entry unloading
  • docs-configuration-parameters - The documentation describes all integration configuration options
  • docs-installation-parameters - The documentation describes all integration installation parameters
  • entity-unavailable - Mark entity unavailable if appropriate
  • integration-owner - Has an integration owner
  • log-when-unavailable - If internet/device/service is unavailable, log once when unavailable and once when back connected
  • parallel-updates - Number of parallel updates is specified
  • reauthentication-flow - Reauthentication needs to be available via the UI
  • test-coverage - Above 95% test coverage for all integration modules

Gold

  • devices - The integration creates devices
  • diagnostics - Implements diagnostics
  • discovery-update-info - Integration uses discovery info to update network information
  • discovery - Devices can be discovered
  • docs-data-update - The documentation describes how data is updated
  • docs-examples - The documentation provides automation examples the user can use.
  • docs-known-limitations - The documentation describes known limitations of the integration (not to be confused with bugs)
  • docs-supported-devices - The documentation describes known supported / unsupported devices
  • docs-supported-functions - The documentation describes the supported functionality, including entities, and platforms
  • docs-troubleshooting - The documentation provides troubleshooting information
  • docs-use-cases - The documentation describes use cases to illustrate how this integration can be used
  • dynamic-devices - Devices added after integration setup
  • entity-category - Entities are assigned an appropriate EntityCategory
  • entity-device-class - Entities use device classes where possible
  • entity-disabled-by-default - Integration disables less popular (or noisy) entities
  • entity-translations - Entities have translated names
  • exception-translations - Exception messages are translatable
  • icon-translations - Entities implement icon translations
  • reconfiguration-flow - Integrations should have a reconfigure flow
  • repair-issues - Repair issues and repair flows are used when user intervention is needed
  • stale-devices - Stale devices are removed

Platinum

  • async-dependency - Dependency is async
  • inject-websession - The integration dependency supports passing in a websession
  • strict-typing - Strict typing

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:
  • Link to developer documentation pull request:
  • Link to frontend pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

@@ -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.

Why don't we make the coordinator update interval a property of the class? This way you don't have to pass it as parameter. I do the same in withings

@@ -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.

switch can also use a property for is_on

log-when-unavailable: done
parallel-updates: done
reauthentication-flow: done
test-coverage: done
Copy link
Member

Choose a reason for hiding this comment

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

Possible improvement: we can patch out the NextDns object instead and patch every function. This way we make sure we never use a socket in a test

log-when-unavailable: done
parallel-updates: done
reauthentication-flow: done
test-coverage: done
Copy link
Member

Choose a reason for hiding this comment

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

Let's also use the freezer to skip time in the tests

log-when-unavailable: done
parallel-updates: done
reauthentication-flow: done
test-coverage: done
Copy link
Member

Choose a reason for hiding this comment

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

test_button_press instead freeze time for example with @pytest.mark.freeze_time("2023-10-21")

log-when-unavailable: done
parallel-updates: done
reauthentication-flow: done
test-coverage: done
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 argue that test_auth_error belongs in test_init as it tests the runtime and not the coordinator specifically (Which we shouldn't do)

log-when-unavailable: done
parallel-updates: done
reauthentication-flow: done
test-coverage: done
Copy link
Member

Choose a reason for hiding this comment

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

test_config_not_ready can use the mock config entry, test_config_auth_failed as well

log-when-unavailable: done
parallel-updates: done
reauthentication-flow: done
test-coverage: done
Copy link
Member

Choose a reason for hiding this comment

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

test_availability We already test the state in the snapshot tests, so I think this is neater to just create 1 list with all entity ids and iterate over it to check if it's not unavailable, then fail update, then iterate again to see its unavailable. etc. this way we don't have to test on the real value and make the test shorter

log-when-unavailable: done
parallel-updates: done
reauthentication-flow: done
test-coverage: done
Copy link
Member

Choose a reason for hiding this comment

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

test_nextdns_system_health_fail why do we check if something is a coroutine

Comment on lines +55 to +57
docs-known-limitations:
status: done
comment: No known limitations.
Copy link
Member

Choose a reason for hiding this comment

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

let's mention this explicitly

@home-assistant home-assistant bot marked this pull request as draft June 16, 2025 19:18
@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants