Back to Homebridge

Interface ClusterHandlerMap

docs/interfaces/ClusterHandlerMap.html

2.0.23.6 KB
Original Source
  • ClusterHandlerMap

Interface ClusterHandlerMap

Maps known cluster names to their typed handler interfaces.

Plugin developers get autocomplete for handler methods within each cluster. Handler argument types are derived from matter.js where possible, so they auto-update when the matter.js dependency is bumped.

Example

const accessory: MatterAccessory = { // ... handlers: { onOff: { on: async () => { await device.turnOn() }, off: async () => { await device.turnOff() }, }, levelControl: { moveToLevel: async (args) => { // args is typed as LevelControl.MoveToLevelRequest await device.setBrightness(args?.level ?? 0) }, }, },}Copy

interface ClusterHandlerMap {
colorControl: ColorControlHandlers;
doorLock: DoorLockHandlers;
fanControl: FanControlHandlers;
identify: IdentifyHandlers;
levelControl: LevelControlHandlers;
onOff: OnOffHandlers;
rvcCleanMode: RvcCleanModeHandlers;
rvcOperationalState: RvcOperationalStateHandlers;
rvcRunMode: RvcRunModeHandlers;
serviceArea: ServiceAreaHandlers;
thermostat: ThermostatHandlers;
valveConfigurationAndControl: ValveConfigurationAndControlHandlers;
windowCovering: WindowCoveringHandlers;
}

Index

Properties

colorControldoorLockfanControlidentifylevelControlonOffrvcCleanModervcOperationalStatervcRunModeserviceAreathermostatvalveConfigurationAndControlwindowCovering

Properties

colorControl

colorControl: ColorControlHandlers

doorLock

doorLock: DoorLockHandlers

fanControl

fanControl: FanControlHandlers

identify

identify: IdentifyHandlers

levelControl

levelControl: LevelControlHandlers

onOff

onOff: OnOffHandlers

rvcCleanMode

rvcCleanMode: RvcCleanModeHandlers

rvcOperationalState

rvcOperationalState: RvcOperationalStateHandlers

rvcRunMode

rvcRunMode: RvcRunModeHandlers

serviceArea

serviceArea: ServiceAreaHandlers

thermostat

thermostat: ThermostatHandlers

valveConfigurationAndControl

valveConfigurationAndControl: ValveConfigurationAndControlHandlers

windowCovering

windowCovering: WindowCoveringHandlers

Settings

Member Visibility

  • Inherited

ThemeOSLightDark

On This Page

Properties colorControldoorLockfanControlidentifylevelControlonOffrvcCleanModervcOperationalStatervcRunModeserviceAreathermostatvalveConfigurationAndControlwindowCovering