From b7ff42be1eda057af4d29ba0475672d57e2161a5 Mon Sep 17 00:00:00 2001 From: kahrendt Date: Tue, 3 Oct 2023 05:58:14 -0400 Subject: [PATCH] Add Xor Condition (#3222) --- guides/automations.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/guides/automations.rst b/guides/automations.rst index 468a90f1e..f0c61f5f0 100644 --- a/guides/automations.rst +++ b/guides/automations.rst @@ -415,7 +415,7 @@ All Conditions -------------- - :ref:`lambda ` -- :ref:`and ` / :ref:`or ` / :ref:`not ` +- :ref:`and ` / :ref:`or ` / :ref:`xor ` / :ref:`not ` - :ref:`for ` - :ref:`binary_sensor.is_on ` / :ref:`binary_sensor.is_off ` - :ref:`switch.is_on ` / :ref:`switch.is_off ` @@ -501,10 +501,11 @@ and can be used to create conditional flow in actions. .. _and_condition: .. _or_condition: +.. _xor_condition: .. _not_condition: -``and`` / ``or`` / ``not`` Condition ------------------------------------- +``and`` / ``or`` / ``xor`` / ``not`` Condition +---------------------------------------------- Check a combination of conditions @@ -514,7 +515,7 @@ Check a combination of conditions then: - if: condition: - # Same syntax for and + # Same syntax for `and` as well as `xor` conditions or: - binary_sensor.is_on: some_binary_sensor - binary_sensor.is_on: other_binary_sensor