mqtt-discovery-types
Version:
Typescript Types For HomeAssistant MQTT Discovery
86 lines (71 loc) • 2.35 kB
TypeScript
import type { StatefulCommandEntityDiscovery } from "./BaseEntityDiscovery.ts";
/**
* @see https://www.home-assistant.io/integrations/alarm_control_panel.mqtt/#discovery
*/
export interface AlarmPanelDiscovery extends StatefulCommandEntityDiscovery {
/**
* 'REMOTE_CODE' or 'REMOTE_CODE_TEXT' will pass the code to the alarm panel integration for validation.
* Otherwise, the code will be validated internally by Home Assistant, not passed along.
* */
code?: string;
/**
* If true the code is required to arm the alarm. If false the code is not validated.
* @defaultValue true
*/
code_arm_required?: boolean;
/**
* If true the code is required to disarm the alarm. If false the code is not validated.
* @defaultValue true
*/
code_disarm_required?: boolean;
/**
* If true the code is required to trigger the alarm. If false the code is not validated.
* @defaultValue true
*/
code_trigger_required?: boolean; // default true
/**
* The template used for the command payload.
* Available variables: `action`, `code`.
*/
command_template?: string;
/**
* The payload to set armed-away mode.
* @defaultValue 'ARM_AWAY'
*/
payload_arm_away?: string;
/**
* The payload to set armed-home mode.
* @defaultValue 'ARM_HOME'
*/
payload_arm_home?: string;
/**
* The payload to set armed-night mode.
* @defaultValue 'ARM_NIGHT'
*/
payload_arm_night?: string;
/**
* The payload to set armed-vacation mode.
* @defaultValue 'ARM_VACATION'
*/
payload_arm_vacation?: string;
/**
* The payload to set armed-custom-bypass mode.
* @defaultValue 'ARM_CUSTOM_BYPASS'
*/
payload_arm_custom_bypass?: string;
/**
* The payload to set disarmed mode.
* @defaultValue 'DISARM'
*/
payload_disarm?: string;
/**
* The payload to trigger the alarm.
* @defaultValue 'TRIGGER'
*/
payload_trigger?: string;
/**
* A list of features supported by the alarm panel.
* @defaultValue ['arm_away', 'arm_home', 'arm_night', 'arm_vacation', 'arm_custom_bypass', 'trigger'];
*/
supported_features?: ['arm_away', 'arm_home', 'arm_night', 'arm_vacation', 'arm_custom_bypass', 'trigger'];
}