Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commands being ignored in Custom Styles/Templates #1219

Open
abwino opened this issue Feb 10, 2025 · 1 comment
Open

Commands being ignored in Custom Styles/Templates #1219

abwino opened this issue Feb 10, 2025 · 1 comment

Comments

@abwino
Copy link

abwino commented Feb 10, 2025

Describe the bug
when trying to change multiple sub button icon elements, it seems that only the first commands are actioned, any subsequent commands are ignored.

To Reproduce
See my YAML, this will reproduce the behaviour each time. Only sub button 1 will be affected.

Expected behavior
For all lines of code to be executed

YAML

.bubble-sub-button-1 > ha-icon {  color:
${hass.states['light.breakfast_room_door_outside'].state
=== 'on' ? 'goldenrod' : 'grey'} !important;

.bubble-sub-button-2 > ha-icon {  color:
${hass.states['light.courtyard_lights'].state
=== 'on' ? 'goldenrod' : 'grey'} !important;

Informations (please complete the following information):

  • OS: MACOS
  • Browser/App: Safari
  • Bubble Card version: 2.4.0
  • Home Assistant version: 2025.1.4
@abwino abwino added the bug Something isn't working label Feb 10, 2025
@MrBearPresident
Copy link
Collaborator

Your code doesn't look right.

Try this:

.bubble-sub-button-1 > ha-icon {  
  color: ${hass.states['light.breakfast_room_door_outside'].state === 'on' ? 'goldenrod' : 'grey'} !important;
} 

.bubble-sub-button-2 > ha-icon { 
  color: ${hass.states['light.courtyard_lights'].state === 'on' ? 'goldenrod' : 'grey'} !important;
} 

@MrBearPresident MrBearPresident added needs-more-information and removed bug Something isn't working labels Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants