Skip to content

Add OpenEVSE diagnostics#171762

Open
firstof9 wants to merge 14 commits into
home-assistant:devfrom
firstof9:openevse-diagnostics
Open

Add OpenEVSE diagnostics#171762
firstof9 wants to merge 14 commits into
home-assistant:devfrom
firstof9:openevse-diagnostics

Conversation

@firstof9
Copy link
Copy Markdown
Contributor

@firstof9 firstof9 commented May 21, 2026

Proposed change

Add a diagnostics platform for OpenEVSE to provide details of the charger configuration and state for diagnostic purposes. Additionally, add comprehensive tests for the diagnostics platform, with proper mocking of the dynamic property lookup in the diagnostics code to avoid any memory leak/exhaustion issues.

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

  • 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 @c00w, mind taking a look at this pull request as it has been labeled with an integration (openevse) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of openevse 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 openevse 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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds diagnostics support for the OpenEVSE integration and introduces tests to validate returned data and redaction behavior.

Changes:

  • Implement async_get_config_entry_diagnostics for OpenEVSE, including charger property collection and config entry redaction.
  • Add tests for diagnostics output structure and credential redaction.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
homeassistant/components/openevse/diagnostics.py New diagnostics endpoint implementation for OpenEVSE config entries.
tests/components/openevse/test_diagnostics.py New tests validating diagnostics payload and sensitive-field redaction.

Comment thread homeassistant/components/openevse/diagnostics.py Outdated
Comment thread homeassistant/components/openevse/diagnostics.py Outdated
@firstof9 firstof9 force-pushed the openevse-diagnostics branch from bd872c9 to 320af57 Compare May 21, 2026 18:10
Copilot AI review requested due to automatic review settings May 21, 2026 18:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 2 out of 2 changed files in this pull request and generated 3 comments.

Comment thread tests/components/openevse/test_diagnostics.py Outdated
Comment thread homeassistant/components/openevse/diagnostics.py Outdated
Comment thread homeassistant/components/openevse/diagnostics.py Outdated
@firstof9 firstof9 requested a review from Copilot May 21, 2026 18:21
@firstof9 firstof9 changed the title Add OpenEVSE diagnostics and tests with mock fix Add OpenEVSE diagnostics May 21, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 2 out of 2 changed files in this pull request and generated 3 comments.

Comment thread homeassistant/components/openevse/diagnostics.py Outdated
Comment thread tests/components/openevse/test_diagnostics.py Outdated
Comment thread homeassistant/components/openevse/diagnostics.py Outdated
@firstof9 firstof9 requested a review from Copilot May 21, 2026 18:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 2 out of 2 changed files in this pull request and generated 3 comments.

Comment thread homeassistant/components/openevse/diagnostics.py Outdated
Comment thread tests/components/openevse/test_diagnostics.py Outdated
Comment thread tests/components/openevse/test_diagnostics.py Outdated
@firstof9 firstof9 requested a review from Copilot May 21, 2026 18:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread homeassistant/components/openevse/diagnostics.py
Comment thread homeassistant/components/openevse/diagnostics.py Outdated
@firstof9 firstof9 requested a review from Copilot May 21, 2026 18:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 2 out of 2 changed files in this pull request and generated 3 comments.

Comment thread homeassistant/components/openevse/diagnostics.py Outdated
Comment thread homeassistant/components/openevse/diagnostics.py
Comment thread tests/components/openevse/test_diagnostics.py Outdated
@firstof9 firstof9 requested a review from Copilot May 21, 2026 19:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread homeassistant/components/openevse/diagnostics.py
@firstof9 firstof9 requested a review from Copilot May 21, 2026 19:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 2 out of 2 changed files in this pull request and generated 4 comments.

Comment thread tests/components/openevse/test_diagnostics.py
Comment thread homeassistant/components/openevse/diagnostics.py Outdated
Comment thread homeassistant/components/openevse/diagnostics.py
Comment thread homeassistant/components/openevse/diagnostics.py
@firstof9 firstof9 requested a review from Copilot May 21, 2026 19:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 2 out of 2 changed files in this pull request and generated 4 comments.

Comment thread homeassistant/components/openevse/diagnostics.py Outdated
Comment thread homeassistant/components/openevse/diagnostics.py Outdated
Comment thread homeassistant/components/openevse/diagnostics.py Outdated
Comment thread tests/components/openevse/test_diagnostics.py Outdated
@firstof9 firstof9 requested a review from Copilot May 21, 2026 19:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread homeassistant/components/openevse/diagnostics.py Outdated
Comment thread homeassistant/components/openevse/diagnostics.py Outdated
@firstof9 firstof9 requested a review from Copilot May 21, 2026 19:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 2 out of 2 changed files in this pull request and generated 4 comments.

Comment thread homeassistant/components/openevse/diagnostics.py Outdated
Comment thread homeassistant/components/openevse/diagnostics.py Outdated
Comment thread homeassistant/components/openevse/diagnostics.py Outdated
Comment thread tests/components/openevse/test_diagnostics.py
@firstof9 firstof9 requested a review from Copilot May 21, 2026 19:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread homeassistant/components/openevse/diagnostics.py Outdated
Comment thread tests/components/openevse/test_diagnostics.py
@firstof9 firstof9 requested a review from Copilot May 21, 2026 19:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread homeassistant/components/openevse/diagnostics.py
Comment thread homeassistant/components/openevse/diagnostics.py
@firstof9 firstof9 marked this pull request as ready for review May 21, 2026 20:10
Copilot AI review requested due to automatic review settings May 21, 2026 20:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread homeassistant/components/openevse/diagnostics.py Outdated
Comment thread homeassistant/components/openevse/diagnostics.py Outdated
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