mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-24 09:46:59 +00:00
Removed statement where conditional card only supports "and" (#30593)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
683651664c
commit
6ef7d13490
@ -7,12 +7,7 @@ description: The Conditional card displays another card based on conditions.
|
||||
|
||||
The conditional card displays another card based on conditions.
|
||||
|
||||
<p class='img'>
|
||||
<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 %}
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user