Battery dies in 2–4 years. Replacing it yourself usually won't void the warranty.

Most robotic pool cleaner batteries last 2 to 4 years. The exact number depends on how often you run it, your pool temperature, and whether you let it charge fully after every cycle. Hot climates and hard daily use will kill it closer to the 2-year mark. If you only run it on weekends, you might squeeze out 5.

Now, the warranty part: yes, you can replace the battery yourself without voiding it — on most brands — if you follow the manual and use a genuine or manufacturer-approved battery