UNPKG

mqtt-discovery-types

Version:
37 lines (26 loc) 982 B
import type { DeviceDiscovery } from "./DeviceDiscovery"; /** * @see https://www.home-assistant.io/integrations/device_trigger.mqtt/ */ export interface DeviceTriggerDiscovery { automation_type: "trigger"; /** * Optional payload to match the payload being sent over the topic. */ payload?: string; /** * The maximum QoS level used when receiving and publishing messages. */ qos?: 0 | 1 | 2; /** * The MQTT topic subscribed to receive trigger messages. */ topic: string; /** * The type of trigger. */ type: string | 'button_short_press' | 'button_short_release' | 'button_long_press' | 'button_long_release' | 'button_double_press' | 'button_triple_press' | 'button_quadruple_press' | 'button_quintuple_press'; subtype: string | 'turn_on' | 'turn_off' | 'button_1' | 'button_2' | 'button_3' | 'button_4' | 'button_5' | 'button_6' device: DeviceDiscovery; value_template?: string; }