X728 v2.5 Trixie Rpi4 trouble --how to get started?

I’ve tried following the online steps, but have got into trouble modifying scripts. What I want to do with this hat is simple: 1) turning on power from a cold shutoff of mains power shout boot the Rpi4 running Trixie, and 2) after mains power cutoff remotely, the hat after 3-5 second must initiate a soft shutdown of the RPi4, followed a few seconds later by a hard power cutoff to the Rpi4. How can I do this? Thanks!

Hello piguy101,

It would help if you could to provide some code so we can see what you’ve done so far… We won’t be able to help if all we have is ‘I want to do this thing with this other thing’.

It makes it much easier for us to offer constructive answers if you follow Community Guidelines #9. 11, & 14 by supplying a properly formatted configuration for the automation that you have attempted. Please share the YAML and any errors so we can see what you’ve done.