That’s exactly how I did it. A little round-about, but it gets the job done. I’ve got a helper:
input_boolean.dashboard_einkaufsliste_visible
And these are the cards:
type: heading
heading: Einkaufsliste 🛒
heading_style: title
tap_action:
action: perform-action
perform_action: input_boolean.toggle
target:
entity_id: input_boolean.dashboard_einkaufsliste_visible
badges:
- type: entity
show_state: true
show_icon: true
entity: todo.google_keep_einskaufsliste
color: amber
type: todo-list
entity: todo.google_keep_einskaufsliste
visibility:
- condition: state
entity: input_boolean.dashboard_einkaufsliste_visible
state: "on"