n8n-nodes-base
Version:
Base nodes of n8n
64 lines (59 loc) • 1.57 kB
text/typescript
/**
* Home Assistant Node - Version 1
* Discriminator: resource=service, operation=call
*/
interface Credentials {
homeAssistantApi: CredentialReference;
}
/** Call a service within a specific domain */
export type HomeAssistantV1ServiceCallParams = {
resource: 'service';
operation: 'call';
/**
* Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>
*/
domain?: string | Expression<string>;
/**
* Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>
*/
service?: string | Expression<string>;
/**
* Service Attributes
* @default {}
*/
serviceAttributes?: {
/** Attributes
*/
attributes?: Array<{
/** Name of the field
*/
name?: string | Expression<string> | PlaceholderValue;
/** Value of the field
*/
value?: string | Expression<string> | PlaceholderValue;
}>;
};
};
export type HomeAssistantV1ServiceCallOutput = {
attributes?: {
friendly_name?: string;
supported_features?: number;
};
context?: {
id?: string;
parent_id?: null;
user_id?: string;
};
entity_id?: string;
last_changed?: string;
last_reported?: string;
last_updated?: string;
state?: string;
};
export type HomeAssistantV1ServiceCallNode = {
type: 'n8n-nodes-base.homeAssistant';
version: 1;
credentials?: Credentials;
config: NodeConfig<HomeAssistantV1ServiceCallParams>;
output?: Items<HomeAssistantV1ServiceCallOutput>;
};