A comprehensive plant monitoring integration for Home Assistant that treats each plant as a device with its own sensors, thresholds, and health tracking. Automatically fetches species data from OpenPlantbook to configure optimal growing conditions.
Warning
This integration is not compatible with the original built-in plant integration in Home Assistant.
Each plant is a device in Home Assistant, grouping all its related entities together:
Key features:
- π₯οΈ UI-based setup β guided multi-step config flow with optional OpenPlantbook search
- π Per-plant thresholds β each threshold is its own entity, adjustable from the UI or via automations
- π€οΈ Daily Light Integral β automatic DLI calculation from illuminance sensors
- π Live updates β change sensors, thresholds, species, or images without restarting HA
- π¨ Problem detection β configurable per-sensor problem triggers
- π Auto-disable β sensors without a source entity are automatically disabled
The OpenPlantbook integration automatically fetches species data, thresholds, and images. Without it, you must set all thresholds manually.
- Install from HACS or manually
- Register at open.plantbook.io (free)
- Add your
client_idandsecretin the integration config - Test with the
openplantbook.searchaction
Lovelace Flower Card v2 is the recommended card for displaying plant data. Install via HACS or manually.
- Add this repo as a Custom Repository with type Integration
- Click Install in the "Plant Monitor" card
- Restart Home Assistant
- Copy
custom_components/plant/to your<config>/custom_components/directory - Restart Home Assistant
After restart, add plants via Settings β Devices & Services β Add Integration β Plant Monitor.
The config flow guides you through plant setup in four steps:
Enter a name for your plant. Optionally enter a species to search OpenPlantbook.
- If OpenPlantbook is installed and a species is entered, the flow proceeds to species selection
- If no species is entered (or OpenPlantbook is not installed), the flow skips to sensor selection
If OpenPlantbook found matches, select the correct species from a dropdown list. You can also re-search with a different term if the initial results aren't right.
If the wrong species was selected, you can go back and search again.
Choose which physical sensors to associate with your plant. All sensors are optional and can be added or changed later. Available sensor types:
| Sensor | Device Class | Description |
|---|---|---|
| π‘οΈ Temperature | temperature |
Air temperature |
| π§ Soil moisture | moisture |
Soil water content |
| β‘ Conductivity | conductivity |
Soil nutrient level |
| βοΈ Illuminance | illuminance |
Light level |
| π¨ Air humidity | humidity |
Air moisture |
| π«§ CO2 | carbon_dioxide |
CO2 concentration |
| π‘οΈ Soil temperature | temperature |
Soil temperature |
Tip
Sensors without a source entity are automatically disabled. You can add or replace sensors at any time after setup.
Configure min/max thresholds for each sensor type. If OpenPlantbook data is available, thresholds are pre-filled automatically. Only thresholds for sensor types selected in the previous step are shown (if no sensors were selected, all thresholds are displayed).
You can also set a custom image URL and display species name on this page.
All thresholds are their own entities and can be changed from the UI or by automations and scripts. Changes take effect immediately β no restart needed.
- π‘οΈ Max/min temperature adapts to your HA unit of measurement (Β°C or Β°F)
- Threshold values update automatically if you change your HA temperature units
A Daily Light Integral sensor is automatically created for each plant, measuring the total photosynthetically active light received per day.
See Wikipedia: Daily Light Integral for background.
The DLI calculation converts illuminance (lux) to PPFD. The default factor (0.0185) is optimized for sunlight, but different light sources need different factors. Adjust it per plant using the Lux to PPFD factor entity.
For technical details on the DLI calculation pipeline, conversion factors, troubleshooting low readings, and the optional rolling 24-hour sensor, see DLI.md.
The plant image can be set in several ways:
If the species is found in OpenPlantbook, the image URL is fetched automatically. The integration validates that the URL is accessible before using it. If the OpenPlantbook integration is configured to download images, the downloaded files are stored in config/www/images/plants/ by default and referenced as /local/images/plants/.
You can override the image with your own. Supported formats:
| Format | Example |
|---|---|
| HTTP/HTTPS URL | https://example.com/my-plant.jpg |
Local /www/ folder |
/local/images/plants/my-plant.jpg (file at config/www/images/plants/my-plant.jpg) |
| Media Source | media-source://media_source/local/plants/my-plant.jpg |
Note
- Paths are case-sensitive β the filename must match exactly
- Only
media_source/local/is supported for media source URLs - Media source URLs require a compatible Lovelace card (like the Flower Card)
By default, any sensor reading outside its configured threshold triggers a "problem" state on the plant. You can enable or disable problem triggers per sensor type.
Configure via Settings β Devices & Services β Plant Monitor β Your Plant β Configure β Plant properties.
All threshold checks include a hysteresis band equal to 5% of the minβmax range. This prevents rapid flapping between OK and PROBLEM when a sensor value hovers near a threshold.
A plant enters PROBLEM when a value crosses its threshold, but does not return to OK until the value clears the threshold by the band amount. For example, with moisture min=20 and max=60 (range 40, band 2.0):
- Moisture drops below 20% β enters PROBLEM
- Moisture rises to 21% β stays in PROBLEM (below min + band = 22%)
- Moisture rises to 23% β clears to OK
The band scales proportionally with your configured thresholds. No configuration is needed β hysteresis is always active.
Note
When a sensor becomes unavailable, the hysteresis state resets. The next valid reading is evaluated fresh against the thresholds.
You can replace the physical sensor backing a plant measurement at any time β no restart needed.
- Go to Settings β Devices & Services β Plant Monitor β Your Plant β Configure
- Select Replace sensors
- Change the sensor entity for any sensor type, or clear a field to remove it
You can also use the plant.replace_sensor action directly via Developer Tools β Actions:
action: plant.replace_sensor
data:
meter_entity: sensor.rose_illumination
new_sensor: sensor.ble_sensor_12_illuminationTo remove a sensor, call the action with an empty new_sensor.
Tip
Use generic entity IDs for physical sensors (e.g. sensor.ble_sensor_1_moisture) and descriptive IDs for plant sensors (e.g. sensor.rose_moisture). This makes it easy to swap hardware without confusion.
If you set up a plant without a particular sensor (e.g. you didn't have a CO2 or humidity sensor at the time), that plant sensor entity is automatically disabled. To add the sensor later:
- Go to your plant's device page
- Find the disabled sensor entity (e.g. "CO2") and enable it
- Use Configure β Replace sensors to assign your physical sensor, or use the
plant.replace_sensoraction
Important
You must enable the plant sensor entity before replacing it β Home Assistant hides disabled entities from the entity picker in the UI.
Requires the OpenPlantbook integration to be installed.
When adding a new plant, the config flow searches OpenPlantbook for the species you enter. Matching species are displayed in a dropdown. The selected species' thresholds and image are pre-filled in the limits step.
Note
The OpenPlantbook API does not include your private user-defined species in search results. See "Force Refresh" below for how to fetch data for private species.
Go to Settings β Devices & Services β Plant Monitor β Your Plant β Configure β Plant properties.
- Change species: Enter the new species exactly as the
pidin OpenPlantbook (including punctuation). New thresholds and image are fetched automatically. - Force refresh: Check this box to re-fetch data from OpenPlantbook without changing the species. Useful for private species not found during initial search. When checked, both the image and display species name are updated.
Note
If the current image points to a local file or non-OpenPlantbook URL, it is not replaced unless "Force refresh" is checked.
The Lovelace Flower Card is designed to work with this integration.
The card supports both Β°C and Β°F:
For practical tips, template examples, and workarounds β including fixing sensors with wrong device_class, auto-watering automations, and problem notifications β see TIPS.md.
I added the wrong sensors β after removing and re-adding the plant, old values still show
Home Assistant remembers old entity configurations. Instead of removing and re-adding a plant, use Configure β Replace sensors (or the plant.replace_sensor action) to swap sensors. See Replacing Sensors.
I can't select the correct sensor type (e.g. Moisture, Humidity) from the dropdown
The sensor dropdowns filter by device_class. Some integrations don't set the correct device class on their sensors.
Solutions:
- Report the issue to the physical sensor's integration maintainer
- Add the plant without that sensor, then use the
plant.replace_sensoraction (it doesn't filter bydevice_class) - Create a template sensor with the correct device class:
template:
- sensor:
- name: "Soil Moisture"
unique_id: "soil_sensor_moisture"
state: "{{ states('sensor.soil_sensor_soil_moisture') }}"
unit_of_measurement: "%"
device_class: "moisture"My local image path doesn't work
Local images must be in your HA www folder, referenced with the /local/ prefix. The path is case-sensitive.
| Path | Works? |
|---|---|
/local/images/plants/my-plant.jpg |
β
(file at config/www/images/plants/my-plant.jpg) |
/local/images/plants/My-Plant.jpg (wrong case) |
β |
/mnt/nas/photos/plant.jpg (filesystem path) |
β |
file:///config/www/images/plants/my-plant.jpg (file URI) |
β |
You can also use media-source:// URLs. See Plant Images.
I removed a sensor but it comes back after restart
When you remove a sensor using Configure β Replace sensors (or plant.replace_sensor with an empty new_sensor), the change is persisted to the configuration. If sensors reappear, update to the latest release.
If you find this integration useful, consider buying me a coffee:







