UNPKG

homebridge-risco-lite

Version:

A simple homebridge plugin to arm and disarm Risco alarm systems.

46 lines (45 loc) 1.47 kB
import type { CharacteristicValue, PlatformAccessory } from 'homebridge'; import type { RiscoAlarmPlatform } from './platform.js'; /** * Security System States in HomeKit: * 0 = STAY_ARM / Home - Some sensors are active * 1 = AWAY_ARM / Away - All sensors are active * 2 = NIGHT_ARM / Night - Subset of sensors are active * 3 = DISARMED / Off - All sensors inactive * 4 = ALARM_TRIGGERED / Alarm is triggered */ export declare class RiscoSecuritySystemAccessory { private readonly platform; private readonly accessory; private service; private securityState; constructor(platform: RiscoAlarmPlatform, accessory: PlatformAccessory); /** * Convert Risco ArmState to HomeKit security state */ private riscoToHomeKit; /** * Convert HomeKit security state to Risco ArmState */ private homeKitToRisco; /** * Get a human-readable description of the security state */ private getStateDescription; /** * Update the current state from Risco */ private updateCurrentState; /** * Handle "GET" requests from HomeKit for current state */ getCurrentState(): Promise<CharacteristicValue>; /** * Handle "GET" requests from HomeKit for target state */ getTargetState(): Promise<CharacteristicValue>; /** * Handle "SET" requests from HomeKit for target state */ setTargetState(value: CharacteristicValue): Promise<void>; }