View on GitHub

Smart Irrigation

A Home Assistant integration to optimize irrigation

Manual Coordinate Configuration

This feature allows users to manually set coordinates (latitude, longitude, and elevation) for weather data retrieval, rather than inheriting them from the Home Assistant global settings by default.

Overview

By default, Smart Irrigation uses your Home Assistant's configured location coordinates for weather data retrieval. With this feature, you can override these coordinates if you need weather data from a different location, such as:

Configuration

Initial Setup (Options Flow)

The Configure dialog of the integration (Settings > Devices & services > Smart Irrigation) holds only the coordinates. The weather service and its API key are set in the Smart Irrigation panel (see Configuring the weather service).

  1. Open Configure on the Smart Irrigation integration.
  2. Choose Coordinate Source:
    • Use Home Assistant location (default): Uses your HA's configured coordinates
    • Use manual coordinates: Allows you to specify custom coordinates

Manual Coordinate Fields

When manual coordinates are enabled, you can configure:

Panel UI

On the Weather service page of the Weather tab, under the weather service, you'll find a "Location Coordinates" card where you can:

Technical Details

Coordinate Selection Logic

The system uses the following priority order for coordinates:

  1. Manual coordinates (if enabled and valid)
    • Must have both latitude and longitude set
    • Elevation defaults to 0 if not specified
  2. Home Assistant coordinates (fallback)
    • Uses HA's configured latitude, longitude, elevation
    • Logs warnings if using default values

Weather Service Integration

All supported weather services automatically use the effective coordinates:

Coordinate Validation

Input validation ensures:

Usage Examples

Example 1: Remote Property

Your Home Assistant is at your main residence, but you want to irrigate a garden at a remote property:

  1. Enable manual coordinates
  2. Set latitude/longitude to the remote property location
  3. Set elevation if significantly different from your main location

Example 2: Weather Station Alignment

You want to use data from a specific weather station location:

  1. Find the coordinates of your preferred weather station
  2. Enable manual coordinates
  3. Input the weather station's coordinates

Example 3: Elevation Correction

Your HA location is correct but elevation is wrong or missing:

  1. Enable manual coordinates
  2. Keep the same latitude/longitude as HA
  3. Set the correct elevation for better pressure calculations

Internationalization

The coordinate configuration feature is localized in the 20 languages of the panel.

Troubleshooting

Common Issues

Coordinates not taking effect:

Weather data seems wrong:

UI shows default coordinates:

Logging

The system logs coordinate selection decisions:

INFO: Using manual coordinates: lat=40.712800, lon=-74.006000, elevation=100m
INFO: Using Home Assistant coordinates: lat=52.000000, lon=5.000000, elevation=10m

Look for these messages in your Home Assistant logs to confirm which coordinates are being used.