Skip to content

Conversation

@bdraco
Copy link
Member

@bdraco bdraco commented Dec 6, 2025

Proposed change

Improve error messages shown in the UI when BLE WiFi provisioning fails. Previously, error messages were generic and didn't include the device name or actual error that occurred.

WiFi scan failure

Before:

Failed to scan for WiFi networks via Bluetooth. The device may be out of range or Bluetooth connection failed. Would you like to try again?

After:

Failed to scan for WiFi networks on ShellyPlus2PM-C049EF8873E8 via Bluetooth: DeviceConnectionError(TimeoutError()). The device may be out of range or Bluetooth connection failed. Would you like to try again?

Provisioning failure

Before:

The device did not connect to MyNetwork. This may be due to an incorrect password or the network being out of range. Would you like to try again?

After:

ShellyPlus2PM-C049EF8873E8 did not connect to MyNetwork: DeviceConnectionError('BLE connection lost'). This may be due to an incorrect password or the network being out of range. Would you like to try again?

This helps users identify which device failed and provides the actual error for troubleshooting.

Type of change

  • Bugfix (non-breaking change which fixes an issue)

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

@home-assistant
Copy link

home-assistant bot commented Dec 6, 2025

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

Code owner commands

Code owners of shelly can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign shelly Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@bdraco bdraco changed the title Show device name and error in Shelly BLE WiFi scan failure message Show device name and error in Shelly BLE provisioning failure messages Dec 6, 2025
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.

5 participants