Simple on/off control of the extractor fan. Every time the state changes (on/off) an event is emitted to all listeners.
Members
isOn
static
currentState
inner
Current state of the Fan (on/off)
currentState
inner
Current state of the Fan (on/off)
FAN_DEF
inner
constant
Definitions for the fan.
Properties:
Name | Type | Description |
---|---|---|
name |
string | Unique fan name. |
i2cPinOut |
number | I2C pin number connected to the fan. |
FAN_OFF: number inner constant
I2C value used to switch ON the pump.
FAN_ON: number inner constant
I2C value used to switch OFF the pump.
HEAT_DEF inner constant
Definitions for the fan.
Properties:
Name | Type | Description |
---|---|---|
name |
string | Unique fan name. |
i2cPinOut |
number | I2C pin number connected to the fan. |
HEAT_OFF: number inner constant
I2C value used to switch ON the pump.
HEAT_ON: number inner constant
I2C value used to switch OFF the pump.
Methods
start()
static
Add listener to kettle temp and emit fan events when switching on and off.
start()
static
Add listener to kettle temp and emit fan events when switching on and off.
stop()
static
Remove kettle temp listener and fan event.
stop()
static
Remove kettle temp listener and fan event.
switchOff()
static
Turn off the fan.
Fires:
- event:fanEvent
switchOn()
static
Turn on the fan.
Fires:
- event:fanEvent
isOn() → boolean
inner
setState(state)
inner
Switch fan on or off
Arguments:
-
state
(number)
 on or off
setState(state)
inner
Switch fan on or off
Arguments:
-
state
(number)
 on or off
tempKettleHandler(data)
inner
Automatically switch on/off fan with temperature
Arguments:
-
data
(Object)
 Data from sensor.
state
(number)
 on or off
state
(number)
 on or off
data
(Object)
 Data from sensor.