Consistent blank before "%" (#8366)

This commit is contained in:
Philip Allgaier 2021-03-07 23:05:20 +01:00 committed by GitHub
parent b71f452795
commit c8ea37eec0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 11 additions and 11 deletions

View File

@ -28,7 +28,7 @@ class SupervisorMetric extends LitElement {
</span>
<div slot="description" .title=${this.tooltip ?? ""}>
<span class="value">
${roundedValue}%
${roundedValue} %
</span>
<ha-bar
class="${classMap({

View File

@ -154,8 +154,8 @@ class HassioHostInfo extends LitElement {
)}
</span>
<span slot="description">
${this.supervisor.host.disk_life_time - 10}% -
${this.supervisor.host.disk_life_time}%
${this.supervisor.host.disk_life_time - 10} % -
${this.supervisor.host.disk_life_time} %
</span>
</ha-settings-row>`
: ""}

View File

@ -101,7 +101,7 @@ class HaClimateState extends LitElement {
)}-${formatNumber(
this.stateObj.attributes.target_humidity_high,
this.hass!.language
)}%`;
)} %`;
}
if (this.stateObj.attributes.humidity != null) {

View File

@ -123,7 +123,7 @@ class MoreInfoVacuum extends LitElement {
<div>
<span>
<ha-icon .icon=${stateObj.attributes.battery_icon}></ha-icon>
${stateObj.attributes.battery_level}%
${stateObj.attributes.battery_level} %
</span>
</div>
`

View File

@ -226,7 +226,7 @@ export class HaConfigDevicePage extends LitElement {
batteryState
? html`
<div class="battery">
${batteryIsBinary ? "" : batteryState.state + "%"}
${batteryIsBinary ? "" : batteryState.state + " %"}
<ha-battery-icon
.hass=${this.hass!}
.batteryStateObj=${batteryState}

View File

@ -283,8 +283,8 @@ export class HaConfigDeviceDashboard extends LitElement {
title: this.hass.localize("ui.panel.config.devices.data_table.battery"),
sortable: true,
type: "numeric",
width: narrow ? "90px" : "15%",
maxWidth: "90px",
width: narrow ? "95px" : "15%",
maxWidth: "95px",
template: (batteryEntityPair: DeviceRowData["battery_entity"]) => {
const battery =
batteryEntityPair && batteryEntityPair[0]
@ -298,7 +298,7 @@ export class HaConfigDeviceDashboard extends LitElement {
battery && computeStateDomain(battery) === "binary_sensor";
return battery && (batteryIsBinary || !isNaN(battery.state as any))
? html`
${batteryIsBinary ? "" : battery.state + "%"}
${batteryIsBinary ? "" : battery.state + " %"}
<ha-battery-icon
.hass=${this.hass!}
.batteryStateObj=${battery}

View File

@ -129,7 +129,7 @@ class HuiGenericEntityRow extends LitElement {
stateObj.attributes.brightness
? html`${Math.round(
(stateObj.attributes.brightness / 255) * 100
)}%`
)} %`
: "")}
</div>
`

View File

@ -52,7 +52,7 @@ class HuiHumidifierEntityRow extends LitElement implements LovelaceRow {
.config=${this._config}
.secondaryText=${stateObj.attributes.humidity
? `${this.hass!.localize("ui.card.humidifier.humidity")}:
${stateObj.attributes.humidity}%${
${stateObj.attributes.humidity} %${
stateObj.attributes.mode
? ` (${
this.hass!.localize(