BHT-6000 Thermostat (tuya) support

@itmax86
Encountered same error, it happens (rarely, one time till now) when set-temperature is triggered when the read-status is already running. Now I’m trying this workaround:

async def async_set_temperature(self, **kwargs):
    while True:
       try:
           self._lock.acquire()
           temperature = int(float(kwargs[ATTR_TEMPERATURE])*2)
           _LOGGER.debug("Set Temperature: " + str(temperature))
           if ATTR_TEMPERATURE in kwargs:
               self._device.set_status(temperature, '2')
               sleep(1)
           self._lock.release()
       except:
           _LOGGER.warning("Set Temperature Retry")
           continue
       break

@hdjweb1
There is no way to control directly the relay, it’s done by the thermostat and not by homeassistant. If you want to trigger the device as on/off use home assistant automation or appdaemon. to turn on, set any temp over the ambient temp, and to turn off any temperature below.