-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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 docs of Markdown card to reflect show_empty functionality #33720
Update docs of Markdown card to reflect show_empty functionality #33720
Conversation
It seems that this PR is targeted against an incorrect branch. Documentation updates which apply to our current stable release should target the |
WalkthroughWalkthroughA new configuration option Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Dashboard
participant Config
User->>Dashboard: Initialize dashboard
Dashboard->>Config: Read show_empty setting
alt show_empty is true
Dashboard-->>User: Display empty card
else show_empty is false
Dashboard-->>User: Hide empty card
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 as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
✅ Deploy Preview for home-assistant-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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: 1
Outside diff range, codebase verification and nitpick comments (1)
source/_dashboards/markdown.markdown (1)
58-59
: Improve the description clarity.The description should be clearer and start with an uppercase letter. Consider rephrasing for better readability.
- description: By default, an empty card will still be shown (resulting in a small empty box). Setting this to `true`, hides that empty card instead. + description: By default, an empty card will still be shown (resulting in a small empty box). Setting this to `true` hides the empty card instead.Tools
LanguageTool
[typographical] ~59-~59: This sentence does not start with an uppercase letter.
Context: ...true`, hides that empty card instead. default: true type: string {% endconfiguratio...(UPPERCASE_SENTENCE_START)
@coderabbitai review |
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
Outside diff range, codebase verification and nitpick comments (1)
source/_dashboards/markdown.markdown (1)
58-58
: Correct the typographical error.The description should start with an uppercase letter.
- description: By default, an empty card will still be shown (resulting in a small empty box). Setting this to `false`, hides that empty card instead. + description: By default, an empty card will still be shown (resulting in a small empty box). Setting this to `false`, hides that empty card instead.
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.
Thank you, @illuzn 👍
Proposed change
This documents the implementation of
show_empty: true/ false
functionality for the markdown card. The functionality is similar to the entity filter card.This resolves a requested feature here (https://www.reddit.com/r/homeassistant/comments/y2nwz0/hide_markdown_card_if_empty/) for which there are no appropriate solutions.
It is possible using templates to create conditions which far exceed the capability of the conditional card or the "visibility" settings of cards so this functionality is required. For example, you currently cannot toggle visibility based on an attribute of a card currently.
The workaround suggested in that reddit thread (using a template sensor and outputting to state) isn't appropriate because the text output from a markdown card can exceed the maximum of 255 characters.
There is no existing translation in the entity filter card for "show_empty" so the visual editor couldn't be implmented in this case.
By default, the existing behaviour is kept i.e. an empty card is shown which results in a small empty box.
Type of change
current
branch).current
branch).next
branch).next
branch).Additional information
Checklist
next
branch.Summary by CodeRabbit
show_empty
to control the visibility of empty cards in dashboards. By default, empty cards are displayed (true
), but this can be set tofalse
to hide them.