tuya: use SetOption54 instead of SetOption22

This commit is contained in:
Joel Stein 2018-11-06 22:58:07 +01:00
parent 134a10d2c4
commit 7003435b34
2 changed files with 2 additions and 1 deletions

View File

@ -729,6 +729,7 @@ void MqttDataHandler(char* topic, byte* data, unsigned int data_len)
case 6: // mqtt_button_retain (CMND_BUTTONRETAIN)
case 7: // mqtt_switch_retain (CMND_SWITCHRETAIN)
case 9: // mqtt_sensor_retain (CMND_SENSORRETAIN)
case 22: // mqtt_serial (SerialSend and SerialLog)
case 23: // mqtt_serial_raw (SerialSend)
case 25: // knx_enabled (Web config)
case 27: // knx_enable_enhancement (Web config)

View File

@ -207,7 +207,7 @@ void TuyaPacketProcess()
}
tuya_new_dim = round(tuya_buffer[13] * (100. / 255.));
if((power || bitRead(Settings.flag.data, 22)) && (tuya_new_dim > 0) && (abs(tuya_new_dim - Settings.light_dimmer) > 1)) {
if((power || bitRead(Settings.flag3.data, 4)) && (tuya_new_dim > 0) && (abs(tuya_new_dim - Settings.light_dimmer) > 1)) {
snprintf_P(scmnd, sizeof(scmnd), PSTR(D_CMND_DIMMER " %d"), tuya_new_dim );