mirror of
https://github.com/esphome/esphome.git
synced 2025-03-02 04:01:43 +01:00
Add safety clause to reading modes
This commit is contained in:
parent
a8a14c761b
commit
60891b4d01
@ -155,7 +155,7 @@ void LTR390Component::setup() {
|
||||
void LTR390Component::dump_config() { LOG_I2C_DEVICE(this); }
|
||||
|
||||
void LTR390Component::update() {
|
||||
if (!this->reading_) {
|
||||
if (!this->reading_ && mode_funcs_.size() > 0) {
|
||||
this->reading_ = true;
|
||||
this->read_mode_(0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user