How can i ignore some wierd numbers?

I’m using multiscrape to get wave height data from a nearby buoy for a dashboard used by my RNLI station. Periodically one of the numbers goes haywire and i’m not sure how best to ignore it. The history looks like this over the last 2 weeks


with heights being updated every half hr typically.
Is there a simple trick to keep the last value if the new one is this atypical?
The scraper is

    - name: Waves scraper
    resource: https://coastalmonitoring.org/realtimedata/index.php?chart=97&tab=ld&disp_option=
    scan_interval: 900
    button:
      - unique_id: waves_data
        name: Waves data refresh
    sensor:
      - unique_id: waves_location
        name: waves_location
        select: "#placename"
        value_template: '{{+ value+" waves "}}'
      - unique_id: waves_datime
        name: waves_datime
        select_list: "table > tr:nth-child(3) > th:nth-child(2)"
        value_template: '{{ strptime(value+"+0000","%d-%m-%Y %H:%M%z") }}'
      - unique_id: waves_height
        name: waves_height
        select: "table > tr:nth-child(6) > td:nth-child(2)"
        state_class: measurement
        icon: mdi:wave
        unit_of_measurement: m
      - unique_id: waves_max_height
        name: waves_max_height
        select: "table > tr:nth-child(7) > td:nth-child(2)"
        state_class: measurement
        unit_of_measurement: m
        icon: mdi:waves-arrow-up