Skip to content

Commit 9e56d1d

Browse files
committed
Minimize the configuration sample and update layout
1 parent c939625 commit 9e56d1d

File tree

1 file changed

+35
-18
lines changed

1 file changed

+35
-18
lines changed

source/_components/sensor.miflora.markdown

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,37 +13,54 @@ ha_release: 0.29
1313
ha_iot_class: "Local Polling"
1414
---
1515

16-
The [Mi Flora plant sensor](https://www.open-homeautomation.com/2016/08/23/reverse-engineering-the-mi-plant-sensor/) is a small Bluetooth Low Energy device that monitors not only the moisture, but also light, temperature and
17-
conductivity. As only a single BLE device can be polled at the same time, the library implements locking to make sure this is the case.
16+
The [Mi Flora plant sensor](https://www.open-homeautomation.com/2016/08/23/reverse-engineering-the-mi-plant-sensor/) is a small Bluetooth Low Energy device that monitors not only the moisture, but also light, temperature and conductivity. As only a single BLE device can be polled at the same time, the library implements locking to make sure this is the case.
1817

1918
To use your Mi Flora plant sensor in your installation, add the following to your `configuration.yaml` file:
2019

2120
```yaml
2221
# Example configuration.yaml entry
2322
sensor
24-
platform: miflora
25-
mac: xx:xx:xx:xx:xx:xx
26-
name: Flower 1
27-
force_update: false
28-
median: 3
29-
monitored_conditions:
30-
- moisture
31-
- light
32-
- temperature
33-
- conductivity
34-
- battery
23+
- platform: miflora
24+
mac: xx:xx:xx:xx:xx:xx
25+
monitored_conditions:
26+
- temperature
3527
```
3628
3729
- **mac** (*Required*): The MAC address of your sensor. You can find this be running `hcitool lescan` from command line.
30+
- **monitored_conditions** array (*Required*): The paramaters that should be monitored.
31+
- **moisture**: Moisture in the soil.
32+
- **light**: Brightness at the sensor's location.
33+
- **temperature**: Temperature at the sensor's location.
34+
- **conductivity**: Conductivity in the soil.
35+
- **battery**: Battery details.
3836
- **name** (*Optional*): The name displayed in the frontend.
3937
- **force_update** (*Optional*): Sends update events even if the value hasn't changed.
40-
- **median** (*Optional*): Sometimes the sensor measurements show spikes. Using this parameter, the poller will report the median of the last
41-
3 (you can also use larger values) measurements. This filters out single spikes. Median: 5 will also filter double spikes.
42-
If you never have problems with spikes, median=1 will work fine.
43-
- **monitored_conditions** (*Required*): The paramaters that should be monitored.
38+
- **median** (*Optional*): Sometimes the sensor measurements show spikes. Using this parameter, the poller will report the median of the last 3 (you can also use larger values) measurements. This filters out single spikes. Median: 5 will also filter double spikes. If you never have problems with spikes, `median: 1` will work fine.
4439
- **timeout** (*Optional*): Define the timeout value in seconds when polling (defaults to 10 if not defined)
4540
- **retries** (*Optional*): Define the number of retries when polling (defaults to 2 if not defined)
4641
- **cache** (*Optional*): Define cache expiration value in seconds (defaults to 1200 if not defined)
4742

48-
Note that by default the sensor is only polled once every 15 minutes. This means with the median=3 setting, it will take as least 30 minutes before the sensor will report a value after a Home Assistant restart. As the values usually change very slowly, this isn't a big problem.
43+
Note that by default the sensor is only polled once every 15 minutes. This means with the `median: 3` setting will take as least 30 minutes before the sensor will report a value after a Home Assistant restart. As the values usually change very slowly, this isn't a big problem.
4944
Reducing polling intervals will have a negative effect on the battery life.
45+
46+
A full configuration example could looks the one below:
47+
48+
```yaml
49+
# Example configuration.yaml entry
50+
sensor
51+
- platform: miflora
52+
mac: xx:xx:xx:xx:xx:xx
53+
name: Flower 1
54+
force_update: false
55+
median: 3
56+
monitored_conditions:
57+
- moisture
58+
- light
59+
- temperature
60+
- conductivity
61+
- battery
62+
```
63+
64+
65+
66+

0 commit comments

Comments
 (0)