tuya: keep option to set dimmer-id at compile-time

This commit is contained in:
Joel Stein 2018-11-01 03:39:54 +01:00
parent 7f9f1f2f66
commit 9723d6de56
1 changed files with 3 additions and 0 deletions

View File

@ -310,6 +310,9 @@ void TuyaRequestState(){
void TuyaInit()
{
if (!Settings.param[P_TUYA_DIMMER_ID]) {
Settings.param[P_TUYA_DIMMER_ID] = TUYA_DIMMER_ID;
}
TuyaSerial = new TasmotaSerial(pin[GPIO_TUYA_RX], pin[GPIO_TUYA_TX], 1);
if (TuyaSerial->begin(9600)) {
if (TuyaSerial->hardwareSerial()) { ClaimSerial(); }