Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/data/automation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export type Trigger =
| DeviceTrigger;

export interface LogicalCondition {
condition: "and" | "or";
condition: "and" | "not" | "or";
conditions: Condition[];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import type { Condition } from "../../../../data/automation";
import type { HomeAssistant } from "../../../../types";
import "./types/ha-automation-condition-and";
import "./types/ha-automation-condition-device";
import "./types/ha-automation-condition-not";
import "./types/ha-automation-condition-numeric_state";
import "./types/ha-automation-condition-or";
import "./types/ha-automation-condition-state";
Expand All @@ -21,6 +22,7 @@ const OPTIONS = [
"device",
"and",
"or",
"not",
"state",
"numeric_state",
"sun",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { customElement } from "lit-element";
import { HaLogicalCondition } from "./ha-automation-condition-logical";

@customElement("ha-automation-condition-not")
export class HaNotCondition extends HaLogicalCondition {}

declare global {
interface HTMLElementTagNameMap {
"ha-automation-condition-not": HaNotCondition;
}
}
3 changes: 3 additions & 0 deletions src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,9 @@
"for": "Duration"
}
},
"not": {
"label": "Not"
},
"numeric_state": {
"label": "[%key:ui::panel::config::automation::editor::triggers::type::numeric_state::label%]",
"above": "[%key:ui::panel::config::automation::editor::triggers::type::numeric_state::above%]",
Expand Down