From fe93b993dbea55b0a0bce5d35e919b7dda585a28 Mon Sep 17 00:00:00 2001 From: Davide Varricchio <45564538+bannhead@users.noreply.github.com> Date: Mon, 25 Nov 2019 17:42:38 +0100 Subject: [PATCH] Change to thermostat card to reflect step_temp on set-temperature (#4221) * Minor change to thermostat card to reflect step_temp on set-temperature * Corrected indentation * Resolved eslint error --- .../lovelace/cards/hui-thermostat-card.ts | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/panels/lovelace/cards/hui-thermostat-card.ts b/src/panels/lovelace/cards/hui-thermostat-card.ts index 2b4602bc29..e231fe43ce 100644 --- a/src/panels/lovelace/cards/hui-thermostat-card.ts +++ b/src/panels/lovelace/cards/hui-thermostat-card.ts @@ -153,13 +153,22 @@ export class HuiThermostatCard extends LitElement implements LovelaceCard { !this._setTemp ? "" : Array.isArray(this._setTemp) + ? this._stepSize === 1 + ? svg` + ${this._setTemp[0].toFixed()} - + ${this._setTemp[1].toFixed()} + ` + : svg` + ${this._setTemp[0].toFixed(1)} - + ${this._setTemp[1].toFixed(1)} + ` + : this._stepSize === 1 ? svg` - ${this._setTemp[0].toFixed(1)} - - ${this._setTemp[1].toFixed(1)} - ` + ${this._setTemp.toFixed()} + ` : svg` - ${this._setTemp.toFixed(1)} - ` + ${this._setTemp.toFixed(1)} + ` }