SmartThings Community

Xiaomi temperature sensor and Google home


(Anthony Cafazzo) #1

So how do u get Google home to announce the temperature an or the humidity off the sensor? I hear you have too modify device handler to thermostat butt how would one Doo that?


(Marius) #2

Hi @Anthony_Cafazzo ,

As I did this exact setup earlier today, I’ll share my findings here. This is based on other threads in this forum, but I’ll do it easy for you (and anyone swinging by your thread).

Steps (assuming that your Xiaomi devices already works with SmartThings):

  1. Login to the SmartThings IDE
  2. Go to “My Device Handlers” and identify your Device Handler for your Xiaomi sensor (e.g. “bspranger : Xiaomi Aqara Temperature Humidity Sensor”)
  3. Open/Edit the Device Handler identified in the step above and add the following line below the last capability line

capability “Thermostat”

Example:

capability “Temperature Measurement”
capability “Relative Humidity Measurement”
capability “Sensor”
capability “Battery”
capability “Health Check”
capability "Thermostat"

  1. Click Save and then Publish (To Me)
  2. Sync your linked devices connected to your Google Home account. The easiest way to this is simply telling your Google Home / Assistant to “sync my devices”

Hi google, sync my devices

  1. Your temperature/humidity sensor will now display as a thermostat device in your Google Home app and you should be able to ask for the temperature/humidity reading in the assigned room

Examples:

Hi google, what’s the temperature in the living room
The Xiaomi Aqara Temp Sensor is off and it’s currently 23 degrees.

Hi google, what’s the humidity in the living room
The Xiaomi Aqara Temp Sensor has a current humidity reading of 43%.

NB: It may take a few minutes before the thermostat is displayed correctly in your Google Home app.
NB2: When asking for the temperature, Google will tell you that the sensor (“thermostat”) is off. Unfortunately, it’s not possible to remove this behavior (As far as I know).