Sharing sections/cards between lovelace views

I want to be able to create a section in one lovelace view, then reference it on another page, such that if I update it on one, both update. This is useful because I have multiple lovelace view for different devices or scenarios and I don’t want to have to go through and update all of them if something changes.

EDIT: I meant to include a link to more info about YAML anchors and aliases.

You can use anchors and aliases to repeat something in the YAML Here’s an example of two grid cards that would use repeat the same contents:

          - square: true
            type: grid
            columns: 4
            cards: &ref_0
              - show_name: true
                show_icon: true
                type: button
                tap_action:
                  action: toggle
                entity: cover.garage
                show_state: true
              - type: button
                tap_action:
                  action: toggle
                entity: lock.front_door
                name: Front
                show_state: true
              - type: button
                tap_action:
                  action: toggle
                entity: lock.back_door
                name: Back
                show_state: true
              - type: button
                tap_action:
                  action: toggle
                entity: cover.front_porch
                name: Shade
                show_state: true
                hold_action:
                  action: call-service
                  service: cover.set_cover_position
                  service_data:
                    position: 55
                  target:
                    entity_id: cover.front_porch
          - square: true
            type: grid
            cards: *ref_0
            columns: 4

Don’t get too attached to the name of the anchor, HA will change it when you save the file.

I use yaml dashboards and !include files in it. But I realize that is not the most user friendly way, so I certainly get the wish.

I also would like to see this feature. I know that there’s the ability to use YML anchors, but I feel like expecting people to dip into the YML is counter to the design principle the new section UI features.

I’d propose that a new section in the Settings > Dashboard area be created to manage reusable sections.

Isn’t this a duplicate FR.

1 Like

Yes. Closed. Please search before posting. You can vote and comment here: Shared Cards over multiple dashboards/tabs