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!
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.
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
Installation
The package uses Home Assistant’s package system for easy installation:
- Enable packages in your
configuration.yaml:
homeassistant:
packages: !include_dir_named packages
-
Download
piscina.yamlfrom the repository -
Update entity IDs to match your devices
-
Restart Home Assistant
Full installation guide: ha-pool-automation/README.md at main · rgmerys/ha-pool-automation · GitHub
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 legacyplatform: - 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
Known Issues (and Solutions)
During development, I encountered and solved several common issues:
- “undefined is not an object” error: Fixed by updating trigger syntax
- Time remaining shows unavailable: Fixed with proper timezone handling
- Dates showing 1/1/1970: Use template sensors instead of input_datetime directly
All solutions are documented in the troubleshooting guide.
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)
Links
- GitHub Repository: GitHub - rgmerys/ha-pool-automation: Complete pool automation package for Home Assistant
- Installation Guide: ha-pool-automation/README.md at main · rgmerys/ha-pool-automation · GitHub
- Troubleshooting: ha-pool-automation/TROUBLESHOOTING.md at ea27458cb54c7ea3a90ac4edc4ce90e621d79b8e · rgmerys/ha-pool-automation · GitHub
- Report Issues: GitHub · Where software is built
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!
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!