From 6ef7d13490142fb02c2132df77affa15d8eaa10b Mon Sep 17 00:00:00 2001 From: Danny Tsang <567982+dannytsang@users.noreply.github.com> Date: Tue, 2 Jan 2024 12:18:37 +0000 Subject: [PATCH] Removed statement where conditional card only supports "and" (#30593) Co-authored-by: Franck Nijhof --- source/_dashboards/conditional.markdown | 27 +++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/source/_dashboards/conditional.markdown b/source/_dashboards/conditional.markdown index d025ed9d71b..9c4d23f1696 100644 --- a/source/_dashboards/conditional.markdown +++ b/source/_dashboards/conditional.markdown @@ -7,12 +7,7 @@ description: The Conditional card displays another card based on conditions. The conditional card displays another card based on conditions. -

- Screenshot of the conditional card - Screenshot of the conditional card. -

- -Note: if there are multiple conditions there will be treated as an 'and' condition. This means that for the card to show, _all_ conditions must be met. +![Screenshot of the conditional card](/images/dashboards/conditional_card.gif) {% include dashboard/edit_dashboard.md %} Note that while editing the dashboard, the card will always be shown, so be sure to exit editing mode to test the conditions. @@ -40,6 +35,7 @@ card: ## Examples +Only show when all the conditions are met: ```yaml type: conditional conditions: @@ -62,6 +58,25 @@ card: - light.bed_light ``` +Example condition where only one of the conditions needs to be met: +```yaml +type: conditional +conditions: + - condition: or + conditions: + - condition: state + entity: binary_sensor.co_alert + state: 'on' + - condition: state + entity: binary_sensor.rookmelder + state: 'on' +card: + type: entities + entities: + - binary_sensor.co_alert + - binary_sensor.rookmelder +``` + ## Card conditions ### State