Skip to content

Conversation

@sstallion
Copy link
Contributor

@sstallion sstallion commented Dec 29, 2024

Proposed change

This PR adds cloud integration for SensorPush devices. It communicates with the publicly available Cloud API using the sensorpush-api and sensorpush-ha Python packages. Care was taken to ensure that presented devices appeared the same as those created by the existing SensorPush integration. A G1 WiFi Gateway is required to make use of the Cloud API.

Note

This PR is a re-submission of home-assistant/core#121890, which fixes several issues reported by reviewers. I would like to send a heartfelt apology to @joostlek, @edenhaus, and @frenck - I was caught between dueling schedules and I wasn't able to do the work needed to get it over the finish line. I was finally able to put in the time over the holiday break to make requested changes in addition to improved unit tests, strict typing, async dependencies, and websession injection (whew!)

Type of change

  • Spelling, grammar or other readability improvements (current branch).
  • Adjusted missing or incorrect information in the current documentation (current branch).
  • Added documentation for a new integration I'm adding to Home Assistant (next branch).
  • Added documentation for a new feature I'm adding to Home Assistant (next branch).
  • Removed stale or deprecated documentation.

Additional information

Checklist

  • This PR uses the correct branch, based on one of the following:
    • I made a change to the existing documentation and used the current branch.
    • I made a change that is related to an upcoming version of Home Assistant and used the next branch.
  • The documentation follows the Home Assistant documentation standards.

Summary by CodeRabbit

  • New Features

    • Added documentation for SensorPush Cloud integration in Home Assistant.
    • Supports G1 WiFi Gateway and various temperature/humidity sensors.
    • Provides monitoring of environmental conditions like temperature, humidity, pressure, and battery status.
  • Documentation

    • Created comprehensive integration guide for SensorPush Cloud devices.
    • Outlined device prerequisites and configuration steps.
    • Established automatic review requests for changes related to the integration.

@home-assistant home-assistant bot added has-parent This PR has a parent PR in another repo next This PR goes into the next branch labels Dec 29, 2024
@netlify
Copy link

netlify bot commented Dec 29, 2024

Deploy Preview for home-assistant-docs ready!

Name Link
🔨 Latest commit 4f19fc6
🔍 Latest deploy log https://app.netlify.com/sites/home-assistant-docs/deploys/67b8ac2bcfcf6400082150db
😎 Deploy Preview https://deploy-preview-36600--home-assistant-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@sstallion sstallion marked this pull request as ready for review December 29, 2024 18:08
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 29, 2024

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

A new documentation file for the SensorPush Cloud integration has been added to the Home Assistant documentation repository. The CODEOWNERS file was updated to assign @sstallion as the code owner for this specific integration documentation. The new markdown file provides comprehensive details about integrating SensorPush Cloud devices with Home Assistant, including device compatibility, sensor types, configuration requirements, and usage instructions.

Changes

File Change Summary
CODEOWNERS Added source/_integrations/sensorpush_cloud.markdown @sstallion
source/_integrations/sensorpush_cloud.markdown New documentation file created for SensorPush Cloud integration, detailing integration instructions, supported devices, sensor types, and configuration requirements

Sequence Diagram

sequenceDiagram
    participant User
    participant SensorPush App
    participant Gateway Cloud Dashboard
    participant Home Assistant
    
    User->>SensorPush App: Activate devices
    User->>Gateway Cloud Dashboard: Enable API access
    User->>Home Assistant: Configure SensorPush Cloud integration
    Home Assistant->>SensorPush App: Authenticate and fetch device data
    SensorPush App-->>Home Assistant: Return sensor measurements
    Home Assistant->>User: Display environmental sensor data
Loading

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 31794d8 and 4f19fc6.

📒 Files selected for processing (1)
  • source/_integrations/sensorpush_cloud.markdown (1 hunks)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
source/_integrations/sensorpush_cloud.markdown (2)

38-48: Add units of measurement and state class information to the sensors table.

To improve clarity, consider adding:

  1. Units of measurement for each sensor (e.g., °C/°F for temperature, % for humidity)
  2. State class information to indicate which sensors support graphing
 | Sensor               | Description                                                   |
 | :------------------- | :------------------------------------------------------------ |
-| altitude             | Measures the altitude. (disabled by default)                  |
-| atmospheric_pressure | Measures the barometric pressure. (disabled by default)       |
-| battery_voltage      | Measures the battery voltage. (disabled by default)           |
-| dewpoint             | Measures the dew point. (disabled by default)                 |
-| humidity             | Measures the relative humidity.                               |
-| signal_strength      | Measures the Bluetooth signal strength. (disabled by default) |
-| temperature          | Measures the temperature.                                     |
-| vapor_pressure       | Measures the vapor-pressure deficit. (disabled by default)    |
+| altitude             | Measures the altitude in meters. (disabled by default, measurement) |
+| atmospheric_pressure | Measures the barometric pressure in hPa. (disabled by default, measurement) |
+| battery_voltage      | Measures the battery voltage in volts. (disabled by default, measurement) |
+| dewpoint             | Measures the dew point in °C/°F. (disabled by default, measurement) |
+| humidity             | Measures the relative humidity in %. (measurement) |
+| signal_strength      | Measures the Bluetooth signal strength in dBm. (disabled by default, measurement) |
+| temperature          | Measures the temperature in °C/°F. (measurement) |
+| vapor_pressure       | Measures the vapor-pressure deficit in kPa. (disabled by default, measurement) |

17-17: Add brand assets reference.

Since there's an associated PR in the Brands repository, consider adding a note about the brand assets being available in Home Assistant.

 Integrates [SensorPush Cloud](https://www.sensorpush.com/) devices into Home Assistant.
+
+{% details "Brand assets are available in Home Assistant" %}
+The SensorPush logo and icon are registered trademarks of Cousins and Sears LLC and are used with permission.
+{% enddetails %}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 26fc4fd and ccb2e65.

📒 Files selected for processing (2)
  • CODEOWNERS (1 hunks)
  • source/_integrations/sensorpush_cloud.markdown (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • CODEOWNERS
🔇 Additional comments (3)
source/_integrations/sensorpush_cloud.markdown (3)

1-15: LGTM! Metadata is complete and accurate.

The frontmatter contains all required fields and follows Home Assistant's documentation standards.


25-31: LGTM! Device support section is well-documented.

The supported devices section clearly lists all compatible hardware with proper links to product pages.


49-55: LGTM! Notes and removal instructions are clear.

The device limitation note and removal instructions are properly documented.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
source/_integrations/sensorpush_cloud.markdown (3)

23-23: Clarify the device activation flow.

Consider clarifying the activation sequence to help users understand which app to use first.

-Sensor entities (temperature, humidity, barometric pressure) will not be available to Home Assistant until you have activated the device with the SensorPush app on iOS or Android.
+Before adding the device to Home Assistant, you must first activate it using the SensorPush mobile app (available on iOS or Android). This step is required for sensor entities (temperature, humidity, barometric pressure) to be available.

50-50: Fix preposition usage.

For better readability:

-`atmospheric_pressure` is not available in HT1 and HT.w series devices.
+`atmospheric_pressure` is not available on HT1 and HT.w series devices.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~50-~50: The preposition “on” seems more likely in this position than the preposition “in”.
Context: ...atmospheric_pressure is not available in HT1 and HT.w series devices. ## Removi...

(AI_EN_LECTOR_REPLACEMENT_PREPOSITION_IN_ON)


37-46: Consider enhancing the sensors table with device compatibility.

The table could be more helpful by indicating which sensors are available for each device model. This would help users understand the capabilities of their specific device.

Example format:

| Sensor | Description | HT1 | HT.w | HTP.xw |
| :--- | :--- | :---: | :---: | :---: |
| `altitude` | Measures the altitude. (disabled by default) ||||
...
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4647232 and 0c922ac.

📒 Files selected for processing (2)
  • CODEOWNERS (1 hunks)
  • source/_integrations/sensorpush_cloud.markdown (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • CODEOWNERS
🧰 Additional context used
🪛 LanguageTool
source/_integrations/sensorpush_cloud.markdown

[uncategorized] ~50-~50: The preposition “on” seems more likely in this position than the preposition “in”.
Context: ...atmospheric_pressure is not available in HT1 and HT.w series devices. ## Removi...

(AI_EN_LECTOR_REPLACEMENT_PREPOSITION_IN_ON)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Redirect rules - home-assistant-docs
  • GitHub Check: Header rules - home-assistant-docs
  • GitHub Check: Pages changed - home-assistant-docs
🔇 Additional comments (3)
source/_integrations/sensorpush_cloud.markdown (3)

6-6: Verify the release version.

The release version is set to 2025.2. Please confirm if this is the intended version or if it should be adjusted to an earlier version.


27-29: LGTM!

The supported devices section is well-structured with clear links to each product.


54-56: LGTM!

The removal instructions are clear and follow the standard documentation format.

@home-assistant home-assistant bot added the parent-merged The parent PR has been merged already label Feb 20, 2025
silamon
silamon previously approved these changes Feb 21, 2025
@silamon silamon enabled auto-merge (squash) February 21, 2025 16:39
@silamon silamon merged commit ea98bd8 into home-assistant:next Feb 21, 2025
5 of 7 checks passed
@home-assistant home-assistant bot removed the parent-merged The parent PR has been merged already label Feb 21, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Feb 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

has-parent This PR has a parent PR in another repo next This PR goes into the next branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants