-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Update map.markdown for icon mode #36465
Conversation
✅ Deploy Preview for home-assistant-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
📝 WalkthroughWalkthroughThe pull request updates the documentation for the map card in the dashboard, focusing on the Changes
Sequence DiagramsequenceDiagram
participant User as User
participant MapCard as Map Card
participant Entity as Map Entity
User->>MapCard: Configure label_mode
alt label_mode = icon
MapCard->>Entity: Render entity icon
else label_mode = state
MapCard->>Entity: Render entity state
else default
MapCard->>Entity: Render entity name
end
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 (2)
source/_dashboards/map.markdown (2)
149-150
: Remove trailing spaces.There are trailing spaces at the end of these lines that should be removed.
- description: When set to `icon`, renders the geolocation entity's icon in the marker instead of text. When set to `state`, renders the entity's state as the label for the map marker instead of the entity's name. - type: string + description: When set to `icon`, renders the geolocation entity's icon in the marker instead of text. When set to `state`, renders the entity's state as the label for the map marker instead of the entity's name. + type: string🧰 Tools
🪛 Markdownlint (0.37.0)
149-149: Expected: 0 or 2; Actual: 1
Trailing spaces(MD009, no-trailing-spaces)
150-150: Expected: 0 or 2; Actual: 4
Trailing spaces(MD009, no-trailing-spaces)
Line range hint
1-1
: Consider adding an example with the new icon mode.The documentation would benefit from an example that demonstrates the new
icon
mode for both entities and geolocation sources. This would help users better understand how to implement this new feature.Consider adding an example like this:
type: map entities: - entity: device_tracker.demo_paulus label_mode: icon geo_location_sources: - source: nsw_rural_fire_service_feed label_mode: icon
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
source/_dashboards/map.markdown
(2 hunks)
🧰 Additional context used
🪛 Markdownlint (0.37.0)
source/_dashboards/map.markdown
149-149: Expected: 0 or 2; Actual: 1
Trailing spaces
(MD009, no-trailing-spaces)
150-150: Expected: 0 or 2; Actual: 4
Trailing spaces
(MD009, no-trailing-spaces)
🔇 Additional comments (3)
source/_dashboards/map.markdown (3)
128-128
: LGTM! Clear documentation for the new icon mode.
The updated description clearly explains both the new icon
mode and existing state
mode, with a helpful note about zone entities.
146-150
: LGTM! Well-documented geolocation label modes.
The documentation for geolocation sources' label_mode
is clear and consistent with the entity configuration.
🧰 Tools
🪛 Markdownlint (0.37.0)
149-149: Expected: 0 or 2; Actual: 1
Trailing spaces
(MD009, no-trailing-spaces)
150-150: Expected: 0 or 2; Actual: 4
Trailing spaces
(MD009, no-trailing-spaces)
Line range hint 1-1
: Verify documentation matches frontend implementation.
Since this documentation update corresponds to frontend changes in PR #23247, let's verify the alignment between documentation and implementation.
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.
Thanks, @karwosts 👍
../Frenck
Proposed change
Document new options for
label_mode
for map card.Type of change
current
branch).current
branch).next
branch).next
branch).Additional information
Checklist
current
branch.next
branch.Summary by CodeRabbit
New Features
label_mode
option for geolocation sources, allowing users to choose between displaying an icon or state as the marker label.Documentation
label_mode
option in entity configuration for improved clarity on its functionality.