Philio Door/Temp/Luinance Device Type

I did my best to clean up the code formatting. Here is a link to the post I think you are referring to. There is still some problem with the top of the code.