Custom Lovelace Card - Homekit style card

+1 for me :slight_smile:

Furthermore, a few questions


  • is it also possible to have 3-width tiles? Wider only makes it 2 tiles width.
  • Can this also be filled up so that empty space if we use wider tiles, it will use empty space? This is problem i try to explain:

  • also: When using hold action on a custom card (minimediaplayer), it doesnt work. the tap-action does work when using for custom popup. Can you maybe also take a look at that?
  • And is it also possible to use code in a tile (so custom configurable, using templating such as the following in a card? right now there’s no possibility to do so i think? (see photo below)
The temperature is {{ my_test_json.temperature }} {{ my_test_json.unit }}.

nocodes

  • Last but not least: Can a dropdown from entity list also be available as dropdown? In my case i want to make something where i can select the mediaplayer, the playlist and then press execute for executigng a script. It works with normal cards, but inside the homekit, it is not showing correctly:

(no correct view of the dropdowns: )
wrong
(correct, but not styled dropdown entities:)
correct
Thank you!!!

1 Like

Lovely! Could you share your code?

Are there any solution to get a title name on the pupup using only the code thats within popup card? so far ive only made this possible with Browser mod and double klick.

Hi,

How can I a button-card filling all the tile ?
If i set the noPadding: false, i have this
Capture-d-e-cran-2020-07-13-a-10-44-31

And with noPadding: true, the tile is smaller than other, any idea ?
Capture-d-e-cran-2020-07-13-a-10-48-09

Here is the code:

      - column: 2
        #tileOnRow: 2
        entities:
          - title: SĂ©jour
            entities:
            - card: "custom:button-card"
              noPadding: true
              cardOptions:
                color_type: card
                entity: switch.garage_door
                wider: true
                name: Porte Garage
                tap_action:
                  action: toggle
                state:
                  - value: "off"
                    color: red
                    styles:
                      card:
                        - animation: blink 2s ease infinite 
                  - operator: default
                    color: green

              cardStyle: |
                .header {
                  padding: 0;
                }
                .header .icon {
                    color: #f7d959;
                }
                .states {
                  padding: 0;
                }
                .states .state .state__value {
                  font-size:14px;
                }
                 ha-card {
              
                --ha-card-border-radius: '0px'
               
                }

could you share the config of your mini media player ?

I can confirm this is the same with my mini media player (nopadding is messing with the content of the cards)

Yes, of course.

The card in the entities section is for me:

                      - card: "custom:mini-media-player"
                        noPadding: true
                        wider: true
                        higher: true
                        double_tap_action:
                          action: popup
                          entity: media_player.spotify_mart
                        cardStyle: |
                              ha-card {
                                height: 100%;
                                background: none  !important;
                                box-shadow: none !important;
                                position: relative;
                                font-size: 0.5vw !important;
                                image
                              }
                              ha-card{
                              overflow: hidden !important;
                              }
                              :host #primaryProgress{
                              background: #474A52 !important; 
                              display: flex !important;
                              height: 100%;
                              }
                        cardOptions:
                            artwork: full-cover
                            entity: media_player.spotify_mart
                            hide:
                              power: true
                              progress: false
                              runtime: true
                              icon: true
                              name: true
                              source: true
                              volume: true
                              controls: false

I just tried setting up Homekit card today and I am trying to put a large weather radar map on my tablet and a camera so I am interested in this as I assume its the only way I can do what I want:

" You can now render other lovelace cards like mini-graph-card inside a tile See how to use this"

but that link doesnt work and its not in the readme on that page.

Try this one https://github.com/DBuit/Homekit-panel-card#custom-card-as-a-tile

1 Like

i used the docs provided to add a picture-glance card to show my radar map but is it possible to make it even bigger than what “higher” and “wider” gives me? I tried setting tile-width: in the css and it didnt work.

I’d also love to get this code for the mini media player!

I already posted it 3 posts or something above.

Whoops, missed that. Sorry and thanks!

Hi there.
Do you cater for Alarm Panel arming and disarming with the homekit-card and light-popup-card?

Hi , still haveing issue with the card , no templates and the card doesn’t show yellow
 someone know where should i check, i just took the main example and changed entities , no templates


thanks

resources:
  - type: module
    url: /hacsfiles/lovelace-auto-entities/auto-entities.js

  - type: js
    url: /hacsfiles/bar-card/bar-card.js

  - type: module
    url: /hacsfiles/lovelace-battery-entity/battery-entity.js

  - type: module
    url: /hacsfiles/button-card/button-card.js

  - type: module
    url: /hacsfiles/lovelace-card-mod/card-mod.js

  - type: module
    url: /hacsfiles/custom-header/custom-header.js

  - url: /hacsfiles/decluttering-card/decluttering-card.js
    type: module

  - type: module
    url: /hacsfiles/flex-table-card/flex-table-card.js

  - type: module
    url: /hacsfiles/Homekit-panel-card/homekit-panel-card.js

  - type: module
    url: /hacsfiles/lovelace-layout-card/layout-card.js

  - url: /hacsfiles/light-entity-card/light-entity-card.js
    type: module

  - url: /hacsfiles/light-popup-card/light-popup-card.js
    type: module

  - type: module
    url: /hacsfiles/mini-graph-card/mini-graph-card-bundle.js

  - url: /hacsfiles/mini-media-player/mini-media-player-bundle.js
    type: module

  - type: module
    url: /hacsfiles/rgb-light-card/card.js

  - type: module
    url: /hacsfiles/simple-weather-card/simple-weather-card-bundle.js

  - url: /hacsfiles/slider-entity-row/slider-entity-row.js
    type: module

  - type: module
    url: /hacsfiles/upcoming-media-card/upcoming-media-card.js

  - type: module
    url: /hacsfiles/vertical-stack-in-card/vertical-stack-in-card.js

  - type: module
    url: /hacsfiles/lovelace-slider-entity-row/slider-entity-row.js

  - type: module
    url: /hacsfiles/weather-card/weather-card-bundle.js

  - Type: module
    url: /hacsfiles/swipe-card/swipe-card.js

  - type: module
    url: /hacsfiles/switch-popup-card/switch-popup-card.js


views:
  - title: "Example"
    path: "example"
    panel: true
    cards:
      - type: "custom:homekit-card"
        home: true
        # rules: |
        #   {% if "Vandaag" in states('sensor.blink_gft') %} <li>Vandaag groenebak aan de straat</li> {% endif %}
        #   {% if "Vandaag" in states('sensor.blink_papier') %} <li>Vandaag oudpapier aan de straat</li> {% endif %}
        #   {% if "Vandaag" in states('sensor.blink_pmd') %} <li>Vandaag plastic aan de straat</li> {% endif %}
        #   {% if "Vandaag" in states('sensor.blink_restafval') %} <li>Vandaag grijzebak aan de straat</li> {% endif %}
        #   {% if states('sensor.current_lights_on') | float > 0 %} <li>{{states('sensor.current_lights_on')}} lampen aan</li> {% endif %}
        #   {% if states('sensor.current_media_players_on') | float > 0 %} <li>{{states('sensor.current_media_players_on')}} speakers aan</li> {% endif %}
        title: "example"
        useBrightness: false
        useTemperature: false
        titleColor: "#FFF"
        enableColumns: true
        statePositionTop: true
        rows:
          - row: 1
            columns:
              - column: 1
                tileOnRow: 4
                entities:
                  - title: Lichtstrip
                    popup:
                      type: custom:light-popup-card
                      scenesInARow: 2
                      brightnessWidth: 130px
                      brightnessHeight: 350px
                      switchWidth: 110px
                      switchHeight: 300px
                    entities:
                      - entity: light.light1
                        name: Lichtstrip
                        icon: mdi:led-strip-variant
                        popupExtend:
                          actions:
                            - service: scene.turn_on
                              service_data:
                                entity_id: scene.ontspannen
                              color: "#FDCA64"
                              name: ontspannen
                            - service: scene.turn_on
                              service_data:
                                entity_id: scene.helder
                              color: "#FFE7C0"
                              name: helder
                            - service: scene.turn_on
                              service_data:
                                entity_id: scene.concentreren
                              color: "#BBEEF3"
                              name: concentreren
                            - service: scene.turn_on
                              service_data:
                                entity_id: scene.energie
                              color: "#8BCBDD"
                              name: energie
                      - entity: light.light2
                        name: Zithoek
                        icon: mdi:floor-lamp
                      - entity: light.light3
                        name: Eettafel
                        icon: mdi:ceiling-light

Hello, everyone,
I’m having some trouble getting the “custom:switch-popup-card” to work with my lock. I always get the following error. I just can’t get any further around here
 :thinking:

                      - entity: lock.haustur
                        popup:
                          type: custom:switch-popup-card
                          noActiveState: '-'
                          entity_value_path: state
                          entities:
                            - lock.haustur
                          buttons:
                            - icon: "mdi:lock-open"
                              value: "unlocked"
                              name: "Open"
                              color: "#FFF"
                              icon_color: "rgba(255,255,255,1)"
                              service: lock.unlock
                              service_data:
                              entity_id: lock.haustur
                            - icon: "mdi:lock"
                              value: "locked"
                              name: "Dicht"
                              color: "#FFF"
                              icon_color: "rgba(255,255,255,1)"
                              service: lock.lock
                              service_data:
                              entity_id: lock.haustur

Is it possible to add custom svg as icon of the tile like this:

Try to change the following line under popup

entities:
  - lock.haustur

to this one:

entity: lock.haustur

still not working, same error
 I have tried the following variants now.

                        popup:
                          type: custom:switch-popup-card
                          noActiveState: '-'
                          entity_value_path: state
                          entity: lock.haustur
                          buttons:

and

                        popup:
                          type: custom:switch-popup-card
                          noActiveState: '-'
                          entity_value_path: state
                          entities:
                            - entity: lock.haustur

Hi,

You van try image and offImage option check readme: https://github.com/DBuit/Homekit-panel-card

Not sure if IT works for svg’s in hml IMG tag