Add RULE_TRIGGER to ActionExecutorEnum and introduce ActionTypeEnum

This commit is contained in:
faris Aljohari
2024-12-02 05:25:11 -06:00
parent 7dca9ea5ff
commit b507bcbdf1
5 changed files with 45 additions and 12 deletions

View File

@ -1,6 +1,7 @@
export enum ActionExecutorEnum {
DEVICE_ISSUE = 'device_issue',
DELAY = 'delay',
RULE_TRIGGER = 'rule_trigger',
}
export enum EntityTypeEnum {
@ -18,3 +19,8 @@ export const AUTOMATION_CONFIG = {
};
export const AUTOMATION_TYPE = 'automation';
export const AUTO_PREFIX = 'Auto_';
export enum ActionTypeEnum {
SCENE = 'scene',
AUTOMATION = 'automation',
}

View File

@ -1,3 +1,5 @@
import { ActionTypeEnum } from '@app/common/constants/automation.enum';
export interface ConvertedExecutorProperty {
function_code?: string;
function_value?: any;
@ -7,5 +9,6 @@ export interface ConvertedExecutorProperty {
export interface ConvertedAction {
entity_id: string;
action_executor: string;
action_type?: ActionTypeEnum;
executor_property?: ConvertedExecutorProperty;
}