Revise solar-consumed energy dashboard card tooltip, fix typos (#10052)

This commit is contained in:
Will Adler 2021-09-20 06:51:47 -04:00 committed by GitHub
parent 53b26a43c0
commit bab1e6a95f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,11 +77,11 @@ class HuiEnergySolarGaugeCard
let value: number | undefined;
if (productionReturnedToGrid !== null && totalSolarProduction) {
const cosumedSolar = Math.max(
const consumedSolar = Math.max(
0,
totalSolarProduction - productionReturnedToGrid
);
value = (cosumedSolar / totalSolarProduction) * 100;
value = (consumedSolar / totalSolarProduction) * 100;
}
return html`
@ -91,12 +91,13 @@ class HuiEnergySolarGaugeCard
<ha-svg-icon id="info" .path=${mdiInformation}></ha-svg-icon>
<paper-tooltip animation-delay="0" for="info" position="left">
<span>
This card represents how much of the solar energy was used by
your home and was not returned to the grid.
This card indicates how much of the solar energy you produced
was used by your home instead of being returned to the grid.
<br /><br />
If you frequently produce more than you consume, try to
conserve this energy by installing a battery or buying an
electric car to charge.
If this number is typically very low, indicating excess solar
production, you might want to consider charging a home battery
or electric car from your solar panels at times of high solar
production.
</span>
</paper-tooltip>
<ha-gauge
@ -109,11 +110,11 @@ class HuiEnergySolarGaugeCard
"--gauge-color": this._computeSeverity(value),
})}
></ha-gauge>
<div class="name">Self consumed solar energy</div>
<div class="name">Self-consumed solar energy</div>
`
: totalSolarProduction === 0
? "You have not produced any solar energy"
: "Self consumed solar energy couldn't be calculated"}
: "Self-consumed solar energy couldn't be calculated"}
</ha-card>
`;
}