mqtt-discovery-types
Version:
Typescript Types For HomeAssistant MQTT Discovery
43 lines (32 loc) • 1.24 kB
TypeScript
import type { BaseComponentDiscovery } from "./BaseEntityDiscovery.ts";
import type { MakeEntity } from './utils';
export type WaterHeaterDiscovery = MakeEntity<WaterHeaterComponentDiscovery>;
export type WaterHeaterModes = 'off' | 'eco' | 'electric' | 'gas' | 'heat_pump' | 'high_demand' | 'performance';
export interface WaterHeaterComponentDiscovery extends BaseComponentDiscovery {
platform: 'water_heater';
current_temperature_template?: string;
current_temperature_topic?: string;
initial?: number;
max_temp?: number;
min_temp?: number;
mode_command_template?: string;
mode_command_topic?: string;
mode_state_template?: string;
mode_state_topic?: string;
modes?: WaterHeaterModes[];
optimistic?: boolean;
payload_off?: string;
payload_on?: string;
power_command_template?: string;
power_command_topic?: string;
precision?: number;
temperature_command_template?: string;
temperature_command_topic?: string;
temperature_state_template?: string;
temperature_state_topic?: string;
temperature_unit?: 'C' | 'F';
/**
* Default template to render the payloads on all `*_state_topic` topics.
*/
value_template?: string;
}