From c9e224e9998918c0c0ad240225c8be56985e00ba Mon Sep 17 00:00:00 2001 From: Derek Hageman Date: Fri, 24 Apr 2020 19:10:41 -0600 Subject: [PATCH] SHTC3: Wake up the sensor during setup (#993) Since we put the sensor to sleep when not measuring, make sure to wake it up during setup. It does not respond to any other I2C commands (including reset) while asleep, so if we've done a soft reboot while it was sleeping then setup() would fail since it wouldn't respond to anything. --- esphome/components/shtcx/shtcx.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/esphome/components/shtcx/shtcx.cpp b/esphome/components/shtcx/shtcx.cpp index b8daceb1af..d67031febf 100644 --- a/esphome/components/shtcx/shtcx.cpp +++ b/esphome/components/shtcx/shtcx.cpp @@ -25,6 +25,7 @@ inline const char *to_string(SHTCXType type) { void SHTCXComponent::setup() { ESP_LOGCONFIG(TAG, "Setting up SHTCx..."); + this->wake_up(); this->soft_reset(); if (!this->write_command_(SHTCX_COMMAND_READ_ID_REGISTER)) {