From 7786d1e9ec4343b7ba19cddd0e939980cd81e3f3 Mon Sep 17 00:00:00 2001 From: Igor Mammedov Date: Thu, 23 May 2019 19:40:30 +0200 Subject: [PATCH] mhz19: drop not needed flush() call flush() is used to flush TX buffer, but there weren't anything written to TX yet, so it's pointless to call flush() so early. Remove unnecessary call. Signed-off-by: Igor Mammedov --- esphome/components/mhz19/mhz19.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/esphome/components/mhz19/mhz19.cpp b/esphome/components/mhz19/mhz19.cpp index 8f46e288b6..4c29e80e0e 100644 --- a/esphome/components/mhz19/mhz19.cpp +++ b/esphome/components/mhz19/mhz19.cpp @@ -51,7 +51,6 @@ void MHZ19Component::update() { } bool MHZ19Component::mhz19_write_command_(const uint8_t *command, uint8_t *response) { - this->flush(); this->write_array(command, MHZ19_REQUEST_LENGTH); this->write_byte(mhz19_checksum(command));