Dashboard visible to multiple users, but specific cards only visible to admin?

Hi everybody,

is it possible to modify specific cards within a dashboard so that only particular users can view them?

I have a shared dashboard that has links to each and every room. This dashboard can be accessed by any user. Everybody who can access this dashboard can also access each linked dashboard (for example, living room, kitchen, etc.)

But can I add cards within these dashboards that only the admin user can see? For example, each room has input_datetime entities when to turn off lights. Currently, all these are stored in a dashboard only admin can access. However, I’d like each these settings to be on the same dashboard that represents the room.

So instead of having this admin-only dashboard with settings for living room, kitchen, office etc., I’d like the time settings for the kitchen in kitchen, for office in office, etc. etc. BUT while those dashboards themselves are visible to all users, these setting values should be visible only to me.

I have browser_mod installed, I tried conditional cards, but I cannot seem to find a solution. If username = xyz, show that particular card - if not, don’t display it.

Can this be done? Thank you for your help :slight_smile:

Unfortunately, access control is not yet implemented. It has been requested a few times though, so line up with us :smiley:

1 Like

You can use a custom plug-in called “state-switch” to display different cards based on the logged in user.

here is an example for showing two different cards depending on the user:

- type: custom:state-switch
    entity: user
    default: default
    states:
      Me:
        type: entities
        title: Urgent Announcements
        show_header_toggle: false
        style: |
          ha-card {
            --restriction-lock-row-margin-left: 90%;
          }
        entities:
          - type: 'custom:restriction-card'
            card:
              type: custom:binary-control-button-row
              entity: input_boolean.tts_buzz_home_me
              customTheme: true
              reverseButtons: true
            row: true
          - type: 'custom:restriction-card'
            card:
              type: custom:binary-control-button-row
              entity: input_boolean.tts_buzz_home_emergency_me
              customTheme: true
              reverseButtons: true
            row: true
      Her:
        type: entities
        title: Urgent Announcements
        show_header_toggle: false
        style: |
          ha-card {
            --restriction-lock-row-margin-left: 95%;
          }
        entities:
          - type: 'custom:restriction-card'
            card:
              type: custom:binary-control-button-row
              entity: input_boolean.tts_buzz_home
              customTheme: true
              reverseButtons: true
            row: true
          - type: 'custom:restriction-card'
            card:
              type: custom:binary-control-button-row
              entity: input_boolean.tts_buzz_home_emergency
              customTheme: true
              reverseButtons: true
            row: true
      default:
        type: markdown
        content: >
          ## Unknown user

Some of the above wouldn’t be needed in your use case.

1 Like

Awesome, that works. Thank you.

1 Like