Skip to content

Add Bluetooth connection to Eurotronic Comet Blue devices#173670

Merged
joostlek merged 1 commit into
home-assistant:devfrom
jasonjhofmann:eurotronic-cometblue-bluetooth-connection
Jun 13, 2026
Merged

Add Bluetooth connection to Eurotronic Comet Blue devices#173670
joostlek merged 1 commit into
home-assistant:devfrom
jasonjhofmann:eurotronic-cometblue-bluetooth-connection

Conversation

@jasonjhofmann

Copy link
Copy Markdown
Contributor

Proposed change

Register the Eurotronic Comet Blue device with its Bluetooth address as a
connection so the address is shown on the device page and other integrations can
attach to the same device.

Comet Blue devices were registered with only a domain identifier and no device
connections, so Home Assistant did not display the device's Bluetooth address,
and other integrations that key off the Bluetooth connection (for example,
Bermuda BLE trilateration) ended up creating a separate device for the same
physical unit. Adding the CONNECTION_BLUETOOTH connection fixes both: the
address now shows on the device page, and integrations referencing the same
Bluetooth device link to it instead of producing a duplicate.

The connection uses the same address (entry.data[CONF_ADDRESS]) already used as
the device identifier, which is the Bluetooth address stored from discovery.

This is the same change applied to Aranet in #173066 and to AirVisual Pro in
#173071.

Please re-classify it as a Bugfix if deemed appropriate (as one could argue a
Bluetooth device should always carry its Bluetooth connection).

The change is covered by a new device-registry snapshot test that asserts the
Bluetooth connection is registered.

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:
  • 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:

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@home-assistant

Copy link
Copy Markdown
Contributor

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

Code owner commands

Code owners of eurotronic_cometblue 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 eurotronic_cometblue 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

Note

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

This PR adds Bluetooth connection information to the device registry entry for the Eurotronic Comet Blue integration and adds a test to verify the device registry entry.

Changes:

  • Adds connections={(dr.CONNECTION_BLUETOOTH, address)} to the device registry creation call in the integration setup.
  • Adds a new test file verifying the device registry entry includes the Bluetooth connection.
  • Adds the corresponding snapshot file for the device registry test.

Reviewed changes

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

File Description
homeassistant/components/eurotronic_cometblue/init.py Adds Bluetooth connection to device registry entry creation
tests/components/eurotronic_cometblue/test_init.py New test verifying device registry entry with Bluetooth connection
tests/components/eurotronic_cometblue/snapshots/test_init.ambr Snapshot for the device registry test assertion

@jasonjhofmann jasonjhofmann marked this pull request as ready for review June 13, 2026 09:46

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

Thanks, wasn't aware of that! LGTM.

@joostlek joostlek merged commit 2972d9e into home-assistant:dev Jun 13, 2026
33 checks passed
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.

4 participants