ESPHome water level sensor gone bad, what to do?

Hi All

I have an above-ground pool, we take it down every winter, and put it up every summer.
I’ve added a water level sensor that I put into the skimmer, with two simple sensors like these:

I detach the sensors during winter (I’ve added a waterproof three wire plug so I can detach it) as the sensors are mounted in the skimmer, and the skimmer is permanent in the lining which we stow.

Suddenly this winter, it started reporting water level too low or too high.
.I opened up the box, and went through everything, and there was a completely detached piece of wire, and I can’t figure out where it’s supposed to go. But I guess that is something to do with the ‘false’ readings.

My esphome config looks like this:

substitutions:
  device_name: pool
  device_description: 'Pool sensors, temperature and water height'

esphome:
  name: '${device_name}'
  comment: '${device_description}'
  platform: ESP8266
  board: d1_mini_pro

wifi:
  ssid: !secret wifissid
  password: !secret wifipw
  reboot_timeout: 60min
  manual_ip:
    static_ip: 10.11.13.95
    gateway: 10.11.13.1
    subnet: 255.255.255.0
#  use_address: 10.11.12.201
  fast_connect: true
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "${device_name} Hotspot"
    password: !secret appw

# Enable logging
logger:
  baud_rate: 0

# Enable Home Assistant API
api:
  password: !secret apipw
#  encryption:
#    key: !secret encryption

ota:
  password: !secret otapw

#web_server:
#  port: 80
#  auth:
#    username: !secret webuser
#    password: !secret webpw

text_sensor:
  - platform: version
    name: '${device_name} ESPHome Version'
  - platform: wifi_info
    ip_address:
      name: '${device_name} ip'
    ssid:
      name: '${device_name} ssid'

time:
  - platform: homeassistant
    id: homeassistant_time
    
dallas:
  - pin: D5
  
sensor:
  - platform: dallas
    address: 0xD801144ED12FAA28
    name: '${device_name} Temperature'
  - platform: wifi_signal
    name: '${device_name} WiFi Signal'
    update_interval: 60s
    accuracy_decimals: 0
  - platform: uptime
    name: '${device_name} Uptime'
    unit_of_measurement: days
    update_interval: 300s
    accuracy_decimals: 1
    filters:
      - multiply: 0.000011574

binary_sensor:
  - platform: gpio
    filters:
      - delayed_on: 1s
    pin:
      number: D1
      mode: INPUT_PULLUP
      inverted: True
    name: "Water too low"
    device_class: problem
  - platform: gpio
    filters:
      - delayed_on: 1s
    pin:
      number: D2
      mode: INPUT_PULLUP
      inverted: True
    name: "Water too high"
    device_class: problem

Anybody that can figure out what is wrong here, and why it is affected by cold and humidity??