-
-
Notifications
You must be signed in to change notification settings - Fork 36k
Add diagnostics support to SensorPush integration #153922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Add diagnostics support to SensorPush integration #153922
Conversation
|
Hey there @bdraco, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds diagnostics support to the SensorPush integration to help users troubleshoot connectivity and sensor data issues. The diagnostics feature exposes configuration entry information and coordinator status, which is particularly useful for Bluetooth-based sensors that may experience range-related connectivity problems.
Key changes:
- Implements diagnostics endpoint with coordinator status and configuration data
- Adds comprehensive test coverage with snapshot testing
- Creates reusable test fixtures for the SensorPush integration
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
homeassistant/components/sensorpush/diagnostics.py |
Implements the diagnostics endpoint with data redaction for sensitive information |
tests/components/sensorpush/test_diagnostics.py |
Adds test coverage for the diagnostics functionality using snapshot assertions |
tests/components/sensorpush/snapshots/test_diagnostics.ambr |
Snapshot file capturing expected diagnostics output structure |
tests/components/sensorpush/conftest.py |
Adds mock config entry fixture for testing |
| from homeassistant.const import CONF_UNIQUE_ID | ||
| from homeassistant.core import HomeAssistant | ||
|
|
||
| from .const import DOMAIN | ||
|
|
||
| CONF_TITLE = "title" |
Copilot
AI
Oct 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use constants from homeassistant.const instead of defining custom constants. CONF_TITLE should be imported from homeassistant.const where it's already defined as a standard configuration key.
| from homeassistant.const import CONF_UNIQUE_ID | |
| from homeassistant.core import HomeAssistant | |
| from .const import DOMAIN | |
| CONF_TITLE = "title" | |
| from homeassistant.const import CONF_UNIQUE_ID, CONF_TITLE | |
| from homeassistant.core import HomeAssistant | |
| from .const import DOMAIN |
|
As a new contributor, I suggest that you keep all diagnostic PRs but one in "draft" until at least the first one has been accepted and merged, then apply corresponding reviews to the other PRs before marking them as ready for review. |
f37d384 to
0f2582c
Compare
Proposed change
This PR adds diagnostics support to the SensorPush integration. SensorPush devices are popular temperature and humidity monitors, and diagnostics will help users troubleshoot when their sensor data isn't updating as expected.
With diagnostics enabled, users can easily see the connection state and coordinator status, which is especially useful when sensors are placed at the edge of Bluetooth range.
Type of change
Additional information
The diagnostics data includes:
This should help identify whether issues are due to connection problems or other factors.
Checklist