mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 01:07:45 +01:00
Don't send Tuya commands while currently receiving a message (#1886)
Co-authored-by: Chris Nussbaum <chris.nussbaum@protolabs.com>
This commit is contained in:
parent
04d926af39
commit
4395664547
1 changed files with 1 additions and 1 deletions
|
@ -333,7 +333,7 @@ void Tuya::send_raw_command_(TuyaCommand command) {
|
|||
void Tuya::process_command_queue_() {
|
||||
uint32_t delay = millis() - this->last_command_timestamp_;
|
||||
// Left check of delay since last command in case theres ever a command sent by calling send_raw_command_ directly
|
||||
if (delay > COMMAND_DELAY && !command_queue_.empty()) {
|
||||
if (delay > COMMAND_DELAY && !this->command_queue_.empty() && this->rx_message_.empty()) {
|
||||
this->send_raw_command_(command_queue_.front());
|
||||
this->command_queue_.erase(command_queue_.begin());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue