SR505 PIR sensor Time Delay Using Ticker Library NodeMCU
You really don't need the Ticker library. Just maintain a timestamp of the last time the PIR was seen to be HIGH:

void loop() {
    static uint32_t lastSeenHigh = millis();
    static bool pirState = false;

    // If it's active then record that fact along with the time
    if (digitalRead(SIGNAL_PIN) == HIGH) {
        lastSeenHigh = millis();
        pirState = true;
    } else {
        // otherwise, if it's been 12 seconds since last seen
        // active, record that it's inactive.
        // 20 seconds, minus the 8 second active time, times 1000 is
        // 12000 milliseconds to extend the time by
        if ((millis() - lastSeenHigh) &gt; 12000) {
            pirState = false;
        }
    }

    if (pirState == true) {
        // Do whatever you want in here when the PIR is active
    }
}


With that (untested) code:


Any time the PIR is active the current time is recorded and the state is set true
When the PIR is LOW and at least 12 seconds have passed since the last activation, set the state to false.