Constructor
# <ToggleSwitch checked type />
These are single-property sensors that have two states and toggle between those states. The states can either be true or false. During the development of this application 3 types of such switches were identified. They include onOff switches which are usually used to indicate a lamp somewhere is either on or off, openClose switches which are usually used to indicate if a door or window contact is open or closed and are usually true when the door or window contact is open and, last but not the least, there are the motionDetected sensors which are just motion detectors which returns a true value when there is a motion within the area the sensor covers.
PropTypes:
Name | Type | Required | Description | Default |
---|---|---|---|---|
checked |
bool | Yes | The state of the swtich. Whether it is true of false. | |
type |
enum | Yes | The type of switch it is. It must be one of onOff, openClose or motionDetected. |