Skip to content
Dec 15, 2024 · 4 comments · 5 replies
Discussion options

You must be logged in to vote

You should handle it in one action, like this:

  ${subButtonIcon[0].setAttribute("icon",
  hass.states['binary_sensor.front_door'].state === 'unavailable' ? 'mdi:alert' : 
  hass.states['binary_sensor.front_door'].state === 'on' ? 'mdi:door-open' :
   'mdi:door')}

If this solves your problem, mark this as the solution and close the discussion.

Replies: 4 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@MrBearPresident
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@MrBearPresident
Comment options

@a-bianucci
Comment options

@MrBearPresident
Comment options

Answer selected by a-bianucci
@a-bianucci
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment