Home Automation with “Awesome” HASS.IO — Part II

Anand Radhakrishnan
5 min readNov 20, 2019

In the previous post, we have seen how HASS can be configured to toggle outdoor lights based on sunrise and sunset. In this post, we will continue the journey and see how Xiaomi BLE Temperature and Humidity sensors can be integrated to the same system.

Xiaomi BLE (Bluetooth Low Energy) sensors are cheap with an advertised battery life of 1 year. Besides providing temperature and relative humidity values over BLE, the device sports a tiny display that shows the current temperature and relative humidity values (another reason why I prefer this device). Here is a map showing the sensor locations on Top Floor and Basement:

In case you are wondering about the “Balcony” box, we discussed that in an earlier post (I just borrowed the same picture here!). HASS comes with in built support for Xiaomi’s BLE sensors (also known as mitemp_bt integration). BLE was incorporated into Bluetooth version 4.0. This means if the HASS host machine has a Bluetooth adapter supporting version 4.0, rest assured it also supports BLE. In order to get this working, find the MAC address of the BLE sensor and configure this MAC address in HASS. Detailed instructions can be found here. For example in my configuration YAML file (/config/configuration.yaml), it looks like this:

sensor:
- platform: mitemp_bt
mac: 'xx:xx:xx:xx:xx:xx'…

--

--