Make door state less noisy in sec+1 mode
This commit is contained in:
parent
86a44366c4
commit
f11ec99ae3
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue