A complete Home Assistant integration for the Gardena Smart System, providing comprehensive control and monitoring of your smart garden devices with lightning-fast WebSocket updates and 96% performance improvement.
- โก 96% Performance Boost: Startup time improved from 0.271s to 0.01s
- ๐ Real-time WebSocket Updates: Valve and device status updates within seconds
- ๐ ๏ธ Enhanced Valve Control: Improved reliability and immediate feedback
- ๐ง Better Error Handling: More informative messages and automatic recovery
- ๐ Code Quality Improvements: Cleaner, more maintainable codebase
- ๐ค Robotic Mowers: Full control with scheduling, manual override, and real-time status
- ๐ง Water Control: Smart irrigation and watering with timer management (Enhanced in v1.0.4)
- ๐ฟ Smart Irrigation: Multi-valve systems with individual zone control (Real-time updates)
- ๐ Power Sockets: Smart outlet management with timer functionality
- ๐ Environmental Sensors: Temperature, humidity, light, and soil monitoring
- ๐ Status Monitoring: Device connectivity and operational states
- โฑ๏ธ Real-time Duration Tracking: Live countdown timers for all operations
- ๐ WebSocket Communication: Lightning-fast updates within seconds (Optimized in v1.0.4)
- ๐ OAuth2 Authentication: Secure API connection with improved token management
- ๐ Multi-Language Support: EN, DE, FR, NL, FI, SK, SV, NB
- ๐ฑ Full Home Assistant Integration: Native UI, automations, and notifications
- Open HACS in Home Assistant
- Go to "Integrations"
- Click the three dots in the top right corner
- Select "Custom repositories"
- Add
https://github.com/thecem/gardena-smart-systemas repository - Select "Integration" as category
- Click "Add"
- Search for "Gardena Smart System" and install
- Restart Home Assistant
- Download the latest release from GitHub releases
- Extract the files
- Copy the
custom_components/gardena_smart_systemfolder to your Home Assistantconfig/custom_components/directory - Restart Home Assistant
๐ v1.0.4 Note: This version features significantly improved startup performance and real-time WebSocket updates for instant device status changes.
You need a Gardena Smart System account and API credentials:
- Go to Gardena Developer Portal
- Create an account and register your application
- Note your Client ID and Client Secret
- In Home Assistant, go to Settings โ Devices & Services
- Click Add Integration
- Search for "Gardena Smart System"
- Enter your API credentials:
- Client ID: Your application's client ID
- Client Secret: Your application's client secret
- Follow the OAuth2 authentication flow
- Select your garden locations
- Complete the setup
- Entity Type:
lawn_mower - Features: Start, stop, dock, pause, resume
- Attributes: Battery level, activity, error states, cutting height
- Services:
- Start mowing
- Park until next scheduled task
- Park until further notice
- Override schedule with duration
- Entity Type:
valve - Features: Open/close valves, duration control
- Attributes: Valve activity, remaining time, water flow
- Services:
- Manual watering with duration
- Stop watering
- Cancel override
- Entity Type:
switch - Features: On/off control, timer operations
- Attributes: Power state, activity, remaining time
- Services:
- Turn on/off
- Override with duration
- Cancel override
- Types: Temperature, humidity, light intensity, soil temperature, soil moisture
- Attributes: Real-time values, battery status, signal strength
- Updates: Automatic via WebSocket connection
- Types: Device connectivity, RF link status, error states
- States: Connected/disconnected, online/offline, ok/error
Start mowing operation
service: gardena_smart_system.start_mowing
target:
entity_id: lawn_mower.my_mower
data:
duration: 60 # minutes (optional)Park mower until next scheduled task
service: gardena_smart_system.park_until_next_task
target:
entity_id: lawn_mower.my_mowerStart watering with duration
service: gardena_smart_system.start_watering
target:
entity_id: valve.my_valve
data:
duration: 30 # minutesStop current watering operation
service: gardena_smart_system.stop_watering
target:
entity_id: valve.my_valveThis integration supports all European Gardena Smart System regions:
๐ฉ๐ช Germany | ๐ฆ๐น Austria | ๐จ๐ญ Switzerland | ๐ซ๐ท France | ๐ฎ๐น Italy | ๐ช๐ธ Spain | ๐ณ๐ฑ Netherlands | ๐ง๐ช Belgium | ๐ฑ๐บ Luxembourg | ๐ฌ๐ง United Kingdom | ๐ฎ๐ช Ireland | ๐ฉ๐ฐ Denmark | ๐ธ๐ช Sweden | ๐ณ๐ด Norway | ๐ซ๐ฎ Finland | ๐ต๐ฑ Poland | ๐จ๐ฟ Czech Republic | ๐ธ๐ฐ Slovakia | ๐ญ๐บ Hungary | ๐ธ๐ฎ Slovenia | ๐ญ๐ท Croatia | ๐ง๐ฌ Bulgaria | ๐ท๐ด Romania | ๐ช๐ช Estonia | ๐ฑ๐ป Latvia | ๐ฑ๐น Lithuania
automation:
- alias: "Water garden when hot"
trigger:
- platform: numeric_state
entity_id: sensor.garden_temperature
above: 30
action:
- service: gardena_smart_system.start_watering
target:
entity_id: valve.garden_irrigation
data:
duration: 45automation:
- alias: "Mow after rain"
trigger:
- platform: state
entity_id: binary_sensor.rain_sensor
from: "on"
to: "off"
for: "01:00:00"
action:
- service: gardena_smart_system.start_mowing
target:
entity_id: lawn_mower.robomow
data:
duration: 120Integration not appearing in setup
- Restart Home Assistant after installation
- Check that files are in the correct directory
- Verify HACS installation if using HACS
Authentication failures
- Verify your Client ID and Client Secret
- Check that your Gardena account is active
- Ensure your application is approved in the developer portal
Devices not appearing
- Ensure devices are online in the Gardena app
- Check that devices are assigned to a location
- Restart the integration from Settings โ Devices & Services
WebSocket connection issues
- Check your internet connection
- Verify firewall settings
- The integration automatically reconnects after connection loss
- v1.0.4: Improved WebSocket stability with better error handling and faster reconnection
Enable debug logging to troubleshoot issues:
logger:
default: info
logs:
custom_components.gardena_smart_system: debugThis project includes a complete development environment using VS Code Dev Containers. The devcontainer provides:
- Pre-configured Environment: Debian GNU/Linux 12 (bookworm) with all necessary tools
- Python Development: Python 3.11+ with pip3 and Python language extensions
- Node.js Support: Node.js, npm, and eslint for JavaScript development
- Git Integration: Latest Git version built from source
- Command Line Tools: Full suite of development tools (curl, wget, ssh, rsync, etc.)
-
Prerequisites:
- VS Code with Dev Containers extension
- Docker or Podman
-
Open in Dev Container:
# Clone the repository git clone https://github.com/thecem/gardena-smart-system.git cd gardena-smart-system # Open in VS Code code . # VS Code will prompt to reopen in container # Or use Command Palette: "Dev Containers: Reopen in Container"
-
Development Features:
- Auto-completion: Full Python IntelliSense and type checking
- Debugging: Integrated Python debugger for Home Assistant
- Testing: Pre-configured test environment
- Linting: ESLint for JavaScript and Python linting tools
- Git Integration: Full Git workflow with VS Code integration
The devcontainer includes helper scripts in the scripts/ directory:
scripts/develop- Start Home Assistant in development modescripts/lint- Run code linting and formattingscripts/release.sh- Automated release processscripts/fix-and-release.sh- Fix git sync issues and release
Use the built-in browser opener for testing:
# Open Home Assistant in host browser
"$BROWSER" http://localhost:8123- Python 3.11+
- Home Assistant 2025.2.4+
# Core dependencies used in the integration:
oauthlib==3.2.2 # OAuth2 authentication flow
httpx>=0.24.0 # HTTP client for API requests
websockets # WebSocket communication with Gardena API
backoff>=2.0.0 # Retry logic with exponential backoff
Note: These dependencies are required for the integration to function properly. The exact versions are specified in custom_components/gardena_smart_system/manifest.json.### Local Development Setup
If not using the dev container, set up your environment manually:
-
Install Python Dependencies:
pip3 install -r requirements.txt
-
Install Home Assistant:
pip3 install homeassistant
-
Development Configuration:
- Copy the integration to your HA config directory
- Enable debug logging in
configuration.yaml - Restart Home Assistant
- Fork the repository
- Create a feature branch
- Make your changes using the dev container
- Add tests if applicable
- Run linting:
scripts/lint - Submit a pull request
The project includes pre-configured VS Code tasks:
- Run Debug (Home Assistant Core): Start HA in debug mode
- Run Lint: Execute code linting and formatting
- Run Tests: Execute test suite (if available)
Access tasks via: Terminal โ Run Task or Ctrl+Shift+P โ Tasks: Run Task
- โก Performance Breakthrough: 96% startup time improvement (0.271s โ 0.01s)
- ๐ Real-time WebSocket Updates: Device status updates within seconds
- ๐ ๏ธ Enhanced Valve Control: Improved reliability and immediate response
- ๐ง Better Error Handling: More informative messages and automatic recovery
- ๐ Code Quality: Cleaner, more maintainable codebase
- ๐ Authentication Improvements: Better session management and error recovery
- ๐ Bug Fixes: Resolved WebSocket connection issues and authentication conflicts
- Complete Gardena Smart System integration
- Full device support for all device types
- Real-time duration tracking and monitoring
- WebSocket communication for live updates
- Multi-language support
- OAuth2 authentication with token management
- Comprehensive error handling and logging
- HACS integration ready
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to the Home Assistant community
- Gardena/Husqvarna for providing the API
- All contributors and testers
Please report issues and feature requests on GitHub Issues
- GitHub Issues: Bug reports and feature requests
- Home Assistant Community: General discussions and help
- Documentation: Full guides and API reference
โญ If you find this integration useful, please give it a star on GitHub!