I would like a conditional card. That will be shown only when a different card is not show.
This means if the conditions of the first card are not met.
Sounds simple but there are to many conditions to use them.
So i would like to Display my second card based on the condition of the first card.
So i have a card, that shows my bins when they need to be empty.
This is a horizontal stack card, full of conditional cards that only show the bins that need to be at the street today or tomorrow.
This card has a tapaction that i build in there, so then when i tap it. the card disappears for 48 hours.(switched by a timer helper)
By that time the state of the bin has changed and it will also not display anymore because of today/tomorrow basis.
Once the bin is due next month. my timer will be reset. and the today/tomorrow state will make it so that it will display the card again.
So when i tap the bins i know they are emptied.
Once this card does not display any bins that need to be emptied. Its an empty space that i would like to fill with a different card.
But because there are so many different configurations of when some bins are empty en when not. its hard to use this as a condition.
I tried the And If way. but i have so many diffrent settings.
1 day it will be 2 bins showing. the other it will be 1.
Also considering that it only needs to display the replacement card at the moment the Timer helper is started. (when i pressed the bin and it has dissapeard)
See the full card:
type: horizontal-stack
cards:
- type: conditional
conditions:
- condition: state
entity: sensor.afvalbeheer_gft
state: Vandaag
- condition: state
entity: timer.timer_gft
state: idle
card:
show_state: true
show_name: false
camera_view: auto
type: picture-entity
entity: sensor.afvalbeheer_gft
image: /local/afbeeldingen/GFT1.png
tap_action:
action: perform-action
perform_action: timer.start
target:
entity_id: timer.timer_gft
card_mod:
style: |
ha-card
{background: transparent;
border-style: none;
color: red;
- type: conditional
conditions:
- condition: state
entity: sensor.afvalbeheer_gft
state: Morgen
- condition: state
entity: timer.timer_gft
state: idle
card:
show_state: true
show_name: false
camera_view: auto
type: picture-entity
entity: sensor.afvalbeheer_gft
image: /local/afbeeldingen/GFT1.png
tap_action:
action: perform-action
perform_action: timer.start
target:
entity_id: timer.timer_gft
card_mod:
style: |
ha-card
{background: transparent;
border-style: none;
color: red;
- type: conditional
conditions:
- condition: state
entity: sensor.afvalbeheer_restafval
state: Vandaag
- condition: state
entity: timer.timer_restafval
state: idle
card:
show_state: true
show_name: false
camera_view: auto
type: picture-entity
entity: sensor.afvalbeheer_restafval
image: /local/afbeeldingen/REST1.png
tap_action:
action: perform-action
perform_action: timer.start
target:
entity_id: timer.timer_restafval
card_mod:
style: |
ha-card
{background: transparent;
border-style: none;
color: red;
- type: conditional
conditions:
- condition: state
entity: sensor.afvalbeheer_restafval
state: Morgen
- condition: state
entity: timer.timer_restafval
state: idle
card:
show_state: true
show_name: false
camera_view: auto
type: picture-entity
entity: sensor.afvalbeheer_restafval
image: /local/afbeeldingen/REST1.png
tap_action:
action: perform-action
perform_action: timer.start
target:
entity_id: timer.timer_restafval
card_mod:
style: |
ha-card
{background: transparent;
border-style: none;
color: red;
- type: conditional
conditions:
- condition: state
entity: sensor.afvalbeheer_pmd
state: Vandaag
- condition: state
entity: timer.timer_plastic
state: idle
card:
show_state: true
show_name: false
camera_view: auto
type: picture-entity
entity: sensor.afvalbeheer_pmd
image: /local/afbeeldingen/PLASTIC1.png
tap_action:
action: perform-action
perform_action: timer.start
target:
entity_id: timer.timer_plastic
card_mod:
style: |
ha-card
{background: transparent;
border-style: none;
color: red;
- type: conditional
conditions:
- condition: state
entity: sensor.afvalbeheer_pmd
state: Morgen
- condition: state
entity: timer.timer_plastic
state: idle
card:
show_state: true
show_name: false
camera_view: auto
type: picture-entity
entity: sensor.afvalbeheer_pmd
image: /local/afbeeldingen/PLASTIC1.png
tap_action:
action: perform-action
perform_action: timer.start
target:
entity_id: timer.timer_plastic
card_mod:
style: |
ha-card
{background: transparent;
border-style: none;
color: red;
- type: conditional
conditions:
- condition: state
entity: sensor.afvalbeheer_papier
state: Vandaag
- condition: state
entity: timer.timer_papier
state: idle
card:
show_state: true
show_name: false
camera_view: auto
type: picture-entity
entity: sensor.afvalbeheer_papier
image: /local/afbeeldingen/PAPIER1.png
tap_action:
action: perform-action
perform_action: timer.start
target:
entity_id: timer.timer_papier
card_mod:
style: |
ha-card
{background: transparent;
border-style: none;
color: red;
- type: conditional
conditions:
- condition: state
entity: sensor.afvalbeheer_papier
state: Morgen
- condition: state
entity: timer.timer_papier
state: idle
card:
show_state: true
show_name: false
camera_view: auto
type: picture-entity
entity: sensor.afvalbeheer_papier
image: /local/afbeeldingen/PAPIER1.png
tap_action:
action: perform-action
perform_action: timer.start
target:
entity_id: timer.timer_papier
card_mod:
style: |
ha-card
{background: transparent;
border-style: none;
color: red;
I would like to just display 1 card when the conditions to display the other card are not met.
Hope this makes sense.