-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Update entity naming convention for Shelly #39091
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: next
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for home-assistant-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughThe documentation for the Shelly integration was revised to provide clearer and more detailed explanations of entity naming conventions for both generation 1 and generation 2+ devices. The update introduces structured rules, hierarchical naming logic, and expanded examples to clarify how device and entity names are determined, especially for multi-relay devices. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Shelly Device
participant Integration
User->>Shelly Device: Configure Device Name, Channel Name(s)
Shelly Device->>Integration: Expose Device Info (Device Name, Device ID, Channel Names)
Integration->>Integration: Determine if device is Gen1 or Gen2+
alt Single-Relay Device
Integration->>Integration: Assign Main Device Name and Entity Name based on rules
else Multi-Relay Device
Integration->>Integration: Create Sub-Devices for each relay
Integration->>Integration: Assign Main Device Name, Sub-Device Name, Entity Name(s) based on rules
end
Integration-->>User: Display devices and entities with generated names
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 30th. To opt out, configure 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (3)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (6)
source/_integrations/shelly.markdown (6)
139-144
: Clarify “channel/relay number” fallback
The multi-relay bullets correctly cover the naming logic. To avoid any ambiguity around “channel/relay number,” consider adding a brief parenthetical (e.g., “Channel 1, Channel 2, …”) so readers know exactly how those numbers appear in the UI.
148-153
: Unify “Not set” capitalization in examples
The table rows mix “Not set” and “Not Set.” Standardize on one casing (prefer “Not set”) across all cells for consistency.
163-167
: Explicitly state default‐suffix behavior for gen2 single-relay
You’ve documented how a setChannel Name
is appended. It would be helpful to add a bullet noting that when no channel name is provided, no suffix is added to entity names—preventing any potential confusion.
171-176
: Align column header terminology
The single-relay gen2 table uses “Integration Device Name,” whereas gen1 uses “Main Device Name.” Either unify the header labels or include a short note explaining the different terminology to avoid reader confusion.
178-183
: Differentiate custom vs. default channel names
The bullets split “Channel Name is set” and “Channel Name is set to the default value.” Consider merging into one bullet or clearly defining what the default name is (e.g., “Channel 1”) to streamline the logic.
187-192
: Consistent header labels for gen2 multi-relay table
In the multi-relay gen2 table the header reverts to “Main Device Name” after using “Integration Device Name” earlier. For consistency, pick one term or add a note to explain why they differ.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
source/_integrations/shelly.markdown
(2 hunks)
🔇 Additional comments (1)
source/_integrations/shelly.markdown (1)
134-137
: Clear explanation of single-relay naming strategy
The new paragraph concisely describes how single-relay (or no-relay) devices fall back to either theDevice Name
orDevice ID
. This aligns well with Home Assistant’s documentation style.
Proposed change
Type of change
current
branch).current
branch).next
branch).next
branch).Additional information
Checklist
current
branch.next
branch.Summary by CodeRabbit