add power state debug
This commit is contained in:
@@ -67,7 +67,7 @@ void Hauslane::loop() {
|
||||
|
||||
// execute new button press every DELAY ms if needed to adjust state
|
||||
if (millis() - this->last_press > DELAY) {
|
||||
if (this->last_button) {
|
||||
if (this->last_button != NULL) {
|
||||
// button already pressed, so de-activate button
|
||||
button_press(this->last_button, false);
|
||||
} else if (this->meet_target) {
|
||||
@@ -108,6 +108,7 @@ void Hauslane::loop() {
|
||||
} else if (this->speed==0 && !this->light_cur) {
|
||||
// reset power flag
|
||||
this->power=false;
|
||||
ESP_LOGD(TAG, "Hood power: %d", this->power);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -227,7 +228,7 @@ void Hauslane::set_state(bool set_light, uint8_t set_speed) {
|
||||
this->send_light_state(set_light);
|
||||
}
|
||||
}
|
||||
if (speed != set_speed) {
|
||||
if (this->speed != set_speed) {
|
||||
// save current state of fan in memory
|
||||
ESP_LOGD(TAG, "Received fan speed: %d", set_speed);
|
||||
this->speed = set_speed;
|
||||
|
||||
Reference in New Issue
Block a user