Code for rain gaude over PCF8574 expander

I would like to connect a rain gauge from WH1080 via expander PCF8574. Does anyone have a code, please, how to program such a rain gauge? I had this code, but when it flipped, arduino sent me a flip 2x :frowning:

  pinMode(RAIN_PIN,INPUT_PULLUP); // přerušování ze srážkoměru
  attachInterrupt(digitalPinToInterrupt(RAIN_PIN), rain_sum, RISING); // detekce přerušení