Take care about pin numbering. You use GPIO 18, which is the 6'th pin at the outer side of the board, like here.
Unfortunately you haven't said anything about your LED wiring, so I can't tell you the right code.
Your power hat has red and green LED's, so I assume red is for off, and green for on.
That means, at least two pins must be in use for the LED's. Please tell me the pins, connected to the LED's.
PS: The data sheet doesn't tells the wiring, but the photo shows that only the first 12 pins (two rows) have connections to the power hat.
Chances are they use GPIO 17 and GPIO 18 for red and green LED's. Follow the wiring on the board to proof that theory.