Hi just tried creating my first few conditional cards in Lovelace and I think they are working, but they leave a blank space in the GUI where they would later show up once the condition is met. Is this the standard functionality? I’d rather they don’t leave a space as I was hoping to use them in above other cards as a ‘priority reminder’. Is this possible?
I also am experiencing this with an Entity Filter card, it appears as a blank white box with no title. I was hoping it would disappear
I’m assume everyone is using this within a vertical-stack
card?
https://github.com/home-assistant/home-assistant-polymer/issues/2167
nope (it looks good on my Android phone in Chrome, just not on a PC)
Here is an example. The bin picture is a conditional and leaves a space when not shown. The space to the right of it is where another conditional shows up. On my phone the cards are all close together.
lovelace
title: Home
views:
- id: 0 # Automatically created id
title: default_view
icon: mdi:home
cards:
- id: 17e4fde5599c48189f64b72a56948f89 # Automatically created id
type: horizontal-stack
cards:
- type: entity-button
entity: script.bedtime
tap_action: call-service
service: script.turn_on
- type: entity-button
entity: script.movie_time
name: Movie
tap_action: call-service
service: script.turn_on
- type: entity-button
entity: input_boolean.party_mode # This will no longer work, need to change
name: Party
tap_action: toggle
- type: entity-button
entity: alarm_control_panel.house
tap_action: call-service
service: script.turn_on
service_data:
entity_id: script.house_alarm
- id: recyclingbindayconditinalremindertomorrow
type: conditional
conditions:
- entity: sensor.recycling_bin_tomorrow
state: "True"
card:
type: picture-entity
entity: sensor.recycling_bin_tomorrow
show_name: false
show_state: false
image: /local/images/recycling_bin_tomorrow.png
- id: recyclingbindayconditinalremindertoday
type: conditional
conditions:
- entity: sensor.recycling_bin_today
state: "True"
card:
type: picture-entity
entity: sensor.recycling_bin_today
show_name: false
show_state: false
image: /local/images/recycling_bin_today.png
- id: greenwastebindayconditinalremindertomorrow
type: conditional
conditions:
- entity: sensor.green_waste_bin_tomorrow
state: "True"
card:
type: picture-entity
entity: sensor.green_waste_bin_tomorrow
show_name: false
show_state: false
image: /local/images/green_waste_bin_tomorrow.png
- id: greenwastebindayconditinalremindertoday
type: conditional
conditions:
- entity: sensor.green_waste_bin_today
state: "True"
card:
type: picture-entity
entity: sensor.green_waste_bin_today
show_name: false
show_state: false
image: /local/images/green_waste_bin_today.png
- id: e1fe1afd30f34c799fda38ad41c572e6 # Automatically created id
type: entities
title: Internet Radio
show_header_toggle: false
entities:
- input_select.radio_station
- input_select.chromecast_radio
- script.radio
- input_number.volume_radio
# - type: entities
# title: Google Music
# show_header_toggle: false
# entities:
# - input_select.music
# - input_select.media_player
# - switch.google_music
- id: 8400f4da4fcd45c1a4c0e6ff169a2fae # Automatically created id
entity: media_player.house
type: custom:mini-media-player
icon: mdi:speaker-wireless
group: false
power_color: true
OMG @sparkydave I don’t have an answer to your question, but what a GREAT idea for reminding fhat tomorrow is trash day. We’re forever asking each other “is it recycling tomorrow or not?” Thanks!
No problem! I use the Google Calendar component for it. I added in the bin days to a Google Calendar then set up a sensor to check if the corresponding day is tomorrow or not, and then also use the regular sensor for that event to get the ‘today’. Each picture is a simple conditional in Lovelace. A different set of pictures come up if its the week for ‘green waste’.
cool thanks! I was going off to add it to my config, and then I fell down the rabbit hole of components and sensors and … <<SQUIRREL!>>
If only there were a sensor for when I’m distracted that could kick off an automation to zap me… Okay, maybe a bad idea.
Hahaha.
Let me know if you want the code for how I did it. I couldn’t have done it without help from others on this forum so happy to share.
I meant stack card in general. The vertical and horizontal cards are essentially the same code.
mine isn’t in any type of stack
wow I love this!!!
Would this also work if there are potentially 2 bin collections in 1 day?
for example: this friday I have compost bin and Glass/Plastic bin, then the following friday it is only the cardboard bin
Yeah, you can do as many as you want. I have two versions of the conditional card:
- Normal rubbish and recycling
- Normal rubbish and green waste
One week I get card 1 and the following week I get card 2
Do you have an icon for a green bin (for leaves etc)? I think this does not require a calendar… I think I can calculate the dates given some start date…
I’m using pictures rather than icons and I just looked but dont have the original (without my text over the top of it). It was just from a google images search.
do you have the same for the yellow bin Dave?
Yeah, I’ll post them for you when I get home later today
Here is all of them. I found the .psd files if you want them, so you can edit etc. The forum won’t let me upload them though…I’ll see if I can via PM
I can’t send them by PM either
Hmm. I can’t get lovelace to display the conditional card at all!