Moes BHT-002 Thermostat local control (Tuya based)

Hello to all.

I ended up adding the Moes BHT-002 thermostat to Home Assistant with local control.
The instruction is available at:
At the moment, only in Russian, please use the translator in the browser.


you are great!
it works perfectly

1 Like

this looks great, ive been tempted to buy one of these myself.
thanks for sharing your work!

1 Like

Hi, any idea if the tuya local integration will work with this version of Moe’s thermostat? (Good old Moe!)

I don’t know. But you can try.

Hi, in your blog you show a photo of the stat you have. Can you explain the function of the wire and the probe please?


Hi. Its external temp sensor. Thermostat can work with internal integrated temp sensor, with external temp sensor, or both.

I have ordered this:

I will report my success or not!

I’m still waiting for this to arrive. I think issue in China is slowing down ali-express.

Hi. Ooo now its problem. My parcel with “google coral tpu” also wait to be send.
And i think your ordered thermostat will work with placed me component.

@mariogor You say it works perfectly so could you brief me on what information you can get and can set.
I have one using the main tuya code in cloud mode which won’t let me see the floor temp, just the room temp. This does the job for me for now.

I want to install another where I need to read the floor sensor temp cos the BHT-002 is going to be outside the room. Then I need to be able to set the target temp to achieve my desired floor temp regardless of what the room temp says.

Will the current local version code let me do this?

  1. Have you tried in the current switch in the tuya application the sensor by which it works?
  2. Yes BHT-002 work with two sensors: external and internal. And after correct setup fine show and work with ha.

well renat, I don’t know I have not an external sensor. I had thought of trying to put a Xiaomi Mi Temperature on the floor and with an automation control the boiler with the renat lucaltuya saying that if the sensor temperature is low it raises the thermostat temperature and when you get to the targhet temperature it lowers the thermostat temperature but if it can be done with BHT-002 it is better

Well, my device has finally arrived, but I am having issues at this point:

tuya-cli link --api-key xxxxxxxxxxxxxxxxx --api-secret xxxxxxxxxxxxxxxxxxxxxxxxxxxxx --schema johnrad --ssid xxxxxxxxxxx --password xxxxxxxxxxxxx --region eu
✖ Device(s) failed to be registered!
Error: Timed out waiting for devices to connect.
    at TuyaLinkWizard.linkDevice (/home/laptop/.npm-global/lib/node_modules/@tuyapi/cli/node_modules/@tuyapi/link/index.js:117:17)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async link (/home/laptop/.npm-global/lib/node_modules/@tuyapi/cli/lib/link.js:47:19)

I am running from my ubuntu laptop, on the same network as the therm is connected. It has 2.4 and 5 access…

I think my tuya account is successfully registered as per this:

This is the device I am trying to use:

Many thanks


I’ve now got a new error

tuya-cli link --api-key xxxd --api-secret 8xxxxe --schema johnrad --ssid It xxx IP --password xxxxxx --region us
⠹ Registering devices(s)
      throw er; // Unhandled 'error' event

Error [ERR_SOCKET_CANNOT_SEND]: Unable to send data
    at Socket.onListenError (dgram.js:511:22)
    at Object.onceWrapper (events.js:422:26)
    at Socket.emit (events.js:315:20)
    at dgram.js:340:14
    at processTicksAndRejections (internal/process/task_queues.js:85:21)
Emitted 'error' event on Socket instance at:
    at Socket.onListenError (dgram.js:511:8)
    at Object.onceWrapper (events.js:422:26)
    [... lines matching original stack trace ...]
    at processTicksAndRejections (internal/process/task_queues.js:85:21) {

And if I set the location to China, a different error again:

✖ Device(s) failed to be registered!
Error: country code not support this area
    at OpenAPI._client.got_1.default.extend.hooks.afterResponse (/home/laptop/.npm-global/lib/node_modules/@tuyapi/cli/node_modules/@tuyapi/openapi/dist/api.js:68:31)
    at EventEmitter.<anonymous> (/home/laptop/.npm-global/lib/node_modules/@tuyapi/cli/node_modules/got/dist/source/as-promise.js:87:38)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

I’m stuck…


if you want to use the Tuya app you must first connect the thermostat to the tuya app on your smartphone and then in the configuration.yaml enter this:
username: ‘your account tuya’
password: ‘password account tuya’
country_code: ‘see
if you want better local control you have to follow renat’s instructions

I’m getting error saying "Platform error climate.localtuya - Integration 'localtuya' not found." (Rpi3)

Path to the folder is


This is in my configuration.yaml

climate moes:
  platform: localtuya
  local_key: 'xxx'
  device_id: 'xxx'
  name: 'moes'
  scan_interval: 5
  min_temp: 15
  max_temp: 25
  target_temp: 22
  protocol_version: 3.3

I’ve already tried rebooting the device a few times, still the same error.
Thanks for your help.

Delete moes in climate
Your config climate moes: change to climate:

Didn’t help, still the same error

Platform error climate.localtuya - Integration 'localtuya' not found.

Hello… Nice Project. I ahave a question: I have Xiaomi IR blaster to send commands to my AC via IR. Therefore I use a custom component. I saw There’s something like a bridge look here:

I now wanna somehow sync the thermostat with my actual climate component. any idea how I could “bridge” this? Your component has no mqtt afaik.

Thanks in advance .) Nice project anyway!