Problem with implementing sleep mode on AtTiny13A

Hello everyone!
I was trying to edit the example code(WakeInterrupt) from SimpleSleep library for AtTiny13A, but have some problems. When I flashed the original sketch(WakeInterrupt) even LED does not turn on. I replaced sleep.deeply() function with sleep.deeplyFor(). Now LED turns on and AtTiny switches to sleep mode but interrupts don't work.
Can anyone help me with this problem? I attached my code below.

#include <SimpleSleep.h>

SimpleSleep Sleep;

const uint8_t ledPin = 2;
const uint8_t interruptPin = 1;

void setup()
{
  pinMode(ledPin, OUTPUT);
  pinMode(interruptPin, INPUT_PULLUP);
  attachInterrupt(digitalPinToInterrupt(interruptPin), interruptHandler, LOW);
}

void interruptHandler()
{ 
}

void loop()
{
  // Blink once then sleep until an external interrupt happens
  digitalWrite(ledPin, HIGH);
  delay(5000);
  digitalWrite(ledPin, LOW);
  Sleep.deeplyFor(10000);
}

I miss a link to that SimpleSleep library you used. It's not available in the IDE's library manager.

Which core do you use, that ATTinyCore doesn't support your chip.

pylon:
I miss a link to that SimpleSleep library you used. It's not available in the IDE's library manager.

Which core do you use, that ATTinyCore doesn't support your chip.

SimpleSleep full documentation page is THIS.
Be aware that this library is not available in IDE. You should add it by yourself.

I'm using MicroCore for my AtTiny13

I haven't found any error in the code.

Now LED turns on and AtTiny switches to sleep mode but interrupts don't work.

What exactly means "don't work"? Does it wake up after 10s?

Post a wiring diagram!

pylon:
What exactly means "don't work"? Does it wake up after 10s?

After falling asleep I'm pressing the button but nothing happens. AtTiny wakes up only after 10s.

Wiring diagram attached below

Your button is floating!

But I think I found the error. This is the implementation of a timed sleep in the library:

   volatile uint8_t wdt_triggered = 1;
    
    ISR (WDT_vect) 
    {
      wdt_disable();  
      wdt_triggered = 1;
    }
    
    static void timed_sleep(uint32_t sleepMs, uint8_t mode, uint8_t bod, uint8_t interrupts)
    {   
      do
      {
        // If we are not waiting on the WDT, and there is time still to sleep, setup the WDT (again)
        if (wdt_triggered && sleepMs)
        {
          wdt_triggered = 0;
          wdt_enable(wdt_period_for(&sleepMs));
          WDTCSR |= (1 << WDIE);  
        }
      
        set_sleep_mode(mode);
        cli();        
        sleep_enable();
        #ifdef sleep_bod_disable
          if(!bod)
          {
            sleep_bod_disable();
          }
        #else
          (void)(bod); // Silence warning
        #endif
        
        // Caution, with interrupts disabled the only way you are likely
        // to wake up is with a reset
        if(interrupts)
        {
          sei();
        }
        
        sleep_cpu();      
        sleep_disable();
        sei();
      } while(!wdt_triggered || sleepMs > 0);
    }

Problematic is do-while loop. Even if the CPU awakes the code won't return as long as sleepMS is greater than zero. The ATtiny13a has a maximum WDT period of 8s, if you call this routine with sleepMs = 10000, it will do the first sleep with a sleepMs at the value of 2000, so it won't return if the interrupt would wake the CPU during these 8 seconds. During the last 2 seconds I would expect the button to work.

You might get it to work better if you set the sleepMs value to 8s.