Automated toilet flush infrared to SwitchBot conversion

I put this in the hardware section before as i was trying to find a way to convert them, but now i have. Hope it might be of some use to someone.

Not sure if allowed to double post, so here’s the link: