Custom Lovelace Card - Homekit style card

He Dave,

i haven’t tried to use it with layout card. the idea of the card is to use it as a panel in that it is the only card in the screen so i can understand that there could be some overlapping.

What are you trying to do? can you share your lovelace yaml than i can see if it can be fixed.

Thanks for getting back to me, I have a media player for my music and one for the TV on the same screen so I wanted to have them on the same page as the buttons.

Thanks for the update on the light popup! Awesome :slight_smile:

very nice!!

i figured out that scenesInARow has been replaced bij actionsInARow as well.

Yes that is true forgot to mention that the whole thing is renamed :slight_smile:

does anyone have a card config to share using browser-mod and the light-popup-card?

would be really appreciative… could this be setup so it pops-up on all lights more-info’s, and not have to set that per light indivually?

@Mariusthvdb the last part of the readme contains an example for browser mod pop-up: https://github.com/DBuit/light-popup-card/blob/master/README.md

Don’t know if you can do it easily for all lights

you mean the section beginning with “Example configuration in lovelace-ui.yaml” ?

I must be misunderstanding this completely, thought to need a browser-mod setting somehow… will need to study this further.

I think that would be made possible if you’d allow

card:
  type: custom:light-popup-card
  entity: >
    [[[ return entity.entity_id ]]]

or some other syntax filling in the entity as variable for the popup-card (eg compare button-card)).

Or maybe even leave out the entity, and default to the entity set in the base configuration. that would be even easier!

thanks!

I am going to release my setup within a few days (monday at tops). It contains this card in a browser-mod popup. I will keep you informed (you will also see how I did the notifications you asked for some time ago). I expect to release it this weekend!

ok this is progress…

I don’t see the 4 scenes buttons I am afraid, while using this config, do we need anything else to reveal them (translated to the actual scene names in Hue app, but that doesn’t make a difference:

light.kist:
  title: ""
  style:
    position: fixed
    z-index: 999
    top: 0
    left: 0
    height: 100%
    width: 100%
    display: block
    align-items: center
    justify-content: center
    background: rgba(0, 0, 0, 0.8)
    flex-direction: column
    margin: 0
    "--iron-icon-fill-color": "#FFF"
  card:
    type: custom:light-popup-card
    entity: light.kist
#    icon: mdi:led-strip
    scenesInARow: 2
    brightnessWidth: 150px
    brightnessHeight: 400px
    switchWidth: 150px
    switchHeight: 400px
    scenes:
      - scene: scene.relax
        color: "#FDCA64"
        name: ontspannen
      - scene: scene.clear
        color: "#FFE7C0"
        name: helder
      - scene: scene.concentrate
        color: "#BBEEF3"
      - scene: scene.energy
        color: "#8BCBDD"

btw, is this now using browser-mode, or simply the regular popup card technique?

that will probably be very nice, but doesn’t really help now does it :wink:
if you’d care to show me how to do what I want please do, without having to wait for your HK ‘release’. I don’t use that, and would only need some inspiration now to get me going… Would I maybe need a decluttering template and an auto-entities card to set this popup card automatically on all light.entities?

Maybe you can help? would be much appreciated! thanks.

The scenes will have to be available in HA to start with.

Also the scenes: has been renamed to actions (see a couple of postals above this)

scenesinarow is also renamed to actionsinarow

I don’t use decluttering-card, but yes that would be the way to go. (Srry you are right it doesn’t help you now, it is just a lot of code that is why haha and I know you don’t want to use my config because you are way more advanced than I am haha, no pun intended, as you really are much better at this).

Anyways, I use lovelace_gen but I guess decluttering card can do the same thing basically. I use auto-entities to fill in the buttons with entities listed in my groups (but could be a domain as well, but I guess you already know how to use auto-entities). To pass the entity to the next card I use “this.entity_id” which is a feature of auto-entities (If I remember it correctly).

However I think you have templated your button cards right? You could use a browser-mod popup-card in that template and use the same entity_id for both no?

Something like:

card:
  type: custom:button-card
  entity: "[[[ entity ]]]"
  hold_action:
    action: call-service
    service: browser_mod.popup
    service_data:
      title: ‘ ‘
      card:
        type: custom:light-popup
        entity: "[[[ entity ]]]"

Or isn’t this what you meant? (If not I am sorry for misunderstanding)

Edit: I have sent you a PM with all the code I have for this.

Is it possible to use the light-popup-card to control the brightness of light groups? I have a feeling that HA doesn’t properly recognise group.lights. When using the label template to show brightness for a group, it doesn’t work. I also noticed that when viewing the state using the dev tools for group.lights doesn’t show the brightness.

Is there a work-around to use this card for group.lights, or perhaps it is possible and I’m just missing it?

1 Like

You can make light groups which can do exactly what you want. I use them to group a 3 bulb zigbee ceiling light and use it as a single light.

It creates an extra entity in the light domain (so instead of getting a group.entity_id, it would get a light.entity_id) which can then be controlled by the light popup card. This works for my ceiling lights as well as my led strips, so I am guessing this will work for you too.

2 Likes

@Mariusthvdb

You suggested something like this:

card:
  type: custom:light-popup-card
  entity: >
    [[[ return entity.entity_id ]]]

but this is just how the card is rendered and the card is to control 1 lights or light group.
What you want is to define that every light entity shows this pop-up instead of the default more info pop-up and it uses browser-mods pop-up functionality to overwrite the default more-info pop-up so the first line in your example light.kist: set for which entity it must overwrite the pop-up and this is how browser-mod works, so thomas loven should change this to let it work for a group of entities for example. Can’t help you with that.

And the example in the readme is a bit old and the scenes part was rebuild to have more functionality and uses services now. this is the updated example:

actions:
  - service: scene.turn_on
    service_data:
      entity_id: scene.energie
    color: "#8BCBDD"
    name: energie
  - service: homeassistant.toggle
    service_data:
      entity_id: light.voordeurlicht
    name: voordeur
    icon: mdi:lightbulb

so scenes are now actions and uses a service and service_data, and scenesInARow should be renamed to actionsInARow

i also updated the full example in the readme!

hope this helps you to get the buttons to work below the slider, let me know!

thanx a bunch, you’re helping me out here! will test and report back :wink: very nice indeed this combo of custom cards in their various intertwined interactions …

will do, thank you very much.
as I understand it now, the action part can take any entity_id really, which can be cool indeed. Though when configured on a base entity, it would again be very nice to have the action take place on that entity, preventing the need for re-declaring it, and making it easier to create a generic template out of this. Maybe you can consider adapting the config of this card to do so: if no entity_id is given in the popup-card config or the actions, use the base entity. would be really nice.

secondly, about th scenes, in your example scene.energie: I now understand this has to be a declared HA scene, and isn’t the Hue App scene? Since it is in the actions here, does it take the base-entity as entity to set the scene on, or is it a full scene like

scene:
  - name: Gym on
    entities:
      light.kist:
        state: on
        brightness: 199
        hs_color: [36,66]
      light.gym_audio:
        state: on
        brightness: 100

thanks!

You can declare an existing ha scene there.

Thanks, I understand it now! I had lights as a group entity using groups.yaml, which acted as a group.light entity. But I need to use a group platform using configuration.yaml, which will create a group that actually acts like a light.light entity.