I want to use the conditional card to display a different card depending on the condition.
Let me explain. I use the shutter-card for my sunscreens. Which works fine.
But i want to add conditions to the card e.g. when the window is open, one must not be able to use the card. (I have more conditions, like weather etc.)
At first I asked the maker of the card if he he could add conditions to his card. But I never had any reaction.
Then I tried to use card-mod with the card, but that was also no success.
(See my question in this thread)
Then I thought would it be possible to use the conditional card and, depending on the condition true/false, display the shutter-card or an picture card with a gif from the shutter?
I tried it with an other card (weather card) in order to test the condition mechanism.
As long as I am in the card editor, this seems to work.
Here is the window closed:
And here is the window opened:
So it looks like the mechanism is working. But when I save the card, I see both cards in Lovelace:
This is the code I use:
type: vertical-stack
cards:
- type: conditional
conditions:
- entity: binary_sensor.raam_sensor_keuken_1_contact
state: 'off'
card:
type: custom:shutter-card
title: Screens voorzijde
entities:
- entity: cover.screen_1
name: keuken (1)
buttons_position: left
title_position: top
- type: conditional
conditions:
- entity: binary_sensor.raam_sensor_keuken_1_contact
state: 'on'
card:
type: weather-forecast
entity: weather.home
show_forecast: true
name: Culemborg (Met.no)
forecast_type: legacy
Is there anybody who can help me with this? I don’t understand why it is working within the editor and fails in the finished dashboard.
Kind regards, Bert