### Checklist
- [X] I have updated to the latest available Home Assistant ver…sion.
- [X] I have cleared the cache of my browser.
- [X] I have tried a different browser to see if it is related to my browser.
- [x] I have tried reproducing the issue in [safe mode](https://www.home-assistant.io/blog/2023/11/01/release-202311/#restarting-into-safe-mode) to rule out problems with unsupported custom resources.
### Describe the issue you are experiencing
Multiple horizontal stack cards nested inside vertical stack card. When using the card editor and selecting the different horizontal stack cards, the selected horizontal stack card does not appear. Instead, the previous card is still displayed in the editor. This has resulted in multiple cards being incorrectly updated when using the visual editor.
### Describe the behavior you expected
When selecting a different set of horizontal stack cards within a vertical stack, it should select the correct cards by default.
### Steps to reproduce the issue
1. Create a Vertical Stack card
2. Create multiple Horizontal Stack cards within the Vertical Stack card
3. Save and exit
4. Return to Visual Editor and navigate around the different cards in the Vertical Stack and observe the displayed card in the editor does not always change.
...
### What version of Home Assistant Core has the issue?
2024.10
### What was the last working version of Home Assistant Core?
2024.9
### In which browser are you experiencing the issue with?
Safari Version 18.2 (20620.1.16.11.8) Chrome Version 131.0.6778.205 (Official Build) (arm64) Firefox 133.0.3 (aarch64)
### Which operating system are you using to run this browser?
macOS Sequoia 15.2
### State of relevant entities
_No response_
### Problem-relevant frontend configuration
```yaml
type: vertical-stack
cards:
- type: horizontal-stack
cards:
- type: custom:button-card
show_name: false
show_label: true
size: 100%
styles:
card:
- text-align: right
- padding-top: 15px
- font-family: Antonio
- height: 100px
- border-radius: 0px
- "--mdc-ripple-color": gray
- "--mdc-ripple-press-opacity": 0.5
- width: 15px
- background: black
label:
- padding-right: 10px
- justify-self: right
- font-size: 24px
- color: white
- type: custom:button-card
size: 100%
show_label: true
styles:
label:
- padding-right: 10px
- font-family: Antonio
- justify-self: right
- font-size: 36px
- color: black
- padding-bottom: 15px
card:
- text-align: right
- padding-top: 15px
- font-family: Antonio
- height: 100px
- width: 65px
- border-radius: 50px 0px 0px 50px
- "--mdc-ripple-color": gray
- "--mdc-ripple-press-opacity": 0.5
- background: |
[[[
if (states['input_select.sidebar_pages'].state == 'lights')
return "linear-gradient(45deg, rgb(244,244,244) 5%, rgb(255,255,255) 10%, rgb(244,244,244) 30%, rgb(221,221,221) 50%, rgb(244,244,244) 70%, rgb(255,255,255) 80%, rgb(244,244,244) 5%)"
else return "rgb(54, 69, 75)";
]]]
- box-shadow: |
[[[
if (states['input_select.sidebar_pages'].state == 'lights')
return "4px 4px gray"
else return "none";
]]]
label: |
[[[
return (states['sensor.total_lights'].state)
]]]
- type: custom:button-card
entity: sensor.keith_distance
name: Lights
template: sidebar_nav
tap_action:
action: call-service
service: input_select.select_option
service_data:
entity_id: input_select.sidebar_pages
option: lights
styles:
label:
- color: transparent
label: |
[[[
return (states['sensor.total_lights'].state)
]]]
- type: horizontal-stack
cards:
- type: custom:button-card
show_name: false
show_label: true
size: 100%
styles:
card:
- text-align: right
- padding-top: 15px
- font-family: Antonio
- height: 100px
- border-radius: 0px
- "--mdc-ripple-color": gray
- "--mdc-ripple-press-opacity": 0.5
- width: 15px
- background: black
label:
- padding-right: 10px
- justify-self: right
- font-size: 24px
- color: white
- type: custom:button-card
size: 100%
color_type: icon
show_label: true
color: auto
styles:
label:
- padding-right: 10px
- font-family: Antonio
- justify-self: right
- font-size: 36px
- color: black
- padding-bottom: 15px
card:
- text-align: right
- padding-top: 15px
- font-family: Antonio
- height: 100px
- width: 65px
- border-radius: 50px 0px 0px 50px
- "--mdc-ripple-color": gray
- "--mdc-ripple-press-opacity": 0.5
- background: |
[[[
if (states['input_select.sidebar_pages'].state == 'packages')
return "linear-gradient(45deg, rgb(244,244,244) 5%, rgb(255,255,255) 10%, rgb(244,244,244) 30%, rgb(221,221,221) 50%, rgb(244,244,244) 70%, rgb(255,255,255) 80%, rgb(244,244,244) 5%)"
else return "rgb(54, 69, 75)";
]]]
- box-shadow: |
[[[
if (states['input_select.sidebar_pages'].state == 'packages')
return "4px 4px gray"
else return "none";
]]]
label: |
[[[
return (states['sensor.total_package_deliveries'].state)
+ '<br>' + (states['sensor.mail_usps_mail'].state)
]]]
- type: custom:button-card
name: Deliveries
template: sidebar_nav
tap_action:
action: call-service
service: input_select.select_option
service_data:
entity_id: input_select.sidebar_pages
option: packages
label: |
[[[
return (states['sensor.total_package_deliveries'].state)
+ ' ' + (states['sensor.mail_usps_mail'].state)
]]]
- type: horizontal-stack
cards:
- type: custom:button-card
show_name: false
show_label: true
size: 100%
styles:
card:
- text-align: right
- padding-top: 15px
- font-family: Antonio
- height: 100px
- border-radius: 0px
- "--mdc-ripple-color": gray
- "--mdc-ripple-press-opacity": 0.5
- width: 15px
- background: black
label:
- padding-right: 10px
- justify-self: right
- font-size: 24px
- color: white
- type: custom:button-card
size: 100%
show_label: true
color_type: icon
color: auto
styles:
label:
- font-family: Antonio
- justify-self: right
- font-size: 36px
- color: black
- padding-bottom: 15px
card:
- text-align: right
- padding-top: 15px
- font-family: Antonio
- height: 100px
- width: 65px
- border-radius: 50px 0px 0px 50px
- "--mdc-ripple-color": gray
- "--mdc-ripple-press-opacity": 0.5
- background: |
[[[
if (states['input_select.sidebar_pages'].state == 'media')
return "linear-gradient(45deg, rgb(244,244,244) 5%, rgb(255,255,255) 10%, rgb(244,244,244) 30%, rgb(221,221,221) 50%, rgb(244,244,244) 70%, rgb(255,255,255) 80%, rgb(244,244,244) 5%)"
else return "rgb(54, 69, 75)";
]]]
- box-shadow: |
[[[
if (states['input_select.sidebar_pages'].state == 'media')
return "4px 4px gray"
else return "none";
]]]
label: |
[[[
return (states['media_player.living_room'].attributes.volume_level)
]]]
- type: custom:button-card
name: Music
template: sidebar_nav
tap_action:
action: call-service
service: input_select.select_option
service_data:
entity_id: input_select.sidebar_pages
option: media
label: |
[[[
return (states['media_player.living_room'].attributes.media_title)
+ '<br>' + (states['media_player.living_room'].attributes.media_artist)
]]]
styles:
label:
- font-size: 18px
view_layout:
position: sidebar
```
### Javascript errors shown in your browser console/inspector
_No response_
### Additional information
_No response_