Show labels in ObjectSelector overview#51840
Conversation
|
Yea, this can't be the default. Can't think of a great solution right now, but a dedicated translation key would work at least. |
The selector is quite "complex" as is so another field is probably not gonna be an issue. |
a8fcd39 to
8dc75ec
Compare
| ? `${this._computeLabel({ | ||
| name: labelField, | ||
| selector: fields[labelField]?.selector, | ||
| })}: ` |
There was a problem hiding this comment.
The : should really be part of the translation otherwise it won't work in all languages
There was a problem hiding this comment.
I was really trying to avoid another field needed to be translated and instead just have a bool saying if it should display in the overview or not.
I'd think this probably looks ok even to remove : so it would just say Uncompensated value 5?
| const overviewLabels = this.selector.object!.overview_labels || false; | ||
|
|
||
| const labelField = | ||
| preferredLabel || Object.keys(this.selector.object!.fields!)[0]; |
There was a problem hiding this comment.
The ! here is optimistic. fields may be undefined according to the type
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Proposed change
Modify the ObjectSelector (adds new key) to also be able to show the labels in the "overview":

Backend PR: home-assistant/core#170436
Related to: home-assistant/core#147928
Screenshots
Type of change
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed:
To help with the load of incoming pull requests: