From 08bac15670e73deb59261aa30fe537aeb0da0771 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Fri, 24 Apr 2020 18:40:59 +0200 Subject: [PATCH] Add NOT condition helper (#13152) --- source/_docs/scripts/conditions.markdown | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/source/_docs/scripts/conditions.markdown b/source/_docs/scripts/conditions.markdown index e0fcdde6c3d..b818d147260 100644 --- a/source/_docs/scripts/conditions.markdown +++ b/source/_docs/scripts/conditions.markdown @@ -78,6 +78,22 @@ condition: below: 20 ``` +### NOT condition + +Test multiple conditions in one condition statement. Passes if all embedded conditions are **not** valid. + +```yaml +condition: + condition: not + conditions: + - condition: state + entity_id: device_tracker.paulus + state: 'home' + - condition: state + entity_id: alarm_control_panel.home_alarm + state: disarmed +``` + ### Numeric state condition This type of condition attempts to parse the state of the specified entity as a number, and triggers if the value matches the thresholds.