-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add secondary info type option to Tile card #16661
Add secondary info type option to Tile card #16661
Conversation
It seems you haven't yet signed a CLA. Please do so here. Once you do that we will be able to review and accept this pull request. Thanks! |
@@ -256,6 +282,9 @@ export class HuiTileCardEditor | |||
`ui.panel.lovelace.editor.card.tile.${schema.name}` | |||
); | |||
|
|||
case "secondary_info_type": | |||
return "Secondary info type"; |
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.
This should be translated/localized
I think the YAML parameter should be just Also in the non-tiles we have more secondary info options. Shouldn't those then also exist in the title cards? |
@spacegaier Good call, I'll add more of the expected secondary options and localize it using the strings from the existing tags. |
Hi ! Here's the proposal Allow array of options for secondary_info:
- state
- preset_mode
- temperature It will display : As it's a bigger feature, I will make a PR for that proposal. |
Proposed change
This PR provides an optional setting to the Tile card where a user can hide the state value. This is useful for Entities like Buttons where the state is often not useful information, or for navigational elements.
This PR by default keeps the state information shown, so existing dashboards should remain unaffected.
To expand on this feature, and the reason the UX is a dropdown, is I think adding template support or manual overrides for the secondary information in the Tile could be a great next addition! These additional options can be slotted into the dropdown.
Type of change
Example configuration
Show state
Show none
UI Configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed:
TODO: Branch made here, will make PR once this PR is approved (unless there's a different process here).