canWrite code to turn fan off is written