WTH do cards not allow visibility conditions if editing in the UI isn't possible

A manual card of any type that has no Edit UI e.g. decluttering-card or swipe-card etc, should still allow the option of adding visibility conditions in the UI.

Well, decluttering card has no UI - but you can use visibility options:

  - type: custom:decluttering-card
    template: decl_test_x
    visibility:
      - condition: state
        entity: input_boolean.test_boolean
        state: "off"

Playground:

type: vertical-stack
cards:
  - type: entities
    entities:
      - input_boolean.test_boolean
  - type: entity
    entity: sun.sun
    name: 1 (if ON)
    visibility:
      - condition: state
        entity: input_boolean.test_boolean
        state: "on"
  - type: entity
    entity: sun.sun
    name: 2
  - type: custom:decluttering-card
    template: decl_test_x
    variables:
      - VALUE_NAME: 3 (if OFF)
    visibility:
      - condition: state
        entity: input_boolean.test_boolean
        state: "off"
  - type: entity
    entity: sun.sun
    name: 4
  decl_test_x:
    default:
      VALUE_NAME: ''
    card:
      type: entity
      entity: sun.sun
      name: '[[VALUE_NAME]]'

I think that’s the point - visibility in YAML works, but it’s not available in the UI and they should be. Same with the width/height options in sections.

Hard to believe - but many many custom cards do not have & do not want to have an UI editor.

I’m not sure how difficult it is to implement the UI editor is for custom cards, so I can understand some devs not wanting to have to develop/maintain it.

Regardless I think the visibility/layout options shouldn’t rely on whether the card itself has a UI editor, but should be available for all cards.

Thanks @Ildar_Gabdullin
I’m aware of the visibility node in the decluttering YAML. Let me rephrase:

I wish every card to have the visibility conditions in the UI, regardless of it having a UI or not. In fact, I would image the platform could do this as standard for each card type and it would benefit the rendering if it was standard. Perhaps each card type could flag that it wants/needs the visibility functionality - devs who don’t want/need it simply ignore the flag.

Just a though.