Removed statement where conditional card only supports "and" (#30593)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
Danny Tsang 2024-01-02 12:18:37 +00:00 committed by GitHub
parent 683651664c
commit 6ef7d13490
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,12 +7,7 @@ description: The Conditional card displays another card based on conditions.
The conditional card displays another card based on conditions. The conditional card displays another card based on conditions.
<p class='img'> ![Screenshot of the conditional card](/images/dashboards/conditional_card.gif)
<img src='/images/dashboards/conditional_card.gif' alt='Screenshot of the conditional card'>
Screenshot of the conditional card.
</p>
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.
{% include dashboard/edit_dashboard.md %} {% 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. 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 ## Examples
Only show when all the conditions are met:
```yaml ```yaml
type: conditional type: conditional
conditions: conditions:
@ -62,6 +58,25 @@ card:
- light.bed_light - 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 ## Card conditions
### State ### State