Water Pump Setup (Urgent)

I have a water level sensor and weather forecast in my home assistant.

I want to add a water pump so that when there is a rainfall event, the pump will half empty the rainwater tank. But the pump is at another location.

Is there a way to connect the IP address of the pump to home assistant to control it?

Thanks