ATTiny boards seem interesting... I like the one you suggested and started looking around at options... I ran across this Digispark ATTiny85 that looks quite small and a good candidate as well.... Any experience with this one?Once I did lots of messing about with microcontrollers, then I learned about the ESP devices that come pre-assembled on nice board easy to add on to. A big plus is they have a USB socket right on board so all you need to program them is a USB cable you may well already have.
For your task I would look at the D1-Mini, perhaps 5 bucks each if you can find someone selling just one.
Writing the program isn't very hard though it is in C. The web is stuffed with tutorials, all the tools (programs) you would need to write your program are free.
Here's one on Amazon
Most of the pins can marked "D"-something be used as either an output or input. Oh, they also have Bluetooth. And Wi-Fi. Mine work with Alexa.
https://www.amazon.com/Ximimark-Dig...id=1643812671&sprefix=digispark,aps,96&sr=8-7