import { PlatformAccessory } from "homebridge"; import { Button } from "./model/button.js"; import { PlejdHbPlatform } from "./PlejdHbPlatform.js"; import { PressType } from "./ButtonPressDetector.js"; /** * Button Accessory — supports two modes: * * **Grouped mode** (expand_buttons=false, default): * All Plejd buttons across all physical devices are grouped into a single * HomeKit "Plejd Remote" accessory with multiple StatelessProgrammableSwitch * services. Each button service is named after what it controls. * * **Expanded mode** (expand_buttons=true): * Each button becomes its own accessory with a single * StatelessProgrammableSwitch service. The accessory name is the button name, * which Home Assistant uses for entity naming. */ export declare class PlejdHbButtonAccessory { private readonly platform; private readonly accessory; private readonly buttonServices; /** The button this accessory represents (expanded mode only). */ readonly button?: Button; /** All buttons in this accessory (grouped mode only). */ readonly buttons?: Button[]; /** * Create a grouped-mode accessory (all buttons in one "Plejd Remote"). */ static createGrouped(platform: PlejdHbPlatform, accessory: PlatformAccessory, buttons: Button[]): PlejdHbButtonAccessory; /** * Create an expanded-mode accessory (single button per accessory). */ static createExpanded(platform: PlejdHbPlatform, accessory: PlatformAccessory, button: Button): PlejdHbButtonAccessory; private constructor(); private initExpanded; private initGrouped; firePressEvent(deviceAddress: number, buttonIndex: number, pressType: PressType): void; /** * Remove cached StatelessProgrammableSwitch services that no longer match * any button in the current config (handles removed buttons and legacy * per-device accessories that had different subtypes). */ private removeStaleServices; private pressTypeToCharacteristicValue; }