Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface API

Export types for basically everything but the actual API implementation

Hierarchy

  • API

Index

Properties

hap: __module
hapLegacyTypes: __module
platformAccessory: typeof PlatformAccessory
serverVersion: string

The current homebridge semver version.

user: typeof User
version: number

The homebridge API version as a floating point number.

Methods

  • on(event: "didFinishLaunching", listener: () => void): API
  • on(event: "shutdown", listener: () => void): API
  • Parameters

    • event: "didFinishLaunching"
    • listener: () => void
        • (): void
        • Returns void

    Returns API

  • Parameters

    • event: "shutdown"
    • listener: () => void
        • (): void
        • Returns void

    Returns API

  • versionGreaterOrEqual(version: string): boolean
  • Returns true if the current running homebridge version is greater or equal to the passed version string.

    Example:

    We assume the homebridge version 1.3.0-beta.12 (serverVersion) and the following example calls below

     versionGreaterOrEqual("1.2.0"); // will return true
    versionGreaterOrEqual("1.3.0"); // will return false (the RELEASE version 1.3.0 is bigger than the BETA version 1.3.0-beta.12)
    versionGreaterOrEqual("1.3.0-beta.8); // will return true

    Parameters

    • version: string

    Returns boolean