Skip to content

Add interpolation and WebP radar options to Environment Canada - #177572

Open
michaeldavie wants to merge 3 commits into
home-assistant:devfrom
michaeldavie:environment-canada-interpolation-webp
Open

Add interpolation and WebP radar options to Environment Canada#177572
michaeldavie wants to merge 3 commits into
home-assistant:devfrom
michaeldavie:environment-canada-interpolation-webp

Conversation

@michaeldavie

@michaeldavie michaeldavie commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Proposed change

Adds two options to the Environment Canada radar camera's options flow (introduced in #173415):

  • Smooth radar image (radar_interpolation, boolean): requests the INTERPOLATION=TRUE WMS parameter from Environment Canada so the rendered radar layer is smoothed instead of pixelated. Defaults to False, the previous hardcoded behaviour.
  • Use WebP images (radar_webp, boolean): requests the radar layer as WebP instead of PNG and returns camera/animation output as WebP instead of PNG/GIF, trading higher per-frame latency for lower bandwidth. Defaults to False, the previous hardcoded behaviour.

Defaults to the previous behaviour, so existing installations are unchanged until the user opts in.

This depends on the env-canada 0.18.0 bump in #177569 (adds the ECMap interpolation/webp parameters), and is stacked on that branch — please merge #177569 first.

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

Checklist

  • I understand the code I am submitting and can explain how it works.
  • 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.
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

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 diff between library versions and ideally a link to the changelog/release notes is added to the PR description.

To help with the load of incoming pull requests:

@home-assistant

Copy link
Copy Markdown
Contributor

Hey there @gwww, mind taking a look at this pull request as it has been labeled with an integration (environment_canada) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of environment_canada can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant mark-draft Mark the pull request as draft.
  • @home-assistant ready-for-review Remove the draft status from the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign environment_canada Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant update-branch Update the pull request branch with the base branch.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component, problem in config, problem in device, feature-request) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component, problem in config, problem in device, feature-request) on the pull request.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds opt-in smoothing and WebP output options to Environment Canada radar cameras.

Changes:

  • Adds interpolation and WebP options with backward-compatible defaults.
  • Passes saved options to ECMap and expands tests.
  • Updates translations and env-canada to 0.18.0.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
homeassistant/components/environment_canada/__init__.py Passes new options to ECMap.
homeassistant/components/environment_canada/config_flow.py Adds both options to the options flow.
homeassistant/components/environment_canada/const.py Defines option keys and defaults.
homeassistant/components/environment_canada/manifest.json Updates the dependency version.
homeassistant/components/environment_canada/strings.json Adds user-facing option text.
requirements_all.txt Updates the generated dependency requirement.
tests/components/environment_canada/test_config_flow.py Tests option persistence and ECMap arguments.

Comment thread homeassistant/components/environment_canada/__init__.py
@michaeldavie michaeldavie changed the title Add interpolation and webp radar options to Environment Canada Add interpolation and WebP radar options to Environment Canada Jul 29, 2026
Copilot AI review requested due to automatic review settings July 29, 2026 19:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.

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