Using Vegetronix VegeHub Sensor Inputs in Home Assistant (Template Sensor Conversions)

The Vegetronix VegeHub is a WiFi data logger designed specifically for agricultural and environmental monitoring applications. VegeHub supports a wide range of analog sensors and makes it easy to stream measurements into your automation stack.

VegeHub is fully supported by a Home Assistant Core integration, and setup is fast and straightforward. Once connected, VegeHub reports each analog input into Home Assistant as a raw voltage value.

To turn these raw voltage readings into meaningful measurements (like soil moisture %, soil temperature, or light level), Home Assistant users can create template sensors that apply the correct conversion formulas. These converted values can then be used directly in dashboards, history graphs, and automations.

This guide provides ready-to-use Home Assistant template sensor examples for common Vegetronix sensors:

  • VH400 Soil Moisture Sensor
  • THERM200 Soil Temperature Sensor
  • LT150 Light Sensor

Before You Start: Identify Your Raw Voltage Sensor Entity

When your VegeHub is connected to Home Assistant, each input channel appears as an entity (typically a sensor.*) that reports the raw voltage.

Example entity IDs might look like:

  • sensor.vegehub_input_1
  • sensor.plant_guardian_input_1
  • sensor.vegehub_channel_2_voltage

In the templates below, you’ll replace the entity ID with the one that matches your VegeHub input channel.


Home Assistant Template Sensor Setup

Add these template sensors to your Home Assistant configuration (commonly in configuration.yaml, or in a separate YAML file that you include).

The general structure looks like this:

template:
  - sensor:
      - name: "Example Converted Sensor"
        state: >
          {{ states('sensor.your_raw_voltage_entity') | float(0) }}

1) THERM200 Soil Temperature Sensor

The THERM200 Soil Temperature Sensor reports voltage that can be converted into temperature using these linear transforms:

  • Celsius: 41.6700x1 + (-40.0000)
  • Fahrenheit: 75.0060x1 + (-40.0000)

THERM200 Template Sensors (°C and °F)

Replace sensor.YOUR_RAW_VOLTAGE_SENSOR with your VegeHub input entity.

template:
  - sensor:
      - name: "THERM200 Soil Temperature (C)"
        unique_id: therm200_soil_temperature_c
        unit_of_measurement: "°C"
        device_class: temperature
        state_class: measurement
        state: >
          {{ (41.6700 * (states('sensor.YOUR_RAW_VOLTAGE_SENSOR') | float(0)) - 40.0000) | round(2) }}

      - name: "THERM200 Soil Temperature (F)"
        unique_id: therm200_soil_temperature_f
        unit_of_measurement: "°F"
        device_class: temperature
        state_class: measurement
        state_class: measurement
        state: >
          {{ (75.0060 * (states('sensor.YOUR_RAW_VOLTAGE_SENSOR') | float(0)) - 40.0000) | round(2) }}

✅ Once added, Home Assistant will treat these as temperature sensors, making them easy to graph and automate on.


2) VH400 Soil Moisture Sensor (Volumetric Water Content / Percent)

The VH400 Soil Moisture Sensor output is non-linear, so it’s best converted using a piecewise curve fit. Below is a Home Assistant template sensor that maps voltage to a percent-style moisture reading.

VH400 Template Sensor (Percent)

Replace sensor.YOUR_RAW_VOLTAGE_SENSOR with your VegeHub input entity if needed.

template:
  - sensor:
    - name: "Plant 1 Moisture Percent Calibrated"
      unit_of_measurement: "%"
      state: >
        {% set v = states('sensor.YOUR_RAW_VOLTAGE_SENSOR') | float(0) %}
        
        {% if v <= 0.0 %}
            0
        {% elif v <= 1.1 %}
            {{ (v - 0.0) / (1.1 - 0.0) * (10 - 0) + 0 | round(1) }}
        {% elif v <= 1.3 %}
            {{ (v - 1.1) / (1.3 - 1.1) * (15 - 10) + 10 | round(1) }}
        {% elif v <= 1.82 %}
            {{ (v - 1.3) / (1.82 - 1.3) * (40 - 15) + 15 | round(1) }}
        {% elif v <= 2.2 %}
            {{ (v - 1.82) / (2.2 - 1.82) * (50 - 40) + 40 | round(1) }}
        {% elif v <= 3.0 %}
            {{ (v - 2.2) / (3.0 - 2.2) * (100 - 50) + 50 | round(1) }}
        {% else %}
            100
        {% endif %}

Notes on VH400 Usage

  • This template clamps the output to 0% minimum and 100% maximum.

  • This is a great fit for:

    • Plant health dashboards
    • Irrigation automations
    • Threshold alerts (e.g., “notify me when soil moisture drops below 25%”)

3) LT150 Light Sensor

The LT150 Light Sensor uses a simple linear transform:

Equation: 50.0000x1 + 0.0000

That means:

Light Value = 50 × Voltage

LT150 Template Sensor

Replace sensor.YOUR_RAW_VOLTAGE_SENSOR with your VegeHub input entity.

template:
  - sensor:
      - name: "LT150 Light Level"
        unique_id: lt150_light_level
        unit_of_measurement: "lux"
        state_class: measurement
        state: >
          {{ (50.0000 * (states('sensor.YOUR_RAW_VOLTAGE_SENSOR') | float(0))) | round(2) }}

Tip: If you prefer a different unit label (or if you use the value for relative light instead of calibrated lux), you can change unit_of_measurement to something like "%", "relative", or "light".


Example: Using These Sensors in Automations

Once your converted sensors exist in Home Assistant, you can use them directly in automations. For example:

  • Turn on a grow light when soil moisture drops below a threshold
  • Alert when soil temperature drops below freezing
  • Turn off supplemental lighting when ambient light is high enough

Converted template sensors behave like native Home Assistant sensor entities, so they integrate cleanly with:

  • Dashboards
  • History graphs
  • Alerts/notifications
  • Automations and scripts

Summary

The VegeHub makes it easy to bring agricultural sensor data into Home Assistant. Since VegeHub reports sensor readings as raw voltage, Home Assistant template sensors are the recommended way to convert those values into actionable measurements.

Here we've given you the templates for a few of our most common sensors:

  • THERM200 Soil Temperature Sensor (°C and °F)
  • VH400 Soil Moisture Sensor (calibrated %)
  • LT150 Light Sensor (linear conversion)

,but if you have any other sensors you’d like to support in Home Assistant, the same approach applies: start with the VegeHub raw voltage entity and apply the appropriate conversion using a template sensor.

If you have any additional questions, please contact Vegetronix support, and we'll be happy to help.

VG-METER-200