Skip to content

Is it possible to turn stop displaying buttons entirely based on state? #65

Answered by jcwillox
maxshcherbina asked this question in Q&A
Discussion options

You must be logged in to vote

Yep, should be pretty easy with state_styles or by templating the display css property.

- type: custom:paper-buttons-row
  buttons:
    - entity: light.bedroom_light
      state_styles:
        'off':
          button:
            display: none

or with Jinja templates

- type: custom:paper-buttons-row
  buttons:
    - entity: light.bedroom_light
      style:
        button:
          background: black
          display: "{{ is_state(config.entity, 'off') and 'none' }}"
          # display: "{{ is_state('light.bedroom_light', 'off') and 'none' }}"

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by maxshcherbina
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #64 on December 02, 2021 01:20.