Complete Pool Automation Package - Seasonal Schedules, Manual Override & Energy Monitoring

:swimming_man: Complete Pool Automation Package for Home Assistant

I’ve created a comprehensive pool automation package that I’ve been using successfully for [tiempo que lo usas]. Thought I’d share it with the community!

:star2: What it Does

This package provides complete automation for pool management with:

  • Three Operating Modes:

    • OFF: Pump always off
    • Manual: Full manual control with automatic timeout back to automatic
    • Automatic: Schedule-based operation with different schedules for summer/winter
  • Smart Manual Override: The system automatically detects when you manually toggle the pump and switches to Manual mode. After a configurable timeout (default 24h), it returns to Automatic mode.

  • Seasonal Schedules: Define different pump schedules for swimming season vs off-season. The system automatically detects which season you’re in and applies the correct schedule.

  • Pool Lighting: Automatic control based on sunset + configurable offset and duration.

  • Energy Monitoring: Track daily, monthly, and yearly consumption with built-in utility meters.

:camera_flash: Screenshots

[Sube aquí tus screenshots desde tu carpeta]

Dashboard showing the three operating modes

Manual mode with real-time countdown timer

Energy monitoring and consumption tracking

:rocket: Installation

The package uses Home Assistant’s package system for easy installation:

  1. Enable packages in your configuration.yaml:
   homeassistant:
     packages: !include_dir_named packages
  1. Download piscina.yaml from the repository

  2. Update entity IDs to match your devices

  3. Restart Home Assistant

Full installation guide: ha-pool-automation/README.md at main · rgmerys/ha-pool-automation · GitHub

:wrench: Technical Highlights

Some interesting technical solutions in this package:

  • Timezone handling: Solved the common “offset-naive and offset-aware datetimes” error
  • Modern trigger syntax: Uses trigger: instead of legacy platform:
  • Real-time countdown: Template sensor that updates every minute showing time remaining in manual mode
  • Auto-rollover dates: Season dates automatically update to next year when season ends

:bug: Known Issues (and Solutions)

During development, I encountered and solved several common issues:

  1. “undefined is not an object” error: Fixed by updating trigger syntax
  2. Time remaining shows unavailable: Fixed with proper timezone handling
  3. Dates showing 1/1/1970: Use template sensors instead of input_datetime directly

All solutions are documented in the troubleshooting guide.

:package: What’s Included

  • Complete package file with all helpers, templates, and automations
  • Dashboard configuration example
  • Comprehensive troubleshooting guide (English/Spanish)
  • Contribution guidelines
  • MIT License (free to use and modify)

:link: Links

:pray: Feedback Welcome

I’ve tested this extensively in my setup, but would love feedback from the community. If you try it out:

  • Let me know how it works for you
  • Report any issues on GitHub
  • Suggestions for improvements are welcome
  • Pull requests appreciated!

:clipboard: Requirements

  • Home Assistant 2024.12+
  • Smart switch for pool pump
  • Smart switch for pool light (optional)
  • Energy monitoring device (optional)

Questions? Issues? Improvements? Feel free to comment below or open an issue on GitHub!

3 Likes

TLDR: Does it support Southern Hemisphere seasons? Asking for my Aussie mate who might be interested.

Yes, it’s fully compatible with Southern Hemisphere!

The system uses configurable dates that YOU define - it’s not tied to calendar seasons. The labels “Verano” (Summer) and “Fuera de temporada” (Off-season) are just names.

For Southern Hemisphere (e.g., Chile, Argentina, Australia):

  • Set season start: October 1st (your swimming season begins)
  • Set season end: March 31st (your swimming season ends)

The system handles year boundaries automatically (Oct 2025 → Mar 2026), so it works perfectly regardless of hemisphere.

You can also customize the labels by editing the template sensor if you prefer different terminology. Let me know if you need help with that!

Thanks for clarifying.