mirror of https://github.com/arendst/Tasmota.git
use so136 to disable tuyasns immediate publish
This commit is contained in:
parent
40d231875f
commit
082ba8a8e8
|
@ -165,7 +165,7 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu
|
|||
uint32_t shift595_invert_outputs : 1; // bit 19 (v10.0.0.4) - SetOption133 - (Shift595) Invert outputs of 74x595 shift registers
|
||||
uint32_t pwm_force_same_phase : 1; // bit 20 (v10.1.0.6) - SetOption134 - (PWM) force PWM lights to start at same phase, default is to spread phases to minimze overlap (also needed for H-bridge)
|
||||
uint32_t display_no_splash : 1; // bit 21 (v11.0.0.2) - SetOption135 - (Display & LVGL) forece disbabling default splash screen
|
||||
uint32_t spare22 : 1; // bit 22
|
||||
uint32_t tuyasns_no_immediate : 1; // bit 22 (v11.0.0.4) - SetOption136 - (TuyaSNS) When ON disable publish single SNS value on Tuya Receive (keep Teleperiod)
|
||||
uint32_t spare23 : 1; // bit 23
|
||||
uint32_t spare24 : 1; // bit 24
|
||||
uint32_t spare25 : 1; // bit 25
|
||||
|
|
|
@ -830,7 +830,11 @@ void TuyaProcessStatePacket(void) {
|
|||
GetTextIndexed(sname, sizeof(sname), (fnId-71), kTuyaSensors);
|
||||
ResponseClear(); // Clear retained message
|
||||
Response_P(PSTR("{\"TuyaSNS\":{\"%s\":%s}}"), sname, dtostrfd(TuyaAdjustedTemperature(packetValue, res), res, tempval)); // sensor update is just on change
|
||||
MqttPublishPrefixTopicRulesProcess_P(TELE, PSTR(D_CMND_SENSOR));
|
||||
if (Settings->flag5.tuyasns_no_immediate) {
|
||||
XdrvRulesProcess(0);
|
||||
} else {
|
||||
MqttPublishPrefixTopicRulesProcess_P(TELE, PSTR(D_CMND_SENSOR));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue