Update plant component configuration (#7547)

This commit is contained in:
Klaas Schoute 2018-11-17 11:42:33 +01:00 committed by Fabian Affolter
parent 329a7f7f48
commit 3aa6c382dd

View File

@ -32,31 +32,89 @@ plant:
min_moisture: 20 min_moisture: 20
``` ```
Configuration variables: {% configuration %}
entity_id:
- **entity_id** (*Required*): Set by you and is used by the component as the `entity_id`. description: Set by you and is used by the component as the `entity_id`.
- **sensors** (*Required*): required: true
- **moisture** (*Optional*): Moisture of the plant. Measured in %. Can have a min and max value set optionally. type: list
- **battery** (*Optional*): Battery level of the plant sensor. Measured in %. Can only have a min level set optionally. keys:
- **temperature:** (*Optional*): Temperature of the plant. Measured in degrees Celsius. Can have a min and max value set optionally. sensors:
- **conductivity:** (*Optional*): Conductivity of the plant. Measured in µS/cm. Can have a min and max value set optionally. description: List of sensor measure entities.
- **brightness:** (*Optional*): Light exposure of the plant. Measured in Lux. Can have a min and max value set optionally. required: true
- **min_moisture** (*Optional*): Minimum moisture level before triggering a problem. Typical value: 20 type: list
- **max_moisture** (*Optional*): Maximum moisture level before triggering a problem. Typical value: 60 keys:
- **min_battery** (*Optional*): Minimum battery level before triggering a problem. Typical value: 20 moisture:
- **min_conductivity** (*Optional*): Minimum conductivity level before triggering a problem. Typical value: 500 description: Moisture of the plant. Measured in %. Can have a min and max value set optionally.
- **max_conductivity** (*Optional*): Maximum conductivity level before triggering a problem. Typical value: 3000 required: false
- **min_temperature** (*Optional*): Minimum temperature before triggering a problem. type: string
- **max_temperature** (*Optional*): Maximum temperature before triggering a problem. battery:
- **min_brightness** (*Optional*): Minimum brightness before triggering a problem. In contrast to the other values, this check is *not* looking at the current situation, but rather at the last days. A problem is only reported if the maximum brightness over the last days was lower than min_brightness. You can use this to check if the plant gets enough light during the course of the day. description: Battery level of the plant sensor. Measured in %. Can only have a min level set optionally.
- **max_brightness** (*Optional*): Maximum brightness before triggering a problem. required: false
- **check_days** (*Optional*): time interval (in days) used when checking **min_brightness**, if not set, the default value is 3 type: string
temperature:
description: Temperature of the plant. Measured in degrees Celsius. Can have a min and max value set optionally.
required: false
type: string
conductivity:
description: Conductivity of the plant. Measured in µS/cm. Can have a min and max value set optionally.
required: false
type: string
brightness:
description: Light exposure of the plant. Measured in Lux. Can have a min and max value set optionally.
required: false
type: string
mind_moisture:
description: Minimum moisture level before triggering a problem.
required: false
default: 20
type: integer
max_moisture:
description: Maximum moisture level before triggering a problem.
required: false
default: 60
type: integer
min_battery:
description: Minimum battery level before triggering a problem.
required: false
default: 20
type: integer
min_conductivity:
description: Minimum conductivity level before triggering a problem.
required: false
default: 500
type: integer
max_conductivity:
description: Maximum conductivity level before triggering a problem.
required: false
default: 3000
type: integer
min_temperature:
description: Minimum temperature before triggering a problem.
required: false
type: float
max_temperature:
description: Maximum temperature before triggering a problem.
required: false
type: float
min_brightness:
description: Minimum brightness before triggering a problem. In contrast to the other values, this check is *not* looking at the current situation, but rather at the last days. A problem is only reported if the maximum brightness over the last days was lower than min_brightness. You can use this to check if the plant gets enough light during the course of the day.
required: false
type: integer
max_brightness:
description: Maximum brightness before triggering a problem.
required: false
type: integer
check_days:
description: time interval (in days) used when checking `min_brightness`.
required: false
default: 3
type: integer
{% endconfiguration %}
## {% linkable_title Examples %} ## {% linkable_title Examples %}
### Using plain MQTT sensor to get the data ### Using plain MQTT sensor to get the data
This is a practical example that uses a multiple of `MQTT sensors` to supply the readings used by the `plant` sensor. This is a practical example that uses a multiple of `MQTT sensors` to supply the readings used by the `plant` sensor.
Another good source of this data would be the [Mi Flora](/components/sensor.miflora/) component. Another good source of this data would be the [Mi Flora](/components/sensor.miflora/) component.
If the sensor data is within 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. If the sensor data is within 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.
@ -67,6 +125,7 @@ The main sources of the data will usually be a [MiFlora sensor](/components/sens
If you want to get the date via a PlantGateway, this is a typical configuration for the MQTT sensors: If you want to get the date via a PlantGateway, this is a typical configuration for the MQTT sensors:
{% raw %} {% raw %}
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
plant: plant:
@ -82,7 +141,7 @@ plant:
min_battery: 17 min_battery: 17
min_conductivity: 500 min_conductivity: 500
min_temperature: 15 min_temperature: 15
sensor: sensor:
- platform: mqtt - platform: mqtt
name: my_plant_moisture name: my_plant_moisture
@ -105,6 +164,7 @@ sensor:
state_topic: my_plant_topic state_topic: my_plant_topic
value_template: '{{ value_json.brightness }}' value_template: '{{ value_json.brightness }}'
``` ```
{% endraw %} {% endraw %}
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. 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.