Update sensor.mitemp_bt.markdown (#5511)

Since I didn't have to configure anything on a new hass.io installation, I think it's save to say it works out of the box.
This commit is contained in:
Andy9FromSpace 2018-06-09 21:56:22 +01:00 committed by Fabian Affolter
parent 1ee3eb6f59
commit 73b38b4e64

View File

@ -15,17 +15,19 @@ ha_iot_class: "Local Polling"
The `mitemp_bt` sensor platform allows one to monitor room temperature and humidity. The [Xiaomi Mijia BLE Temperature and Humidity sensor with LCD](https://www.amazon.com/Temperature-Humidity-Xiaomi-Bluetooth-Screen-Remote/dp/B079L6N6PC) is a small Bluetooth Low Energy device that monitors the room temperature and humidity. As only a single BLE device can be polled at the same time, the library employs locking to make sure this is the case. The `mitemp_bt` sensor platform allows one to monitor room temperature and humidity. The [Xiaomi Mijia BLE Temperature and Humidity sensor with LCD](https://www.amazon.com/Temperature-Humidity-Xiaomi-Bluetooth-Screen-Remote/dp/B079L6N6PC) is a small Bluetooth Low Energy device that monitors the room temperature and humidity. As only a single BLE device can be polled at the same time, the library employs locking to make sure this is the case.
# Installation ## {% linkable_title Installation %}
Depending on the operating system you're running, you have to configure the proper Bluetooth backend on your system: Depending on the operating system you're running, you have to configure the proper Bluetooth backend on your system:
- On [Hass.io](/hassio/installation/): Not yet supported. - On [Hass.io](/hassio/installation/): mitemp_bt will work out of the box.
- On a [generic Docker installation](https://www.home-assistant.io/docs/installation/docker/): Works out of the box with `--net=host` and properly configured Bluetooth on the host. - On a [generic Docker installation](https://www.home-assistant.io/docs/installation/docker/): Works out of the box with `--net=host` and properly configured Bluetooth on the host.
- On other Linux systems: - On other Linux systems:
- Preferred solution: Install the `bluepy` and `btlewrap` library (via pip). When using a virtual environment, make sure to use install the library in the right one. - Preferred solution: Install the `bluepy` and `btlewrap` library (via pip). When using a virtual environment, make sure to use install the library in the right one.
   - Fallback solution: Install `btlewrap` library (via pip) and `gatttool` via your package manager. Depending on the distribution, the package name might be: `bluez`, `bluetooth`, `bluez-deprecated`    - Fallback solution: Install `btlewrap` library (via pip) and `gatttool` via your package manager. Depending on the distribution, the package name might be: `bluez`, `bluetooth`, `bluez-deprecated`
- Windows and MacOS are currently not supported by the btlewrap library. - Windows and MacOS are currently not supported by the btlewrap library.
# Configuration ## {% linkable_title Configuration %}
Start a scan to determine the MAC addresses of the sensor: Start a scan to determine the MAC addresses of the sensor:
```bash ```bash
@ -43,10 +45,8 @@ $ bluetoothctl
Discovery started Discovery started
[CHG] Controller XX:XX:XX:XX:XX:XX Discovering: yes [CHG] Controller XX:XX:XX:XX:XX:XX Discovering: yes
[NEW] Device 4C:65:A8:D2:31:7F MJ_HT_V1 [NEW] Device 4C:65:A8:D2:31:7F MJ_HT_V1
``` ```
Check for `MJ_HT_V1` or similar entries, those are your sensor. Check for `MJ_HT_V1` or similar entries, those are your sensor.
To use your Mi Temperature and Humidity sensor in your installation, add the following to your `configuration.yaml` file: To use your Mi Temperature and Humidity sensor in your installation, add the following to your `configuration.yaml` file: