From cc59a4192ebe90968267140396cfa8dad3b1e159 Mon Sep 17 00:00:00 2001 From: corneyl Date: Mon, 12 Mar 2018 14:02:33 +0100 Subject: [PATCH] Added info on AND condition (#4867) --- source/_docs/scripts/conditions.markdown | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/source/_docs/scripts/conditions.markdown b/source/_docs/scripts/conditions.markdown index d2dc0638d80..a9e0b8c5647 100644 --- a/source/_docs/scripts/conditions.markdown +++ b/source/_docs/scripts/conditions.markdown @@ -28,6 +28,21 @@ condition: below: '20' ``` +If you do not want to combine AND and OR conditions, you can also just list them sequentially, by default all conditions have to be true. +The following configuration works the same as the one listed above: + +```yaml +condition: + - condition: state + entity_id: 'device_tracker.paulus' + state: 'home' + - condition: numeric_state + entity_id: 'sensor.temperature' + below: '20' +``` + +Currently you need to format your conditions like this to be able to edit them using the [automations editor](/docs/automation/editor/). + ### {% linkable_title OR condition %} Test multiple conditions in 1 condition statement. Passes if any embedded condition is valid.