The then action is to stop the timer program and shut down the fan.
this action is called by turning the switch off or after a time out when the light is either not
turned on or turned off when the fan is running.
The goal of this is to ensure that the timer program is stopped whenever the fan is stopped.
11.2.2
Bathroom Fan Control Solution example #2
For my bathroom fan I set up three programs that provide a simple timer that will run the
fan for 10 minutes for each time the ON switch is pressed.
First I created a STATE variable: sMasterBathFan with an initial value of 0.
The first program adds 1 to the state variable each time the on button is pressed:
11.2.2.1Program: MBA Fan - On
If
Control 'MBA Exhaust Fan' is switched On
Then
$sMasterBathFan += 1
Else
- No Actions - (To add one, press 'Action')
33
(posted by: jaysmc)
33
Page | 256