- ${stateObj.attributes.temperature}
- ${getWeatherUnit(this.hass, "temperature")}
+ ${UNAVAILABLE_STATES.includes(stateObj.state)
+ ? this.hass.localize(`state.default.${stateObj.state}`) ||
+ stateObj.state
+ : html`
+ ${stateObj.attributes.temperature}
+ ${getWeatherUnit(this.hass, "temperature")}
+ `}
- ${this._getSecondaryAttribute(stateObj)}
+ ${!UNAVAILABLE_STATES.includes(stateObj.state)
+ ? this._getSecondaryAttribute(stateObj)
+ : ""}