I had to rebuild a floorplan and reused the old code that used to work (credit to Fahr/Aaron). It’s supposed to display a single picture elements card based on an input select value. The same code is now displaying both cards when I close raw editor, and when I click “done” I get a blank view. I am a casual user and have gone over this code for days and cant find the issue.
input select in config.yaml (I’ve tried with and without quotes)
input_select:
floorplan_floor:
name: The select floor to show when viewing the floorplan.
options:
- "1st Floor"
- "2nd Floor"
initial: "1st Floor"
code in raw editor
- icon: mdi:floor-plan
cards:
- type: horizontal-stack
cards:
- type: conditional
conditions:
- entity: input_select.floorplan_floor
state: 1st floor
card:
type: picture-elements
image: /local/Floorplan/first_dark.png
panel: true
elements:
- type: service-button
title: 2nd floor
service: input_select.select_next
service_data:
entity_id: input_select.floorplan_floor
style:
top: 15%
left: 5%
background: '#eaeaea'
border-radius: 5%
- type: conditional
conditions:
- entity: input_select.floorplan_floor
state: 2nd floor
card:
type: picture-elements
image: /local/Floorplan/second_dark.png
panel: true
elements:
- type: service-button
title: 1st floor
service: input_select.select_next
service_data:
entity_id: input_select.floorplan_floor
style:
top: 15%
left: 5%
background: '#eaeaea'
border-radius: 5%
However instead of seeing a single card based on service button state, I see both cards (until I click done then I see a blank view)