Options
All
  • Public
  • Public/Protected
  • All
Menu

Houses are the highest level objects in the library. They hold an array of Rooms

example

const device = new Device({
      name:"testDevice",
      actions:[
          new HttpAction({
              name:"on",
              method:"GET",
              base:"http://device.ip/",
              path:"turnOn"
          })
      ]
})

const controller = new Controller({
    name:"Test Controller",
    layout:[
      <Button action={device.getAction("on")} icon="power-on"/>
      //OR
      //new Button({
      //    action:device.getAction("on"),
      //    icon:"power-on"
      //})
   ]
})

const room = new Room({name:"Test Room",controllers:[controller]})
new House({name:"Test House",rooms:[room]})

Hierarchy

  • House

Constructors

Properties

Methods

Constructors

constructor

  • new House(__namedParameters: object): House

Parameters

  • __namedParameters: object
    • name: string

      The display name of the House

    • rooms: Room[]

Returns House

Properties

name

name: string

rooms

rooms: Room[]

Methods

Static fromJSON

  • fromJSON(json: any): House

Parameters

  • json: any

Returns House

  • Inherited
  • Protected
  • Private
  • Static
  • Module
  • Object
  • Property
  • Function
  • Variable
  • Index
  • Type
  • Class
  • Interface
  • Enum
  • Constructor
  • Getter/Setter
Made with ❤️ by pirix-gh. Documentation generated by TypeDoc.