Yes 1/2 watt will do, but the circuit i gave will give you inverted data, 0V when thermostat is on, 5V when thermostat is off, but you should be able to deal with that in program.
Just remember most opto's are open collector and will require a pull up (or pull down) resistor, and as they are a isolated base device they can be used with either 5V+ or Ground supply.
The 470R resistor (pull up) in the circuit i gave, can be increased to 5k if you want to reduce the power loss through it, as it was only used as a low resistance to give a square edge wave for my purpose, as the output gets sloping edges with higher resistance on the pull up but this will not matter for your use.
@premelec, i do very much agree with your view of learning and developing ones own devices, as well as working from the junk we have at hand, but for this application where EG needed 6 of these devices i seen it cheaper and neater to use discreet devices, its also a good learning curve for what a opto do, as they really are a handy device to isolate circuits. (every junk box should have a dozen of them)