One Button state card is regularly broken
Hi,
totally forgot to report this. One of my button state cards is regularly broken. With the Icon, I control a Hue Smart plug. If I turn it off, the LG TV, which is the entity of the card, is taken from power. And this seems to be the issue. When the entity is offline, the card does not show. It blinks up for a second and then the error appears. Can we add a fallback value here?
Screenshots
On Desktop:
On Android companion app different error message then:
Cannot read properties of undefined (reading 'forEach')
YAML
type: custom:bubble-card
card_type: button
card_layout: normal
tap_action:
action: perform-action
perform_action: button.press
target:
entity_id: button.wake_on_lan_dc_03_98_13_7c_3e
button_type: state
icon: mdi:monitor-speaker
sub_button:
- entity: remote.android_tv_192_168_0_20
show_attribute: false
icon: phu:nvidia-shield
tap_action:
action: navigate
navigation_path: "#shield"
double_tap_action:
action: perform-action
perform_action: androidtv.adb_command
target:
entity_id: media_player.android_tv_192_168_0_20
data:
command: >-
am start -a android.intent.action.VIEW -d -n
com.nvidia.remotelocator/.RemoteLocatorActivity
state_background: true
show_background: false
- entity: media_player.lg_tv
icon: mdi:television
show_attribute: false
tap_action:
action: navigate
navigation_path: "#TV"
show_background: false
- entity: media_player.lg_tv
select_attribute: source_list
icon: mdi:video-input-hdmi
show_background: false
- entity: media_player.hyperceiver_2
icon: mdi:audio-video
tap_action:
action: none
hold_action:
action: toggle
state_background: true
show_background: false
entity: media_player.lg_tv
show_state: true
modules:
- default
scrolling_effect: false
show_attribute: false
show_last_changed: false
hold_action:
action: perform-action
target:
entity_id: light.steckdose_tv
perform_action: light.toggle
Informations (please complete the following information):
- OS: [e.g. iOS]
- Browser/App: Waterfix/Android App
- Bubble Card version: beta 3
- Home Assistant version: 2025.4.4
Thank you! 🍻
Can you check your browser console to see if you have a more detailed error?
Uncaught TypeError: i is undefined a bubble-card.js:2 d bubble-card.js:2 d bubble-card.js:2 d bubble-card.js:2 d bubble-card.js:2 d bubble-card.js:2 handleButton bubble-card.js:9 updateBubbleCard bubble-card.js:2527 connectedCallback bubble-card.js:2527 connectedCallback scoped-custom-element-registry.ts:424 value hui-masonry-view.ts:256 value hui-masonry-view.ts:237 bubble-card.js:2:557 a bubble-card.js:2 d bubble-card.js:2 d bubble-card.js:2 d bubble-card.js:2 forEach self-hosted:160 d bubble-card.js:2 d bubble-card.js:2 handleButton bubble-card.js:9 updateBubbleCard bubble-card.js:2527 connectedCallback bubble-card.js:2527 connectedCallback scoped-custom-element-registry.ts:424 value hui-masonry-view.ts:256 value hui-masonry-view.ts:237 AsyncFunctionNext self-hosted:804
Uncaught (in promise) TypeError: can't convert null to object value ha-selector.ts:99 value ha-selector.ts:128 update lit-element.ts:161 performUpdate reactive-element.ts:1333 scheduleUpdate reactive-element.ts:1262 _$Ej reactive-element.ts:1237 49 ha-selector.ts:99:24
Perfect, thank you!
Can you try to duplicate this card and to remove the sub-buttons?
I suspect an issue with the source_list sub-button.
Hi, I haven't mentioned it, but this might be fixed, let me know if everything works! 🤞
https://github.com/Clooos/Bubble-Card/releases/tag/v3.0.0-beta.6
Any feedback on this? Can I close this issue?
Hey 🖖 since we talked about it I put a duplicate card without those sub buttons below, but since then this never happend again. But with this same card I had the issue that I sometimes could not use long press on Icon anymore, but it always worked then on the card without the sub buttons. I would say we close this for now and I look how this is with the new beta 👍