How to avoid displaying the temperature as zero when it's just not there?

I’m using pywws to read out a weather station and send the readings to Home Assistant’s MQTT add-on. The MQTT sent looks like this:

{
    "idx": "2022-12-01 14:53:31",
    "hum_in": "53",
    "temp_in_c": "20.0",
    "pressure_rel_hpa": "1019.8",
    "pressure_abs_hpa": "945.1",
    "rain_mm": "268.5",
    "rain_last_hour_mm": "0.0",
    "rain_last_24hours_mm": "0.0",
    "rain_day_mm": "0.0"
}

As you can see, there’s no temp_out_c, as the indoor unit doesn’t always have a connection to the outdoor unit. So when it doesn’t have a fresh reading, it just doesn’t send it. Fair enough.

Not receiving a value seems to not trigger a zero - this is the history graph for this entity:

No zeros there - just time intervals with no reading. But in the “Sensor” card, it looks like this:

billede

Which is funny, since no zero was ever sent.

How can I make this card just display the last received value if it doesn’t have an up-to-date one?

EDIT: It occurred to me that the sensor configuration might be of interest, so here it is:

mqtt:
  sensor:
    - name: "Weatherstation Outside temperature"
      state_topic: "weather/pywws"
      payload_available: "online"
      payload_not_available: "offline"
      json_attributes_topic: "weather/pywws"
      unit_of_measurement: "°C"
      value_template: "{{value_json.temp_out_c}}"
    - name: "Weatherstation Inside temperature"
      state_topic: "weather/pywws"
      payload_available: "online"
      payload_not_available: "offline"
      json_attributes_topic: "weather/pywws"
      unit_of_measurement: "°C"
      value_template: "{{value_json.temp_in_c}}"
    - name: "Weatherstation Inside humidity"
      state_topic: "weather/pywws"
      payload_available: "online"
      payload_not_available: "offline"
      json_attributes_topic: "weather/pywws"
      unit_of_measurement: "%"
      value_template: "{{value_json.hum_in}}"
    - name: "Weatherstation Outside humidity"
      state_topic: "weather/pywws"
      payload_available: "online"
      payload_not_available: "offline"
      json_attributes_topic: "weather/pywws"
      unit_of_measurement: "%"
      value_template: "{{value_json.hum_out}}"
    - name: "Weatherstation Relative pressure"
      state_topic: "weather/pywws"
      payload_available: "online"
      payload_not_available: "offline"
      json_attributes_topic: "weather/pywws"
      unit_of_measurement: "hPa"
      value_template: "{{value_json.pressure_rel_hpa}}"
    - name: "Weatherstation Absolute pressure"
      state_topic: "weather/pywws"
      payload_available: "online"
      payload_not_available: "offline"
      json_attributes_topic: "weather/pywws"
      unit_of_measurement: "hPa"
      value_template: "{{value_json.pressure_abs_hpa}}"
    - name: "Weatherstation Rain"
      state_topic: "weather/pywws"
      payload_available: "online"
      payload_not_available: "offline"
      json_attributes_topic: "weather/pywws"
      unit_of_measurement: "mm"
      value_template: "{{value_json.rain_mm}}"