fixed typoing issues
This commit is contained in:
1 parent
964ff54dc1
commit
32589b7c64
3 files changed
+13
-13
No files matched your search
@@ -20,7 +20,7 @@ export const TriggerTime: OptionManager<AutomationTriggerTime> = {
|
||||
value={state.at}
|
||||
onChange={_at => setState({
|
||||
...state,
|
||||
at: _at,
|
||||
at: _at ?? {},
|
||||
})}
|
||||
/>
|
||||
</>
|
||||
|
||||
@@ -50,7 +50,7 @@ export interface AutomationTriggerTemplate extends AutomationTriggerBase {
|
||||
}
|
||||
export interface AutomationTriggerTime extends AutomationTriggerBase {
|
||||
platform: 'time';
|
||||
at: string | string[];
|
||||
at: AutomationTime;
|
||||
}
|
||||
export interface AutomationTriggerTimePattern extends AutomationTriggerBase {
|
||||
platform: 'time_pattern';
|
||||
@@ -64,7 +64,7 @@ export interface AutomationTriggerWebhook extends AutomationTriggerBase {
|
||||
}
|
||||
export interface AutomationTriggerZone extends AutomationTriggerBase {
|
||||
platform: 'zone';
|
||||
entity_id: string;
|
||||
entity_id: string | string[];
|
||||
zone: string;
|
||||
event: 'enter' | 'leave';
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ export const getConditionDefaultValues = (condition: AutomationCondition['condit
|
||||
if (
|
||||
(condition === 'or') ||
|
||||
(condition === 'and') ||
|
||||
(condition === 'not')
|
||||
(condition === 'not')
|
||||
) {
|
||||
return {
|
||||
conditions: []
|
||||
@@ -29,7 +29,7 @@ export const getConditionDefaultValues = (condition: AutomationCondition['condit
|
||||
} as TimeCondition['condition_data']
|
||||
} else if (condition === 'trigger') {
|
||||
return {
|
||||
id: []
|
||||
id: ""
|
||||
} as TriggerCondition['condition_data']
|
||||
} else if (condition === 'zone') {
|
||||
return {
|
||||
@@ -42,12 +42,12 @@ export const getConditionDefaultValues = (condition: AutomationCondition['condit
|
||||
}
|
||||
|
||||
export const defaultAutomation = (id: string): AutomationData => ({
|
||||
metadata: {
|
||||
id,
|
||||
alias: "New Automation",
|
||||
description: "",
|
||||
mode: "single",
|
||||
},
|
||||
trigger: [],
|
||||
sequence: [],
|
||||
metadata: {
|
||||
id,
|
||||
alias: "New Automation",
|
||||
description: "",
|
||||
mode: "single",
|
||||
},
|
||||
trigger: [],
|
||||
sequence: [],
|
||||
})
|
||||
Reference in new issue
Block a user