Add 'brightness' as a secondary_info option (#5731)

This commit is contained in:
Ian Richardson
2020-05-12 11:29:43 -05:00
committed by GitHub
parent 96ab057853
commit 845511e322
2 changed files with 7 additions and 1 deletions

View File

@@ -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>
`