Janco245 wrote: It works great, but the thermostats sometimes hang up
.
Hi. Unfortunately the problem with the thermostat hanging up is due to instability of the MCU or its software. I have returned the hanging thermostats, leaving one for testing purposes. Because of such cases, I always make a backup of the original to restore it in case of problems and advertise the unit.
As for the Home Assistrant - you need to add the config file yourself to configuration.yaml and declare the device as mqtt: climate: as in my earlier example, then HA will recognise it as a thermostat.
The only trouble for you will be with the entity showing the actual state of the thermostat relay, ( mode_state_topic: 'BHT_B_cabinet/5/get', " because originally the thermostat does not send a state, the TUYA application infers the state based on comparing the actual temperature with the desired temperature, you need to rework the thermostat to read the presence of the voltage controlling the relay and pass this information to the free WB3S pin and include this in the configuration.
The topic has been covered here before, do a search, this has also been written about on the Tasmota forum, if you have trouble finding topics let me know, I can help.