ESPHome sesnor - change update interval from Home Assistant

I have an Ultrasonic sensor for measuring the quantity of heating oil in a tank.

Update time is 1h but for deliveries, I’d like to be able to change to 1 second it from Home Assistant when the delivery is taking place and then revert back when the delivery is complete.

Have an input_boolean in Home Assistant that controls the update_interval would be the way to go.

Is this possible? If so, where do I start?

My sensor is set up thus:

  - platform: ultrasonic
    trigger_pin: D1
    echo_pin: D2
    timeout: 1.5m
    name: "Oil level in litres"
    accuracy_decimals: 0
    update_interval: 1h
    filters:
    - sliding_window_moving_average:
        window_size: 15
        send_every: 15
    - lambda: return (1.25-x)*100*44;
    on_value_range:
      above: 1.08 # 750 litres 
      below: 0.9 # 1500 litres
      then:
        - switch.turn_on: oil_re_order