Add Xor Condition (#3222)

This commit is contained in:
kahrendt 2023-10-03 05:58:14 -04:00 committed by GitHub
parent f2b0b72613
commit b7ff42be1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -415,7 +415,7 @@ All Conditions
--------------
- :ref:`lambda <lambda_condition>`
- :ref:`and <and_condition>` / :ref:`or <or_condition>` / :ref:`not <not_condition>`
- :ref:`and <and_condition>` / :ref:`or <or_condition>` / :ref:`xor <xor_condition>` / :ref:`not <not_condition>`
- :ref:`for <for_condition>`
- :ref:`binary_sensor.is_on <binary_sensor-is_on_condition>` / :ref:`binary_sensor.is_off <binary_sensor-is_off_condition>`
- :ref:`switch.is_on <switch-is_on_condition>` / :ref:`switch.is_off <switch-is_off_condition>`
@ -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