Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PlatformAccessory<T>

Export Platform Accessory Types

Type parameters

Hierarchy

  • EventEmitter
    • PlatformAccessory

Index

Constructors

  • new PlatformAccessory<T>(displayName: string, uuid: string, category?: Categories): PlatformAccessory<T>

Properties

UUID: string
_associatedHAPAccessory: Accessory
_associatedPlatform?: string
_associatedPlugin?: string
category: Categories
context: T = ...

This is a way for Plugin developers to store custom data with their accessory

displayName: string
reachable: boolean = false
deprecated

reachability has no effect and isn't supported anymore

services: Service[] = []

Methods

  • addService(service: Service | typeof Service, ...constructorArgs: any[]): Service
  • Parameters

    • service: Service | typeof Service
    • Rest ...constructorArgs: any[]

    Returns Service

  • configureCameraSource(cameraSource: LegacyCameraSource): CameraController
  • configureController(controller: Controller<ControllerServiceMap> | ControllerConstructor): void
  • emit(event: "identify"): boolean
  • getService<T>(name: string | T): undefined | Service
  • Type parameters

    • T: WithUUID<typeof Service>

    Parameters

    • name: string | T

    Returns undefined | Service

  • getServiceById<T>(uuid: string | T, subType: string): undefined | Service
  • Type parameters

    • T: WithUUID<typeof Service>

    Parameters

    • uuid: string | T
    • subType: string

    Returns undefined | Service

  • getServiceByUUIDAndSubType<T>(uuid: string | T, subType: string): undefined | Service
  • removeController(controller: Controller<ControllerServiceMap>): void
  • removeService(service: Service): void
  • updateReachability(reachable: boolean): void
  • deprecated

    reachability has no effect and isn't supported anymore

    Parameters

    • reachable: boolean

    Returns void