Skip to content

Add indevolt binary sensor platform#169375

Merged
abmantis merged 18 commits intohome-assistant:devfrom
Xirt:add-indevolt-binary-sensor-platform
Apr 29, 2026
Merged

Add indevolt binary sensor platform#169375
abmantis merged 18 commits intohome-assistant:devfrom
Xirt:add-indevolt-binary-sensor-platform

Conversation

@Xirt
Copy link
Copy Markdown
Contributor

@Xirt Xirt commented Apr 28, 2026

Proposed change

Adds the binary sensor platform including initial sensors for the (P1) meter connection status and the heating status of the device. Leverages the indevolt-api library 1.6.4 which requires a separate merge: #169377.

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:

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

Adds a binary_sensor platform to the Indevolt integration to expose diagnostic statuses (P1 meter connection and device/battery heating states), alongside the required dependency bump and test coverage.

Changes:

  • Add binary_sensor platform with entities for meter connectivity and heating states (Gen1 + Gen2 battery packs, filtered by pack SN presence).
  • Extend polled Indevolt API keys to include meter connection + heating state keys.
  • Add snapshot-based and functional tests for the new binary sensors; bump indevolt-api to 1.6.4 and add translations.

Reviewed changes

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

Show a summary per file
File Description
homeassistant/components/indevolt/binary_sensor.py New platform implementation + battery-pack filtering based on SN availability.
homeassistant/components/indevolt/__init__.py Register Platform.BINARY_SENSOR for config entry forwarding.
homeassistant/components/indevolt/const.py Add new keys to SENSOR_KEYS so coordinator polls required values.
homeassistant/components/indevolt/strings.json Add translation entries for new binary sensor entities.
homeassistant/components/indevolt/manifest.json Bump integration requirement to indevolt-api==1.6.4.
requirements_all.txt Bump pinned indevolt-api to 1.6.4.
requirements_test_all.txt Bump pinned indevolt-api to 1.6.4 for tests.
tests/components/indevolt/test_binary_sensor.py New tests covering registry/state snapshots, meter-connected states, availability, and pack filtering.
tests/components/indevolt/snapshots/test_binary_sensor.ambr New snapshots for binary sensor entities and their initial states.

Comment thread tests/components/indevolt/test_binary_sensor.py Outdated
Comment thread homeassistant/components/indevolt/binary_sensor.py
Comment thread tests/components/indevolt/test_binary_sensor.py Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 28, 2026 14:25
@Xirt Xirt marked this pull request as ready for review April 28, 2026 14:27
@Xirt Xirt mentioned this pull request Apr 28, 2026
21 tasks
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 9 out of 9 changed files in this pull request and generated 3 comments.

Comment thread homeassistant/components/indevolt/manifest.json
Comment thread tests/components/indevolt/test_binary_sensor.py
Comment thread tests/components/indevolt/test_binary_sensor.py Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 28, 2026 14:49
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 9 out of 9 changed files in this pull request and generated 1 comment.

Comment thread homeassistant/components/indevolt/binary_sensor.py
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 9 out of 9 changed files in this pull request and generated 1 comment.

Comment thread homeassistant/components/indevolt/binary_sensor.py
Copy link
Copy Markdown
Member

@abmantis abmantis left a comment

Choose a reason for hiding this comment

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

Please keep the PR as draft if it depends on other open PRs. Thanks!

@home-assistant home-assistant Bot marked this pull request as draft April 28, 2026 15:11
@home-assistant
Copy link
Copy Markdown
Contributor

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.

@Xirt Xirt marked this pull request as ready for review April 28, 2026 15:21
Copilot AI review requested due to automatic review settings April 28, 2026 15:21
@home-assistant home-assistant Bot requested a review from abmantis April 28, 2026 15:21
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 9 out of 9 changed files in this pull request and generated 1 comment.

Comment thread homeassistant/components/indevolt/binary_sensor.py Outdated
Comment thread homeassistant/components/indevolt/binary_sensor.py Outdated
Comment thread homeassistant/components/indevolt/binary_sensor.py Outdated
Comment thread tests/components/indevolt/test_binary_sensor.py Outdated
Comment thread tests/components/indevolt/test_binary_sensor.py Outdated
Comment thread tests/components/indevolt/test_binary_sensor.py Outdated
Comment thread tests/components/indevolt/test_binary_sensor.py Outdated
Comment thread tests/components/indevolt/test_binary_sensor.py
Comment thread tests/components/indevolt/test_binary_sensor.py Outdated
Comment thread tests/components/indevolt/test_binary_sensor.py
@home-assistant home-assistant Bot marked this pull request as draft April 28, 2026 16:33
Copilot AI review requested due to automatic review settings April 28, 2026 17:54
@Xirt Xirt marked this pull request as ready for review April 28, 2026 17:55
@home-assistant home-assistant Bot requested a review from abmantis April 28, 2026 17:55
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 9 out of 9 changed files in this pull request and generated 1 comment.

Comment thread homeassistant/components/indevolt/binary_sensor.py
Copilot AI review requested due to automatic review settings April 28, 2026 22:19
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 9 out of 9 changed files in this pull request and generated 1 comment.

Comment thread homeassistant/components/indevolt/__init__.py
Copy link
Copy Markdown
Member

@abmantis abmantis left a comment

Choose a reason for hiding this comment

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

Thanks!

@abmantis abmantis merged commit 07c4025 into home-assistant:dev Apr 29, 2026
36 of 37 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants