Class: OnOffControl

OnOffControl

new OnOffControl(home, id, options)

Construct a new On/Off control.
Parameters:
Name Type Description
home Home the home that this control belongs to.
id String the id of this control. Updates will be POSTed to home.control_endpoint/id
options Object options for this control:
  • name - String, required - friendly name for this control
  • on - boolean, default: false - whether the control is already "on" or not
  • on-label - String, default: "ON" - label to display when the control is on.
  • off-label - String, default: "OFF" - label to display when the control is off.
Source: