diff --git a/src/panels/lovelace/cards/hui-tile-card.ts b/src/panels/lovelace/cards/hui-tile-card.ts index ae8374e991..5857f6cb8a 100644 --- a/src/panels/lovelace/cards/hui-tile-card.ts +++ b/src/panels/lovelace/cards/hui-tile-card.ts @@ -41,6 +41,7 @@ import { import { isUnavailableState } from "../../../data/entity"; import { FanEntity, computeFanSpeedStateDisplay } from "../../../data/fan"; import type { HumidifierEntity } from "../../../data/humidifier"; +import type { ClimateEntity } from "../../../data/climate"; import type { LightEntity } from "../../../data/light"; import type { ActionHandlerEvent } from "../../../data/lovelace"; import { SENSOR_DEVICE_CLASS_TIMESTAMP } from "../../../data/sensor"; @@ -239,6 +240,20 @@ export class HuiTileCard extends LitElement implements LovelaceCard { } } + if (domain === "climate") { + const current_temperature = (stateObj as ClimateEntity).attributes + .current_temperature; + if (current_temperature) { + const formattedCurrentTemperature = + this.hass!.formatEntityAttributeValue( + stateObj, + "current_temperature", + current_temperature + ); + return `${stateDisplay} βΈ± ${formattedCurrentTemperature}`; + } + } + return stateDisplay; }