changed fan logic to look for light instead presence in a restroom

fixed some typedefs