mirror of
https://github.com/home-assistant/frontend.git
synced 2025-08-01 13:37:47 +00:00
Add 'brightness' as a secondary_info option (#5731)
This commit is contained in:
parent
96ab057853
commit
845511e322
@ -34,7 +34,8 @@ export interface EntitiesCardEntityConfig extends EntityConfig {
|
||||
| "last-changed"
|
||||
| "last-triggered"
|
||||
| "position"
|
||||
| "tilt-position";
|
||||
| "tilt-position"
|
||||
| "brightness";
|
||||
action_name?: string;
|
||||
service?: string;
|
||||
service_data?: object;
|
||||
|
@ -122,6 +122,11 @@ class HuiGenericEntityRow extends LitElement {
|
||||
? `${this.hass.localize("ui.card.cover.tilt_position")}: ${
|
||||
stateObj.attributes.current_tilt_position
|
||||
}`
|
||||
: this.config.secondary_info === "brightness" &&
|
||||
stateObj.attributes.brightness
|
||||
? html`${Math.round(
|
||||
(stateObj.attributes.brightness / 255) * 100
|
||||
)}%`
|
||||
: "")}
|
||||
</div>
|
||||
`
|
||||
|
Loading…
x
Reference in New Issue
Block a user