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

FR: Support visibility #85

Open
Mariusthvdb opened this issue Jul 15, 2024 · 1 comment
Open

FR: Support visibility #85

Mariusthvdb opened this issue Jul 15, 2024 · 1 comment

Comments

@Mariusthvdb
Copy link

Mariusthvdb commented Jul 15, 2024

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

the new visibility option is not supported, and we need to use conditional cards

Describe the solution you'd like
A clear and concise description of what you want to happen.

have decluttering-card support visibility

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

conditional card
Additional context
Add any other context or screenshots about the feature request here.

template:

card:
#   type: conditional
#   conditions:
#     - entity: switch.[[entity]]_privacy_mode
#       state_not: 'on'
#   card:
    type: picture-entity
    visibility:
      - entity: switch.[[entity]]_privacy_mode
        state_not: 'on'
    entity: camera.[[entity]]
  #     name: '[[name]]'
    show_state: false
    show_name: false
    camera_view: live

and card in dashboard:

  - type: custom:decluttering-card
    template: camera_privacy
    variables:
      - entity: bijkeuken
      - name: Bijkeuken

as you can see in the above yaml, I tried to replace conditional card with a straight replacement using visibility
it does not work, and the card is displayed no matter the visibility options set.

I also checked the core picture-entity card for support of the visibility option, and yes, that works nicely when used verbosely like

  - type: picture-entity
    visibility:
      - entity: switch.bijkeuken_privacy_mode
        state_not: 'on'
    entity: camera.bijkeuken
  #     name: '[[name]]'
    show_state: false
    show_name: false
    camera_view: live
@andreasbrett
Copy link

consider checking out https://github.com/brunosabot/streamline-card

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants