From b3d4451035786a82e1d9770f0dc5d506c2b75d4b Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Mon, 13 Dec 2021 20:01:41 +0100 Subject: [PATCH] Not valid config, but we support it in the editor (#10893) --- .../condition/types/ha-automation-condition-state.ts | 4 ++-- .../automation/trigger/types/ha-automation-trigger-state.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/panels/config/automation/condition/types/ha-automation-condition-state.ts b/src/panels/config/automation/condition/types/ha-automation-condition-state.ts index 5df15283b7..4a6e5a86ef 100644 --- a/src/panels/config/automation/condition/types/ha-automation-condition-state.ts +++ b/src/panels/config/automation/condition/types/ha-automation-condition-state.ts @@ -17,9 +17,9 @@ import { const stateConditionStruct = object({ condition: literal("state"), - entity_id: string(), + entity_id: optional(string()), attribute: optional(string()), - state: string(), + state: optional(string()), for: optional(union([string(), forDictStruct])), }); diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-state.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-state.ts index f48310da8e..c38e78d6a4 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-state.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-state.ts @@ -28,7 +28,7 @@ const stateTriggerStruct = assign( baseTriggerStruct, object({ platform: literal("state"), - entity_id: string(), + entity_id: optional(string()), attribute: optional(string()), from: optional(string()), to: optional(string()),