Moes BHT-002 Thermostat local control (Tuya based)

Hey Kravatak76,
Yes, you can get the current temperature when using this custom integration.
It would be an attribute of the climate entity that the integration creates once it’s set.
You can check it by going to the (1) “Developer Tools”, and (2) “States”, and then find your climate device (3). There you will be able to see the “current temperature” attribute (4).
That attribute can be used in many different ways like automations, scripts, dashboards, and much more. :wink:

Hi @reinaldo, thank you very much. I tried creating a sensor entity, everything works great. I just have a question, if there isn’t a simpler way in HA to create it than writing it manually in the configuration.

bed_temperature_sensor:
        friendly_name: "Bed Temperature Sensor"
        value_template: "{{ state_attr('climate.bed_thermostat', 'current_temperature') }}" 

Hey @Kravatak76,
Yes, since HA 2023.09 now you can.
It’s still basically the same JSON solution but with a much nicer visual interface.
They introduced a new “Helper” called “Template Sensor”.
There you can create JSON sensors that are now much easier to manage from within the Home Assistant interface. It’s still JSON, but works great and you have an instant visualization if it’s working as well.
I’ve taken a screenshot from my mobile. :joy:
Hope it helps.

1 Like

Hi @reinaldo , cool i found this but i didn’t know how to use it. thanks a lot :slight_smile:

Hi @reinaldo One more question. Is it possible to find out from some attribute that the thermostat has turned on the heating or that the heating is on? Thank you

As far as I know… there is no way to get that information on HA. You can even see it on the Tuya app, but I asked around as well, but never managed to get hold of it.
The way I set it here is by using HA to control that thermostat at all times with automations. I have individual smart radiator valves linked to temperature probes and if any valve opens, that triggers the boiler thermostat to “Heat” and set a high temperature so it will surely turn the heat On. Then turn it off as soon as all valves closes again.
So basically this thermostat is just an On/Off switch for me… hehe.

@reinaldo so if I understand correctly, it cannot be controlled via HA at all. that’s sad

@reinaldo interestingly, according to this article https://smarthomescene.com/reviews/moes-zigbee-smart-thermostat-bht-002/, the thermostat should have an integrated HA entity running_state: The current running state (Idle, Heat, Cool). Is it possible that only the zigbee version has it?

My best guess is that since this integration is not official, it might be outdated or it simply does not have access to this new attribute.
You could open a ticket on this integration git and ask for the developer to have a look. I myself am not a programmer so I can’t help with that sort of problem. :wink:
The other solution is… If you are up for the challenge, you could try to fix it yourself and propose a PR to the project maintainer. =)
Cheers!

I have a smart thermostat type WT400-3A-B


I wanted to control the thermostat with the original Tuya firmware via localtuya.

I can switch on some functions such as parental controls. I can also see the status of the relay or valve.
What I absolutely cannot manage is setting the target temperature.
I also don’t see any actual temperatures or anything else that has to do with the actual temperature control.

I have all the data points.

> `{
"result": {
"properties": [
{
"code": "switch",
"custom_name": "",
"dp_id": 1,
"time": 1697708912396,
"value": true
},
{
"code": "mode",
"custom_name": "",
"dp_id": 2,
"time": 1697708912433,
"value": "manual"
},
{
"code": "temp_set",
"custom_name": "",
"dp_id": 16,
"time": 1697708919341,
"value": 180
},
{
"code": "upper_temp",
"custom_name": "",
"dp_id": 19,
"time": 1697708912471,
"value": 400
},
{
"code": "temp_current",
"custom_name": "",
"dp_id": 24,
"time": 1697708921302,
"value": 210
},
{
"code": "lower_temp",
"custom_name": "",
"dp_id": 26,
"time": 1697708912569,
"value": 100
},
{
"code": "temp_correction",
"custom_name": "",
"dp_id": 27,
"time": 1697708912607,
"value": 0
},
{
"code": "valve_state",
"custom_name": "",
"dp_id": 36,
"time": 1697708919297,
"value": "close"
},
{
"code": "factory_reset",
"custom_name": "",
"dp_id": 39,
"time": 1697384377876,
"value": false
},
{
"code": "child_lock",
"custom_name": "",
"dp_id": 40,
"time": 1697708919321,
"value": false
},
{
"code": "sensor_choose",
"custom_name": "",
"dp_id": 43,
"time": 1697708912627,
"value": "in"
},
{
"code": "fault",
"custom_name": "",
"dp_id": 45,
"time": 1697708912724,
"value": 0
},
{
"code": "backlight_enum",
"custom_name": "",
"dp_id": 52,
"time": 1697708912453,
"value": "50_bright"
},
{
"code": "temp_floor",
"custom_name": "",
"dp_id": 101,
"time": 1697384377876,
"value": 0
},
{
"code": "freeze_free",
"custom_name": "",
"dp_id": 103,
"time": 1697708912767,
"value": true
},
{
"code": "programming_mode",
"custom_name": "",
"dp_id": 104,
"time": 1697708912742,
"value": "weekend"
},
{
"code": "temp_differ_on",
"custom_name": "",
"dp_id": 106,
"time": 1697708912587,
"value": 5
},
{
"code": "schedule",
"custom_name": "",
"dp_id": 108,
"time": 1697708923324,
"value": "BgAUCAAQCx4UDB4QEQAUFgAQCAAUFwAQ"
}
]
},
"success": true,
"t": 1697708938372,
"tid": "b97bd14d6e6411ee8a93c6134cf5636b"

`

I’ve been trying to configure the device for hours now but it just won’t work.
Now I don’t know if it’s an error in localTuya or if the error is here in front of the screen.
Would be nice if you could help me.

Thanks and regards

Please, anyone can point me to the right direction to have “current temperature” properly displayed.
I have configured the BHT-002 using the Local Tuya integration and the “temperature target” is displayed properly, but the “current temperature” is divided by 5.
I am running HAOS Core 2023.11.2 and Local Tuya 5.2.1

Tia would the zigbee version of this part number BHT-002-GC be easier to integrate as it shouldnt need the tuyalocal. I already have HA generic thermostat and i already have zigbee ZHA so could i just use this as my switch entity ?

Hello, I have 15 pcs of bht-002 thermostats.

-I flashed the first 8 pcs to the wthermostat-v1.22-fas.bin software without any problems, there was a TW3S chip. These work continuously

-but I had the other 7 pcs with the CB2S chip, which does not support this firmware, so I re-soldered them with esp8266, everything seemed to work correctly.
-but now the thermostats freeze sporadically. Communication via mqtt continues to work, even restarting via the web interface does not help. I have to disconnect the power supply for a moment.
-sometimes I don’t freeze for a few days, other times 3 pcs per day.
with the flood CB2S I had the thermostats connected for 1 month and they worked without problems.

Please do you know where the problem could be?

Hello sorry if I am in the wrong place. But I have a Moes BHT-002, and I am really ok with original app and using original cloud. Only thing I want is that the deadzone temperature set to 0.5, originally it is 1C - means if 21C temp set it would turn on the heater only when it drops to 20C but not 20.5C.
What are the easiest way to do it?

I am also interested in setting a lower deadzone temperature. Does anyone know anything about this?

You cannot change the deadzone temperature lower than 1°C.
At least with the original firmware.

1

I want to receive the information I marked in red.When the set value is reached, automation will be triggered with this information.How can I get this information?

Also having a bit of trouble catching the states of this thermostat.
Having such code:

 - type: state-icon
            entity: climate.termo1dush
            icon: mdi:heating-coil
            icon_color: 
              if (attributes.hvac_action === 'idle') return 'green';
              if (attributes.hvac_action === 'off') return 'green';
              if (attributes.hvac_action === 'heat) return 'red';
            tap_action:
              action: more-info
            style:
              top: 55%
              left: 40%
              transform: rotate(270deg)

But the icon de not change color on turning on/off
Any suggestion?