Skip to content

Commit

Permalink
Merge pull request #519 from mtfurlan/fix-tamper-disable
Browse files Browse the repository at this point in the history
support max open time=0
  • Loading branch information
omersiar authored Jun 22, 2022
2 parents 6e93254 + 9bc250e commit b4a78e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/door.esp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void doorStatus(/* arguments */)
mqttPublishIo("door", "ON");
lastDoorState = 0;
}
if ((lastDoorState == 0) && (lastTamperState == 0))
if (config.maxOpenDoorTime != 0 && (lastDoorState == 0) && (lastTamperState == 0))
{
if (currentMillis - openDoorMillis >= config.maxOpenDoorTime*1000)
{
Expand Down

0 comments on commit b4a78e7

Please sign in to comment.