Help required to configure Broadlink RM temperature sensor

I have integrated the Broadlink RM temperature senor into home assistant and I can see the temperature. I would like to use the temperature to trigger a switch that switches on and off a fan if the temperature exceeds the set value and when it drops to a set value switches off. I want to use this when the weather is hot and the dogs are at home alone.

Any advice or pointers on the code I need, I’ve tried searching but cant find what I m looking for.



I think you need 2 automations 1) checks for above temp (use numeric_state) and has a condition that no-ones home so action is to turn on fan, 2) checks for below temp (use numeric_state) and the action is to turn off the fan. You could also add another condition for if it’s hot outside to the first automation - using a dark_sky sensor (or whatever you have setup), but I don’t really think you need this.

Thanks Keith, I have tried creating an automation to test it and to be honest I don’t know what trigger to use. I tried a numeric value against the sensor with an above 27, to switch on a lamp (as a test) and no surprise it does nothing.

I am a real newbie to Home Assistant, can you advise what type of trigger I need? I’m struggling to find any examples online to copy and modify.

Any pointers gratefully received.


Hi Keith,

I think patience got the better of me, came back on and the lamp is on. I assume there is a time setting for reading the sensor say every x minutes. I’ll play around with the on and off automations. Thanks for the pointer.

The triggers only trigger on a state change and with the added above or below then it has to go thru’ that threshold before triggering.

All sorted, switches on when the temperature exceeds 27 and off when it goes below 27. I left the sensor interval at 5 mins so it’s not constantly turning on and off.

I haven’t bothered with the presence detection as there’s too many in the house to worry about and the kids are changing phones every 5 minutes.