• Lyra_Lycan@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    10 days ago

    For me I’ve experimented with restricted cards. For example, I have essentially a collapsed menu of controls for my PC, accessible only when a switch is toggled on, and the card with the switch is only visible to me.

        - type: conditional
          conditions:
            - condition: user
              users:
                - 9ecc550a1dc14e0a98071750a1673abc
          card:
            type: entities
            entities:
              - entity: switch.pc_admin_controls
                toggle: true
        - type: conditional
          conditions:
            - entity: switch.pc_admin_controls
              state_not: "off"
          card:
            type: grid
            columns: 4
    


    (Ignore that I haven’t fixed the yellow warning entities yet lol)

    • ikidd@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      9 days ago

      That’s a good solution. What is your PC controls yaml if it isn’t too private?

      • Lyra_Lycan@lemmy.blahaj.zone
        link
        fedilink
        English
        arrow-up
        1
        ·
        9 days ago

        Sorry, that would help wouldn’t it aha In templatesensors.yaml:

          - switch:
              unique_id: pc_admin_controls
              name: Admin Controls
              icon: mdi:shield-crown-outline
              turn_on: []
              turn_off: []
        

        I believe it could also be made in helpers UI now

        • ikidd@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          9 days ago

          I was just curious what functions you were running on the PC that you wanted to control via HA.

          • Lyra_Lycan@lemmy.blahaj.zone
            link
            fedilink
            English
            arrow-up
            1
            ·
            7 days ago

            I used to use Has Agent, now I have LNXlink, which had quick buttons for lock, log out, ctrl-F4 and alt-F4, and power controls. I also have media player functions for watching stuff and controlling from the couch. I tried to share yaml but I think it bypassed a comment limit