neilimixamo / Home-Assistant-Quick-Look-Mobile

129 stars 6 forks source link

Add possibility to open another entity in popup #20

Closed kesm closed 1 year ago

kesm commented 1 year ago

Hello,

I would like to have the possibility to open another entity in the popup when clicking an item. Here is my case :

I have a switch in a room that act like a light entity and a light bulb. The switch power on or off the bulb and I have assigned it in QLM and it works great but I have no possibility to manage colors with that because it's linked to the light bulb. I can't add directly the light bulb in QLM because when the switch is off the light bulb is unavailable and I would like to be able to start it from QLM.

What I was thinking was something like this

          - type: custom:button-card # ENTITY 01
            template: light
            variables:
              entity: 
              name: 
              popup_to:
              expand_to: 
neilimixamo commented 1 year ago

You can assign a secondary entity to the left icon in this way :

          - type: custom:button-card # ENTITY 01
            template: light
            variables:
              entity:  light.example
              name: 
            custom_fields:
              icon:
                card:
                  entity: switch.example
kesm commented 1 year ago

That's perfect thank you!