Skip to content

Commit

Permalink
fix: round watts to 1 decimal place (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
ulic75 authored May 10, 2022
1 parent c35f6d6 commit 2606dbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/power-flow-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export class PowerFlowCard extends LitElement {
private displayValue = (value: number) =>
value >= coerceNumber(this._config?.watt_threshold, 0)
? `${roundValue(value / 1000, 1)} kW`
: `${value} W`;
: `${roundValue(value, 1)} W`;

protected render(): TemplateResult {
if (!this._config || !this.hass) {
Expand Down

0 comments on commit 2606dbd

Please sign in to comment.