Alternative Plant component of home assistant
翻译准备中
插件PythonGitHub @Olen自行安装运营者未确认
试用过了吗? 点一下就好,无需登录。
制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗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:
The OpenPlantbook integration automatically fetches species data, thresholds, and images. Without it, you must set all thresholds manually.
client_id and secret in the integration configopenplantbook.search actionplant integrationcustom_components/plant/ to your <config>/custom_components/ directoryAfter restart, add plants via Settings → Devices & Services → Add Integration → Plant Monitor.
The Flower Card comes with Plant Monitor. If you installed it separately before, Home Assistant shows a repair asking you to remove that copy.
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 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 |
Fill sensors from device — if one device reports several of these measurements (a soil probe, a multi-sensor), pick it in the top field. The form reloads with every matching empty field filled in, and you can still change any of them by hand. Fields you already filled in yourself are left alone.
Matching is by device class, so the device must report the correct one. A device class with more than one candidate entity is left blank rather than guessed. Temperature is the exception: a temperature entity whose name or id mentions "soil" goes to soil temperature, and a single remaining one goes to (air) 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.
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.
A VPD sensor is automatically created when a plant has both a temperature and humidity sensor configured. VPD measures the "drying power" of the air — how aggressively it pulls moisture from leaf surfaces. It is calculated using the Tetens formula:
SVP = 0.6108 × e^((17.27 × T) / (T + 237.3))
VPD = SVP × (1 - RH / 100)
| Threshold | Default | Meaning |
|---|---|---|
| Minimum | 0.4 kPa | Below this the air is too humid — risk of fungal disease |
| Maximum | 1.6 kPa | Above this plants may close stomata and stop growing |
[!NOTE] VPD is primarily useful for greenhouses and controlled growing environments. The default thresholds come from agricultural science where humidity is actively managed (typically 50–80% RH).
A typical heated indoor environment — especially in winter — often has humidity around 20–35%, which produces VPD values of 1.5–2.5 kPa. This is genuinely stressful for most plants (it's why greenhouses exist), but it is also completely normal for a living room. Most houseplants tolerate it, even if it's not optimal.
For this reason, the VPD problem trigger is disabled by default. You can enable it in the plant's options if you want VPD to affect the plant's ok/problem state — this is most useful if you are actively managing humidity (e.g. in a greenhouse, grow tent, or terrarium).
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.
[!NOTE] Disabling a trigger only removes that sensor from the plant's ok/problem calculation — it does not stop the sensor being evaluated. Each
*_statusattribute (e.g.illuminance_status: Low) always reflects the latest reading against the plant's thresholds regardless of its trigger, and isnullonly when no value is available (sensor missing or unavailable). Use theproblemsattribute — which lists only sensors that are out of range and have their trigger enabled — as the source of truth for active problems.
All threshold checks include a hysteresis band equal to 5% of the threshold being crossed (capped so it never exceeds 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 a threshold, but does not return to OK until the value clears that threshold by the band amount. For example, with moisture min=20 (band = 20 × 5% = 1.0):
The band is relative to each threshold, so the margin stays proportional whether a value is near the min or the max. 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.
Home Assistant 2026.7+. That release introduced purpose-specific triggers and conditions — reusable automation building blocks that an integration registers under its own domain. Plant Monitor teaches Home Assistant a set of plant.* triggers and conditions built directly on the status and problem detection described above. They appear automatically once you're on HA 2026.7 or later; on older supported versions (2025.8+) nothing changes and nothing is registered.
Core Home Assistant ships generic purpose triggers too, like temperature.crossed_threshold — but you have to type in the number yourself. The plant.* per-measurement triggers instead fire off the plant's own status, which this integration already computes from the species-configured min/max with hysteresis (see above). There's no threshold to enter, and nothing to keep in sync with the plant's dashboard.
Whole-plant: plant.problem_detected / plant.problem_cleared — the plant entered / left a problem state. Condition: plant.has_problem.
Per-measurement status: plant.<measurement>_became_low / _became_high / _became_ok, for moisture, conductivity, temperature, soil_temperature, humidity, illuminance, co2, dli, vpd. Conditions: plant.<measurement>_is_low / _is_high / _is_ok.
Stale source sensor: plant.<measurement>_sensor_became_stale / _became_fresh, for the externally-sourced measurements only — moisture, conductivity, temperature, soil_temperature, humidity, illuminance, co2 (not dli/vpd, which are derived rather than sensor-backed). Condition: plant.<measurement>_sensor_is_stale.
"Stale" means the source sensor is unavailable/unknown, or simply hasn't updated within a window (for, default 24 hours). A grace period means it does not false-alarm at restart, when a sensor briefly reads unknown before its own integration populates it — staleness only fires once the source is genuinely still dead after the full window elapses.
Every trigger and condition targets the plant entity — you pick which plant, nothing else. For the stale family, the integration resolves that measurement's configured external source sensor itself; you never reference the sensor directly.
# Notify when a plant's moisture drops below its configured minimum
triggers:
- trigger: plant.moisture_became_low
target:
entity_id: plant.my_fern
actions:
- action: notify.mobile_app_phone
data:
message: "My Fern needs water"
# Do something whenever a plant enters a problem state
triggers:
- trigger: plant.problem_detected
target:
entity_id: plant.my_fern
actions:
- action: light.turn_on
target:
entity_id: light.plant_shelf
data:
color_name: red
# Alert if the source sensor feeding a plant's temperature has gone stale for 6 hours
triggers:
- trigger: plant.temperature_sensor_became_stale
target:
entity_id: plant.my_fern
options:
for:
hours: 6
actions:
- action: notify.mobile_app_phone
data:
message: "{{ trigger.entity_id }} hasn't reported in 6 hours"
[!NOTE] For measurements whose source sensor carries a standard Home Assistant device class (temperature, humidity, illuminance, soil temperature), Home Assistant's own generic
temperature.*/humidity.*/illuminance.*purpose triggers also apply to that sensor — and theircrossed_thresholdform can optionally read the limit from the plant's publishednumber.<plant>_min_*/_max_*entities. Theplant.*triggers above need no such wiring.
You can replace the physical sensor backing a plant measurement at any time — no restart needed.
The Fill sensors from device field works here too — handy when you move a probe to a different plant. Sensors already set are kept, so clear the ones you want replaced, then pick the device to fill them all at once.
plant.replace_sensor actionYou 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_illumination
To 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:
plant.replace_sensor action[!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.
pid in OpenPlantbook (including punctuation). New thresholds and image are fetched automatically.[!NOTE] If the current image points to a local file or non-OpenPlantbook URL, it is not replaced unless "Force refresh" is checked.
When OpenPlantbook has care information for a species, the plant device exposes it as free-text attributes you can show on a dashboard or use in automations and templates. Only the fields OpenPlantbook provides for a given species appear:
care_wateringcare_sunlightcare_soilcare_pruningcare_fertilization[!NOTE] Care guidance is fetched together with the species data, so existing plants only get it after a refresh — use Force refresh (above) or change the species. Newly added plants get it automatically.
The Lovelace Flower Card comes with this integration, so there is nothing extra to install. Its options and documentation are in the flower card repository.
The card supports both °C and °F:
[!IMPORTANT] A sensor doesn't show up in a dropdown? This is the most common problem, and it's almost always a missing
device_classon the source integration (often Zigbee2MQTT or BLE) — not a Plant Monitor bug. Please report it to that integration (the only permanent fix); local workarounds are in MISSING_SENSORS.md.
For other practical tips, template examples, and workarounds — auto-watering, problem notifications, battery/stuck sensor monitoring — see TIPS.md.
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.
The dropdowns filter by device_class, and some integrations (often Zigbee2MQTT or BLE sensors) create the entity without one — so it isn't listed.
The permanent fix is upstream: report the missing device_class/state_class to the integration that owns the sensor (e.g. Zigbee2MQTT). Once fixed there, the sensor appears automatically — for you and everyone else with that device. Plant Monitor deliberately does not work around missing device classes.
Local workarounds (Zigbee2MQTT devices.yaml override, customize.yaml, a template sensor, or plant.replace_sensor) are documented in MISSING_SENSORS.md.
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.
The integration monitors plant readings, not sensor hardware. For battery monitoring, see Home Assistant's official tutorial: Get notified when a device needs a new battery. For detecting stuck sensors (no value change in 24+ hours), see the Battery Monitoring & Stuck Sensors section in TIPS.md.
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: