Skip to content

Add Rexense integration doc #38636

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

Open
wants to merge 5 commits into
base: next
Choose a base branch
from

Conversation

GorgeOu
Copy link

@GorgeOu GorgeOu commented Apr 19, 2025

Proposed change

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

  • Link to parent pull request in the codebase:
  • Link to parent pull request in the Brands repository:
  • This PR fixes or closes issue: fixes #

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

  • Documentation
    • Added comprehensive documentation for the new Rexense integration, detailing installation, configuration, supported devices, real-time sensor updates, and removal instructions for Home Assistant users.

@home-assistant home-assistant bot added has-parent This PR has a parent PR in a other repo next This PR goes into the next branch labels Apr 19, 2025
Copy link

netlify bot commented Apr 19, 2025

Deploy Preview for home-assistant-docs ready!

Name Link
🔨 Latest commit c58915b
🔍 Latest deploy log https://app.netlify.com/sites/home-assistant-docs/deploys/68075a5ee701440008ec5c1b
😎 Deploy Preview https://deploy-preview-38636--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.

Copy link
Contributor

coderabbitai bot commented Apr 19, 2025

📝 Walkthrough

Walkthrough

A new documentation file for the Rexense integration with Home Assistant has been introduced. This file explains the integration's capabilities, such as device discovery, real-time sensor data acquisition, and switch control. It provides step-by-step installation and configuration instructions, details on supported device models and sensor entities, and guidance on removing the integration. The documentation outlines the communication flow between Home Assistant and Rexense devices, including initial HTTP requests and subsequent WebSocket connections for live updates.

Changes

File(s) Change Summary
source/_integrations/rexense.markdown Added new documentation for the Rexense integration, covering installation, configuration, usage, and removal instructions.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant HomeAssistant
    participant RexenseDevice

    User->>HomeAssistant: Add Rexense Integration via UI
    HomeAssistant->>RexenseDevice: HTTP GET /rex/GetBasicInfo
    RexenseDevice-->>HomeAssistant: Device Info Response
    HomeAssistant->>RexenseDevice: Establish WebSocket /rpc
    RexenseDevice-->>HomeAssistant: Push real-time sensor updates
    HomeAssistant-->>User: Display sensor data and controls
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 34af4fd and c58915b.

📒 Files selected for processing (1)
  • source/_integrations/rexense.markdown (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • source/_integrations/rexense.markdown
⏰ 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

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
  • @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: 0

🧹 Nitpick comments (5)
source/_integrations/rexense.markdown (5)

23-23: Surround heading with blank lines for markdown linting
MarkdownLint (MD022) requires blank lines before and after headings. Please add blank lines around the ## High‑Level Description heading.

Apply:

+ 
## High‑Level Description
+ 
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

23-23: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


26-32: Add blank lines around Installation section elements
Several lint issues (MD022, MD032, MD031) indicate that headings, lists, and fenced code blocks need blank lines around them. Please apply the following adjustments:

--- a/source/_integrations/rexense.markdown
+++ b/source/_integrations/rexense.markdown
@@ -26,7 +26,9 @@
-## Installation Instructions
+ 
+## Installation Instructions
+ 
 1. **Enable default integrations**  
+ 
    In your `configuration.yaml`, add:

```yaml
@@ -31,7 +33,9 @@
 zeroconf:
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

26-26: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


27-27: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)


29-29: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


32-32: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


53-55: Surround WebSocket Push Updates heading with blank lines
MarkdownLint (MD022) flags the ## WebSocket Push Updates heading for missing surrounding blank lines. Please add blank lines before and after.

+ 
## WebSocket Push Updates
+ 
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

53-53: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


56-68: Entities section formatting
The content under Entities accurately lists supported sensor entities for REX-3PHASEMETER-01. For improved lint compliance (MD022, MD032), insert blank lines:

  • Before the ### Sensors subheading.
  • Around the lists of sensor types.
+ 
### Sensors
+ 
- **Phase A/B/C:** Current, Voltage, Active Power, Apparent Power, Power Factor  
+ 
- **Totals:** Total Active Power, Total Apparent Power, Cumulative Energy Imported/Exported  
+ 
- **Temperature**  
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

58-58: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


60-60: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)


65-65: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)


69-77: Removal instructions formatting
The removal steps are clear. MarkdownLint (MD022, MD032) suggests blank lines around the ## Removal Instructions heading and list items. Please add blank lines accordingly.

+ 
## Removal Instructions
+ 
1. Go to **Settings → Devices & Services**  
+ 
2. Locate **Rexense** and click the trash icon to **Delete**  
+ 
3. (If you previously ran as a custom component) Delete any `custom_components/rexense` folder  
+ 
4. Restart Home Assistant  
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

69-69: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


71-71: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 46be8fb and 6dfacc1.

📒 Files selected for processing (1)
  • source/_integrations/rexense.markdown (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
source/_integrations/rexense.markdown

23-23: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


26-26: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


27-27: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)


29-29: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


32-32: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


53-53: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


58-58: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


60-60: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)


65-65: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)


69-69: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


71-71: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)

🔇 Additional comments (5)
source/_integrations/rexense.markdown (5)

1-19: Front matter metadata is well-structured
The YAML front matter includes the required keys (title, description, ha_*) and a proper closing delimiter at line 19. Codeowners, IoT class, integration type, and platforms appear correct for the new Rexense integration.


21-24: Introductory content is clear
The introduction and high‑level description effectively convey the purpose and capabilities of the Rexense integration.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

23-23: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


40-41: HTTP & WebSocket upgrade description is concise
The sentence describing the initial HTTP fetch and subsequent WebSocket upgrade clearly communicates the communication flow. No changes needed here.


42-51: Configuration options look correct
The config_flow include and Host/Port fields are properly documented using the standard Jinja templates. This aligns with other Home Assistant integration docs.


78-79: Include template for removal service
The {% include integrations/remove_device_service.md %} template is correctly added here to document the removal API. No further changes needed.

@c0ffeeca7 c0ffeeca7 added the new-integration This PR adds documentation for a new Home Assistant integration label Apr 22, 2025
@c0ffeeca7
Copy link
Contributor

Hi @GorgeOu 👋 Thank you for contributing.

  1. Please fill out the PR template:
    • check the checkboxes
    • remove the "additional information" section you added on top. Instead, move the links to the Additional information section further down in the template.

image

  1. Please follow the documentation standards. For example, we use sentence-style capitalization also in headings.
    • There's an example integration documentation page for reference. The content won't fit your specific integration, but it should give you an idea of what it could look like.
  2. Remove duplicate information. For example, the "include" elements import text blocks, so now there is duplicate information

image

## High‑Level Description
The Rexense integration enables Home Assistant to automatically discover and manage Rexense IoT Mesh devices, providing automated device discovery, real‑time sensor data, and switch control.

## Installation Instructions
Copy link
Contributor

Choose a reason for hiding this comment

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

is this section needed? or are the installation instructions covered in the {% include integrations/config_flow.md %}?

- **Automatic name** generated from device model and sensor type

## Removal Instructions
To remove the Rexense integration:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think these steps are a duplicate of the {% include integrations/remove_device_service.md %}

@home-assistant home-assistant bot marked this pull request as draft April 22, 2025 07:11
@home-assistant
Copy link

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.

@home-assistant home-assistant bot added in-progress This PR/Issue is currently being worked on needs-rebase The PR has been branched of the wrong base branch or targets an incorrect target branch labels Apr 22, 2025
@home-assistant
Copy link

It seems that this PR is targeted against an incorrect branch. Documentation updates which apply to our current stable release should target the current branch. Please change the target branch of this PR to current and rebase if needed. If this is documentation for a new feature, please add a link to that PR in your description.

@GorgeOu GorgeOu marked this pull request as ready for review April 22, 2025 08:21
@home-assistant home-assistant bot requested a review from c0ffeeca7 April 22, 2025 08:21
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

♻️ Duplicate comments (1)
source/_integrations/rexense.markdown (1)

26-39: Avoid duplicating installation steps & fix list/code-block spacing
Your manual installation instructions overlap with {% include integrations/config_flow.md %} under Configuration options. To reduce maintenance overhead:

  • Consider removing the manual steps and relying on the standard include.
  • Ensure there’s a blank line before/after the numbered list (MD032) and before/after the fenced code block (MD031).

Example diff to wrap the list and fence:

 ## Installation instructions

-1. **Enable default integrations**
+1. **Enable default integrations**

    In your `configuration.yaml`, add:

```yaml
 default_config:
 zeroconf:
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

26-26: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


27-27: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)


29-29: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


32-32: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)

🧹 Nitpick comments (7)
source/_integrations/rexense.markdown (7)

8-9: Remove quotes around ha_codeowners entries
Code owners should be listed without quotation marks to match the style of other integrations (e.g., - @rexense instead of - '@rexense').


23-25: Surround “## High-level description” with blank lines
Add an empty line before and after this heading to comply with markdownlint MD022 and improve readability.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

23-23: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


42-45: Surround “## Configuration options” with blank lines
Insert an empty line above line 42 and below line 45 so the heading and include are separated from surrounding text (MD022).


46-48: Surround “## WebSocket push updates” with blank lines
Add a blank line before and after this heading to satisfy MD022.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

46-46: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


49-53: Add blank lines for “## Entities” and “### Sensors”
Place an empty line above ## Entities (line 49) and above ### Sensors (line 51) to meet MD022.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

51-51: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


53-53: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)


53-61: Ensure blank lines around sensor bullet lists
Add an empty line before the list at line 53 and after the list ending at line 58 to adhere to MD032.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

53-53: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)


58-58: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)


62-65: Surround “## Removal instructions” and include with blank lines
Insert an empty line before the heading on line 62 and after the include on line 64 to comply with MD022/MD031.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6dfacc1 and 264ac36.

📒 Files selected for processing (1)
  • source/_integrations/rexense.markdown (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
source/_integrations/rexense.markdown

23-23: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


26-26: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


27-27: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)


29-29: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


32-32: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


46-46: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


51-51: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


53-53: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)


58-58: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)

⏰ 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

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 (3)
source/_integrations/rexense.markdown (3)

23-24: Align heading with documentation standards
Home Assistant docs generally use "Overview" for this section.

-## High-level description
+## Overview

32-32: Remove trailing spaces
There are trailing spaces on this blank line. Removing them will satisfy markdownlint.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

32-32: Trailing spaces
Expected: 0 or 2; Actual: 3

(MD009, no-trailing-spaces)


48-49: Condense multiple blank lines
There are two consecutive blank lines here; collapse to a single blank line to adhere to markdown style.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

49-49: Multiple consecutive blank lines
Expected: 1; Actual: 2

(MD012, no-multiple-blanks)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 264ac36 and 1cd17a2.

📒 Files selected for processing (1)
  • source/_integrations/rexense.markdown (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
source/_integrations/rexense.markdown

32-32: Trailing spaces
Expected: 0 or 2; Actual: 3

(MD009, no-trailing-spaces)


49-49: Multiple consecutive blank lines
Expected: 1; Actual: 2

(MD012, no-multiple-blanks)

⏰ 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 (6)
source/_integrations/rexense.markdown (6)

1-19: Frontmatter metadata looks correct
The integration metadata (title, description, category, platforms, codeowners, etc.) adheres to the standard format and covers all necessary fields.


21-26: Introduction is clear and concise
The overview sentence succinctly introduces the Rexense IoT Mesh integration.


27-47: Installation prerequisites are helpful
Including default_config and zeroconf setup guides users on required dependencies before configuring the integration.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

32-32: Trailing spaces
Expected: 0 or 2; Actual: 3

(MD009, no-trailing-spaces)


50-53: Configuration options via config_flow include
Using {% include integrations/config_flow.md %} aligns with standards and avoids duplication of UI configuration steps.


54-57: WebSocket push update instructions are clear
The description of the HTTP-to-WebSocket flow is precise and in line with other integration docs.


74-77: Removal instructions via include are appropriate
Using {% include integrations/remove_device_service.md %} follows the pattern used by other integrations and prevents duplication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has-parent This PR has a parent PR in a other repo in-progress This PR/Issue is currently being worked on needs-rebase The PR has been branched of the wrong base branch or targets an incorrect target branch new-integration This PR adds documentation for a new Home Assistant integration next This PR goes into the next branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants