Published on

Xiaomi Temperature & Humidity Sensor Home Assistant Integration

  • avatar

Xiaomi Temperature & Humidity Sensor Home Assistant Integration

Create a budget-friendly smart home with the Xiaomi temperature and humidity sensor. With its affordable price and long-lasting battery life, this sensor is a reliable choice. Integrating it with Home Assistant is a simple process that we will explore in this blog post.

Hardware Requirements

First of all, you will need the Xiaomi temperature and humidity sensor.

Xiaomi temperature sensor

You will need a running Home Assistant instance with integrated Bluetooth, such as a Raspberry Pi or an Intel NUC.

Intel NUC

No Bluetooth on your device? No worries! Simply add a Bluetooth dongle or use a Bluetooth proxy to enable Bluetooth support in Home Assistant. A Bluetooth proxy not only adds Bluetooth functionality but also allows for a "mesh" network with multiple proxies.

Install the firmware

The Xiaomi sensors come with encryption by default. However, utilizing custom firmware can remove this encryption and provide greater configurability options.

Open Chrome and navigate here

  1. Check the “Get Advertising MAC” box and click Connect

    Connect button
  2. Open the Xiaomi sensor and remove, then reinsert the battery to wake up the sensor.

    Xiaomi Battery
  3. Find your Xiaomi sensor, should be named: LYWSD03MMC and click pair

Bluetooth Connections
  1. Click on Do Activation and wait a few seconds for the three fields to fill
Do Activate Button
  1. Click on Custom Firmware ver 4.2 and then Start Flashing

  2. The flashing process should take approximately a minute or so.

Install progress
  1. After it finished click on Reconnect and wait for the sensor to connect

    Reconnect button
  2. Now you can configure the sensor to your liking, such as choosing between Fahrenheit or Celsius.

    Change Temprature
    Change Smiley
  3. Make sure to choose the BTHome for seamless integration in Home Assistant

    BTHome selection
  4. If you made any changes, make sure to click on send config

Send Config Button

Integrate Xiaomi sensor in Home Assistant

Navigate to the integrations page

Open your Home Assistant instance and start setting up a new integration.

You should see the Xiaomi sensor integration

Found Integration

Click on "Configure" and then submit.

Submit Button

Congratulations! The sensor has been successfully added to Home Assistant.

Sensor Data

Automations Examples

  1. Climate Control: Use the sensor data to automate your HVAC system, ensuring optimal temperature and humidity levels for maximum comfort.

  2. Energy Efficiency: Create smart routines that adjust your thermostat and control devices like fans or air purifiers based on real-time temperature and humidity readings, optimizing energy usage and lowering utility bills.

  3. Health and Safety: Receive notifications or trigger actions when the humidity level exceeds a certain threshold, preventing mold growth and maintaining a healthy living environment.

Integrating Xiaomi temperature and humidity sensors with Home Assistant offers a cost-effective way to unlock the power of home automation. With these budget-friendly options, you can create a smarter and more efficient living space without compromising your wallet.