Custom Lovelace Card - Homekit style card

Hi, great work on this, really like it !
Trying to add my covers, but the color is always “on” and the icon does not update when the cover is actually opened:

- entity: cover.garagepoort
  name: Garage
  icon: mdi:garage
  offIcon: mdi:garage-open

afbeelding

Any idea what I am doing wrong? Also, adding state: true seems to break everything.

Please, I need someone to point out what I’m missing here; I’ve got most everything working with this except my dimmers. They all show (pop)up with a switch on/off option, rather than the slider.

resources:
  - url: /community_plugin/Homekit-panel-card/homekit-panel-card.js
    type: module
  - url: /community_plugin/light-popup-card/light-popup-card.js
    type: module
  - url: /community_plugin/switch-popup-card/switch-popup-card.js
    type: module
  - title: Home
    icon: mdi:home
    panel: true
    cards:
      - type: custom:homekit-card
        entities:
          - title: "Row 1"
            popup:
              type: custom:light-popup-card
              scenesInARow: 2
              brightnessWidth: 150px
              brightnessHeight: 400px
              switchWidth: 150px
              switchHeight: 400px
            entities:
              - entity: light.living_room
              - entity: light.master_bedroom
              - entity: light.patio

All three of those lights are dimmers, HA recognizes them as such of which I can set their brightness from the stock info panel from each. But when I try using the light-popup-card, I get the popup, but with a switch instead of a slider.

Hi @ranunculales,

Check you features level of the lights and maybe set the supportedFeaturesTreshold for the light popup default it is set to 9.

Hi @devastator,

Default the off state is checked for off or unavailable you can set more that should be shown as off.
Add offStates to your configuration and make it like this for example:

- entity: cover.garagepoort
  name: Garage
  icon: mdi:garage
  offIcon: mdi:garage-open
  offStates:
    - "off"
    - "unavailable"
    - "closed"

Hi atebeta,

You are using a pop-up card in combination with browser_mod?
I use this to style my popups:

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"

Hi,

I wanna add the settings and fullscreen. But color? for what or are do you mean the slider coloring options?

I checked the Developer Tools > States for both my Leviton and LIFX devices, they all show:

friendly_name: Living Room
supported_features: 1

friendly_name: Master Bedroom
supported_features: 1

friendly_name: Patio
supported_features: 1

In ui-lovelace.yaml I tried setting supportedFeaturesTreshold: 9 per your documentation with no change; I still get an on off switch for my dimmable devices. I also tried setting it to any integer 0-9 with the same result. On these same devices, I can successfully call a popup dimmer using other customs dimmer type cards… but I was (and am) hoping to use yours as I really like the design.

Strike that, I guess I hadn’t really tried setting it to 0. I just did and it worked! I’m good to go, thanks for the help!

Hi great it works. Yeah it checks that it is greater than the given value so when you set it to 0 it will work for 1 and higher.

1 Like

Hello everyone and @ASNNetworks,

I just updated the following popup cards:

3 Likes

Thanks @DBuit
Two other requests for the media player popup which aren’t necessarily urgent but would be nice to have i future versions:

  1. Option to specify if volume is stateless. Some of my media players have stateless volume so the % shows a NaN error (I guess because JS is unable to display the percentage)
  2. Show source list in the popup

Hi @mkhattab,

  1. If the volume is stateless that means that the entity has no volume level in home assistant? so home assistant does not know the current volume right?
  2. You wanna see what is currently playing or a list of favorites that you can choose from?
  1. Right - there is no volume entity for some of these media players (because they aren’t originally smart media players - for example a non-smart TV that Home Assistant thinks as smart because I’m using SmartIR custom component. This makes it almost the same as a smart tv but without a volume entity
  2. Just the list of sources you can choose from - the same list of sources the media player has (i.e. the source_list param in the media_player entity’s states

Thank you! Yes I meant the color options for styling of the slider, which you have now added :smiley:

Hello everyone,

Just updated the light, cover, mediaplayer and thermostat popup cards.

  • Fixed closing when on settings page by clicking next to content
  • When the card you are loading with settingsCard needs and entity, entity_id or entities you can also set this as the value. this is replaced with the entity of which the popup is opened for.

Hi DBuit,

Yes I use the light popup card in combination with the browser_mod (and decluttering card). I have messed around with a few different combinations of the style.

position: fixed
z-index: 999
top: 0
left: 0
height: 100%
width: 100%
display: block
align-items: center
justify-content: center
background: '[[background]]'
flex-direction: column
margin: 0
"--iron-icon-fill-color": "#FFF"

Which produces this:

I also wanted to try to make the popup not full screen and more like how it looks when you normally click on more-info so I tried this:

'--iron-icon-fill-color': '#FFF'
background: '[[background]]'
position: fixed
width: 375px
height: 767px
top: 50%
left: 50%
margin-top: -383px
margin-left: -187.5px
z-index: 999

@ASNNetworks Which produces this if I’m looking on a pc, but will be full screen like the first style on an iPhone:

The downside with this is that the popup box does not dynamically change size to fit the size of the contents (ie when you bring up the more-info popup by clicking settings)

so I tried this (with fullscreen: off):

'--iron-icon-fill-color': '#FFF'
background: '[[background]]'
position: flex

and get this:

which is a bit to squished together. I tried adding some padding to the top and bottom, which helped on the bottom, but the padding-top brought down the dark green bar with the title as well (btw still wondering how I can change the color of this bar to match the rest of the popup card?)

I tried adding:

justify-content: space-between
align-content: space-between

to try to space out the items, but it didn’t seem to do anything. In addition, the padding on the bottom didn’t help the position of the settings button when you click on it and go into the more-info popup.

Screenshot 2020-02-10 at 23.17.12

So in summary, if anyone knows how to properly space out the content of the flex box and also change the color of the title bar I would be grateful. At the moment it seems I will go with the 2nd style I posted which is full screen on the iPhone and not full screen on a monitor/pc.

just so I understand correctly, using this now as a browser-mod popup:

        - type: custom:light-popup-card
          entity: '[[[ return entity.entity_id ]]]'
          fullscreen: false
          sliderColoredByLight: true
          sliderThumbColor: 'var(--paper-card-background-color)'
          sliderTrackColor: ivory
          settings: false #builtin more info

would need to become:

        - type: custom:light-popup-card
          entity: this
          fullscreen: false
          sliderColoredByLight: true
          sliderThumbColor: 'var(--paper-card-background-color)'
          sliderTrackColor: ivory
          settings: false #builtin more info

? thanks for having a look. and for the update!

Hi @Mariusthvdb,

No it is not for that. It is for the settings part of the light pop-up: https://github.com/DBuit/light-popup-card/blob/master/README.md#settings

When you use settingsCard and nerd to set entity you can use this instead

ok I see, thanks for the extra explanation. Was a bit (too) quick and should have read better.sorry…

Hi @DBuit my thermostat-popup cards are not working since the new release. The screen just dims as if to show the popup but nothing actually appears

Hi @mkhattab,

Are you running the latest version of home assistant there was a bug with browser_mod popup.
If you are any errors in your console? and can you share you configuration?