Conversation
| interface Config extends LovelaceElementConfig { | ||
| entity?: string; | ||
| title?: string; | ||
| noTitle?: boolean; |
There was a problem hiding this comment.
camelcase is inconsistent with how we define all other configuration options. I think show_tooltip is a better descriptor.
There was a problem hiding this comment.
Ooops.
show is the default behavior so I don't want to change that. I changed it to hide_title.
There was a problem hiding this comment.
show is the common phrase currently used for things like this. e.g. https://www.home-assistant.io/lovelace/picture-entity/#show_name
There was a problem hiding this comment.
We should just allow setting title to null to indicate no title should be shown.
There was a problem hiding this comment.
Didn't think that was such good practice. Anyway it's easier so done.
| tooltip += `Navigate to ${config.navigation_path}`; | ||
| tooltip += `${hass.localize( | ||
| "ui.panel.lovelace.cards.picture-elements.navigate_to" | ||
| )} ${config.navigation_path}`; |
There was a problem hiding this comment.
Don't concatenate strings. Instead the localization string should have a placeholder.
| "picture-elements": { | ||
| "hold": "Hold:", | ||
| "tap": "Tap:", | ||
| "navigate_to": "Navigate to", |
There was a problem hiding this comment.
| "navigate_to": "Navigate to", | |
| "navigate_to": "Navigate to {location}", |
Added a way to suppress the UGLY tooltips in picture-elements.
Also added localization for the existing tooltips.
The docs on the current ability to specify a tooltip is lacking (only there for icon element).
I will fix this and also add docs on the new noTitle option.
After this PR is approved...