Make door state less noisy in sec+1 mode

This commit is contained in:
Paul Wieland 2024-07-11 16:39:17 -04:00
parent 86a44366c4
commit f11ec99ae3
1 changed files with 2 additions and 2 deletions

View File

@ -85,14 +85,14 @@ namespace ratgdo {
void RATGDOComponent::received(const DoorState door_state) void RATGDOComponent::received(const DoorState door_state)
{ {
ESP_LOGD(TAG, "Door state=%s", DoorState_to_string(door_state));
auto prev_door_state = *this->door_state; auto prev_door_state = *this->door_state;
if (prev_door_state == door_state) { if (prev_door_state == door_state) {
return; return;
} }
ESP_LOGD(TAG, "Door state=%s", DoorState_to_string(door_state));
// opening duration calibration // opening duration calibration
if (*this->opening_duration == 0) { if (*this->opening_duration == 0) {
if (door_state == DoorState::OPENING && prev_door_state == DoorState::CLOSED) { if (door_state == DoorState::OPENING && prev_door_state == DoorState::CLOSED) {