Skip to content

Latest commit

 

History

26 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Soil Temperature for Home Assistant

A custom Home Assistant integration that provides soil temperature data at multiple depths using the Open-Meteo free API.

Features

  • Soil temperature at up to 4 depths: 0cm (surface), 6cm, 18cm, and 54cm
  • Configurable depth selection — choose which depths to monitor during setup or later via options
  • Current temperature, 24-hour average, and 5-day average for each selected depth
  • 7-day daily forecast included as attributes in 24-hour average sensors, with an optional static naming mode for dashboard card compatibility
  • Zone-based configuration (uses your HA zone's coordinates)
  • 30-minute polling interval
  • HACS compatible

Installation

HACS (Recommended)

  1. Open HACS in Home Assistant
  2. Click the three dots menu (top right) → Custom repositories
  3. Add https://github.com/JB09/HA-Get-Soil-Temp as an Integration
  4. Search for "Soil Temperature" and install
  5. Restart Home Assistant

Manual

  1. Copy the custom_components/soil_temperature folder to your Home Assistant custom_components directory
  2. Restart Home Assistant

Configuration

  1. Go to SettingsDevices & ServicesAdd Integration
  2. Search for Soil Temperature
  3. Select a zone (e.g., "Home") — the integration uses the zone's latitude/longitude
  4. Select which soil depths to monitor (6cm is selected by default)
  5. Done! 3 sensors are created per selected depth

Sensors

For each selected soil depth, three sensors are created:

Sensor Description
Current Latest hourly soil temperature reading
24h Average Mean temperature over the last 24 hours
5-Day Average Mean temperature over the last 5 days

The 6cm depth sensors use simplified names (e.g., "Soil Temperature Current") since this is the most commonly referenced depth for gardening and agriculture.

24-hour average temperature sensors include a 7-day daily forecast as extra state attributes. By default, attributes are named by date (e.g., forecast_2024-03-15: 52.3).

Static Forecast Attribute Names

Enable "Use static forecast attribute names" in the integration options to switch to indexed attribute names that don't change daily. This is useful for dashboard cards like Bubble Card sub-buttons that require static attribute references.

Attribute Description
forecast_0d Today's forecast temperature
forecast_0d_date Today's date (e.g., 2024-03-15)
forecast_1d Tomorrow's forecast temperature
forecast_1d_date Tomorrow's date
... Up to forecast_6d / forecast_6d_date

All temperatures are reported in Celsius. Home Assistant will automatically convert to Fahrenheit if your system is configured for imperial units.

Data Source

This integration uses the free Open-Meteo API which provides:

  • Hourly soil temperature data at 0cm, 6cm, 18cm, and 54cm depths
  • Up to 16 days of forecast data
  • 5 days of historical data
  • No API key required

Multiple Locations

To monitor soil temperature at different locations, simply add the integration multiple times — each with a different zone. Create custom zones in Home Assistant under SettingsAreas & ZonesZones.

About

No description, website, or topics provided.

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages