mirror of
https://github.com/home-assistant/frontend.git
synced 2025-08-02 14:07:55 +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-changed"
|
||||||
| "last-triggered"
|
| "last-triggered"
|
||||||
| "position"
|
| "position"
|
||||||
| "tilt-position";
|
| "tilt-position"
|
||||||
|
| "brightness";
|
||||||
action_name?: string;
|
action_name?: string;
|
||||||
service?: string;
|
service?: string;
|
||||||
service_data?: object;
|
service_data?: object;
|
||||||
|
@ -122,6 +122,11 @@ class HuiGenericEntityRow extends LitElement {
|
|||||||
? `${this.hass.localize("ui.card.cover.tilt_position")}: ${
|
? `${this.hass.localize("ui.card.cover.tilt_position")}: ${
|
||||||
stateObj.attributes.current_tilt_position
|
stateObj.attributes.current_tilt_position
|
||||||
}`
|
}`
|
||||||
|
: this.config.secondary_info === "brightness" &&
|
||||||
|
stateObj.attributes.brightness
|
||||||
|
? html`${Math.round(
|
||||||
|
(stateObj.attributes.brightness / 255) * 100
|
||||||
|
)}%`
|
||||||
: "")}
|
: "")}
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user