Extended documentation for component plant (#2595)

This commit is contained in:
ChristianKuehnel 2017-05-08 10:31:10 +02:00 committed by Fabian Affolter
parent 7e0835f91c
commit df2d7889ae

View File

@ -1,8 +1,8 @@
--- ---
layout: page layout: page
title: "Plant Observer" title: "Plant monitor"
description: "Automation component to observe the status of your plants." description: "Instructions on how to setup plant monitoring with Home Assistant."
date: 2017-05-06 08:00 date: 2016-05-7 23:00
sidebar: true sidebar: true
comments: false comments: false
sharing: true sharing: true
@ -18,18 +18,14 @@ To use your `plant` sensor in your installation, add the following to your `conf
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
plant: plant:
sunflower: name_of_your_plant:
sensors: sensors:
moisture: sensor.mqtt_plant_moisture moisture: sensor.my_sensor_moisture
battery: sensor.mqtt_plant_battery battery: sensor.my_sensor_moisture_battery
temperature: sensor.mqtt_plant_temperature temperature: sensor.my_sensor_moisture_temperature
conductivity: sensor.mqtt_plant_conductivity conductivity: sensor.my_sensor_moisture_conductivity
brightness: sensor.mqtt_plant_brightness brightness: sensor.my_sensor_moisture_brightness
min_moisture: 20 min_moisture: 20
max_moisture: 60
min_battery: 17
min_conductivity: 500
min_temperature: 15
``` ```
Configuration variables: Configuration variables:
@ -41,11 +37,11 @@ Configuration variables:
- **temperature:** (*Optional*): Temperaure of the plant. Meassured in degrees Celcius. Can have a min and max value set optionally. - **temperature:** (*Optional*): Temperaure of the plant. Meassured in degrees Celcius. Can have a min and max value set optionally.
- **conductivity:** (*Optional*): Conductivity of the plant. Meassured in µS/cm. Can have a min and max value set optionally. - **conductivity:** (*Optional*): Conductivity of the plant. Meassured in µS/cm. Can have a min and max value set optionally.
- **brightness:** (*Optional*): Light exposure of the plant. Meassured in Lux. Can have a min and max value set optionally. - **brightness:** (*Optional*): Light exposure of the plant. Meassured in Lux. Can have a min and max value set optionally.
- **min_moisture** (*Optional*): Minimum moisture level before triggering a problem. - **min_moisture** (*Optional*): Minimum moisture level before triggering a problem. Typical value: 20
- **max_moisture** (*Optional*): Maximum moisture level before triggering a problem. - **max_moisture** (*Optional*): Maximum moisture level before triggering a problem. Typical value: 60
- **min_battery** (*Optional*): Minimum battery level before triggering a problem. - **min_battery** (*Optional*): Minimum battery level before triggering a problem. Typical value: 20
- **min_conductivity** (*Optional*): Minimum conductivity level before triggering a problem. - **min_conductivity** (*Optional*): Minimum conductivity level before triggering a problem. Typical value: 500
- **max_conductivity** (*Optional*): Maximum conductivity level before triggering a problem. - **max_conductivity** (*Optional*): Maximum conductivity level before triggering a problem. Typical value: 3000
- **min_temperature** (*Optional*): Minimum temperature before triggering a problem. - **min_temperature** (*Optional*): Minimum temperature before triggering a problem.
- **max_temperature** (*Optional*): Maximum temperature before triggering a problem. - **max_temperature** (*Optional*): Maximum temperature before triggering a problem.
- **min_brightness** (*Optional*): Minimum brightness before triggering a problem. - **min_brightness** (*Optional*): Minimum brightness before triggering a problem.
@ -57,6 +53,13 @@ This is a practial example that uses a multiple of `MQTT sensors` to supply the
Another good source of this data would be the [Mi Flora](https://home-assistant.io/components/sensor.miflora/) component. Another good source of this data would be the [Mi Flora](https://home-assistant.io/components/sensor.miflora/) component.
If the sensor data within the the min/max values the status will be `ok`, if not the status will be `problem`. You can use this to trigger a notification, if there is a problem with your plant. Of course you can only monitor attributes of your plant, where the sensor is configured and is providing the data.
## data source
The main sources of the data will usually be a [MiFlora sensor](sensor.miflora) or a [MQTT sensor](sensor.mqtt) receiving the data from a [PlantGatway](https://github.com/ChristianKuehnel/plantgateway).
If you want to get the date via a PlantGateway, this is a typical configuration for the MQTT sensors:
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
plant: plant:
@ -75,23 +78,25 @@ plant:
sensor: sensor:
- platform: mqtt - platform: mqtt
name: mqtt_plant_moisture name: my_plant_moisture
state_topic: test/simulated_plant state_topic: my_plant_topic
value_template: '{{ value_json.moisture }}' value_template: '{{ value_json.moisture }}'
- platform: mqtt - platform: mqtt
name: mqtt_plant_battery name: my_plant_battery
state_topic: test/simulated_plant state_topic: my_plant_topic
value_template: '{{ value_json.battery }}' value_template: '{{ value_json.battery }}'
- platform: mqtt - platform: mqtt
name: mqtt_plant_temperature name: my_plant_temperature
state_topic: test/simulated_plant state_topic: my_plant_topic
value_template: '{{ value_json.temperature }}' value_template: '{{ value_json.temperature }}'
- platform: mqtt - platform: mqtt
name: mqtt_plant_conductivity name: my_plant_conductivity
state_topic: test/simulated_plant state_topic: my_plant_topic
value_template: '{{ value_json.conductivity }}' value_template: '{{ value_json.conductivity }}'
- platform: mqtt - platform: mqtt
name: mqtt_plant_brightness name: my_plant_brightness
state_topic: test/simulated_plant state_topic: my_plant_topic
value_template: '{{ value_json.brightness }}' value_template: '{{ value_json.brightness }}'
``` ```
You have to replace the `state_topic` with the value that you configured in the PlantGateway. It also depends on the global configuration of your MQTT server.