Homekit Infused 5 (HKI) v2023.1.3

What doesn’t work exactly?

If you did a full copy of this setup you can expect it to fail (as I have mentioned in the docs). Best would be to use pieces of code instead of copy/pasting everything. But that is probably how I would go at it. Some people managed to copy the whole thing and edit that, but I can only advise this to people that actually know how lovelace/homeassistant works.

If you are talking about the thermostat, then I would not know as I did not create the thermostat card and I only use heat/off (so no cool, which means no blue color for me).

Changing colors when the hvac_state changes

1 Like

Ah I see, yeah, just what I thought though. I have tried to do the same with my Tado valves. When I use the tado integration in HA it will not change the color. If I use the homekit_controller in HA then all the colors seem to work fine. I’m not sure how exactly this card figures out states, but something is off with it.

There is another thermostat card which is pretty decent as well and more functional than this one (but I use it because of its aesthetics) it is called simple-thermostat-card, you could take a look at that.

I am not done yet but I thought that I could share some pictures of what I have made using a lot of your config as inspiration (and copying). Maybe my config will also help others get an idea of how it works since I have less stuff and I trimmed out most of what I am not using.

https://gitlab.shane.app/home-server/hass-config/

1 Like

First, thank you so much for all of your documentation on this theme. I’ve learned a lot just by using your ideas and changing stuff around.

I’ve hit a roadblock though and it’s driving me mad, I can’t get the mini-media-player to actually change its background color unless I change the actual theme.yaml colors (which screws everything else up).
Capture
I was doing my own thing for a while, then got so frustrated I just straight up lifted your code and this is what it looks like… Any idea as to what I’m doing wrong?

I had this problem as well using card-modder. Not sure if it can be done with the newer card-mod. The problem I was facing is that it didn’t want to change it’s border-radius on ios. I have tried everything but couldn’t get it to work. I eventually ended up changing the border-radius in the js itself (hardcoding it).

Unfortunately I have only Apple TV’s and since I am on iOS 13 I can no longer access it via HA. This means that I can not test the card anymore until (and if) Apple fixes the connections to the Apple TV.

Btw I had a different color mini-media-player as well as I faced the same problems. Never really got into it anymore. I will look at it again as soon as I can use it again.

This looks great, I am glad my config has helped a lot of people out, always great to see what people come up with.

I just want to change the player to match the rest of the grey theme you got going.

It references the grey theme for its colors, however since the grey theme has paper-card-background-color: ‘black’, it makes it black. And if I change the background color, I have to change the text color, which then changes the rest of the theme.

The player actually has CSS tags listed in its documentation now, but there isn’t one to change the actual background. I think I might just use another card instead, or even the default one.

Yeah I know that is is black. Actually in my configuration it only matters when the player is not playing anything. As soon as it starts playing something it will change the card color to the album art cover in most cases. It was the only reason I used this card in the first place. I will take a look into it as soon as I get the opportunity.

Also my theme is not good atm, it has black elements on the wrong places. I am actually almost done with the interface, next up will be proper theming (and defining them globally). This will take a lot of time though to get it right.
Atm a lot of css is hardcoded into the cards and I want them to be variable so that changing themes in the future will just be a press on the button.

Thanks @jimz011, this is awesome! I started to implement things from you config right away. But I have an issue, I can’t get size of custom:decluttering-card to work, what have I missed?

code

      - type: horizontal-stack
        cards:
          - type: 'custom:button-card'
            color_type: blank-card
            styles:
              card:
                - width: 10px


      - type: custom:decluttering-card
        template: header_text
        variables:
          - content: '##### Vardagsrummet'

      - type: horizontal-stack
        cards:
          - type: 'custom:button-card'
            color_type: blank-card
            styles:
              card:
                - width: 10px

          - type: custom:decluttering-card
            template: light_button_card
            variables:
              - entity: light.vardagsrum_fonster
              - name: Fönstret
              - icon: lamp

          - type: custom:decluttering-card
            template: light_button_card
            variables:
              - entity: light.vardagsrum_lampa
              - name: Lampan
              - icon: floor-lamp

          - type: custom:decluttering-card
            template: light_button_card
            variables:
              - entity: light.vardagsrum_snehylla
              - name: Snehyllan
              - icon: lamp

          - type: custom:decluttering-card
            template: light_button_card
            variables:
              - entity: light.vardagsrummet_bokhyllan
              - name: Bokhyllan
              - icon: lamp

          - type: 'custom:button-card'
            color_type: blank-card
            styles:
              card:
                - width: 10px


      - type: horizontal-stack
        cards:

          - type: 'custom:button-card'
            color_type: blank-card
            styles:
              card:
                - width: 10px


          - type: custom:decluttering-card
            template: light_button_card
            variables:
              - size: 25%              
              - entity: light.vardagsrum_lilla_bokhyllan
              - name: Bokhyllan
              - icon: lamp


          - type: custom:decluttering-card
            template: light_button_card
            variables:
              - size: 25%
              - entity: light.vardagsrum_tvbank
              - name: TV-bänken
              - icon: lamp


          - type: 'custom:button-card'
            color_type: blank-card
            styles:
              card:
                - width: 10px

Just a limitation of the card I suppose, oh well, thank you for you expertise!

And definitely looking forward to the themes!

1 Like

I use blank button cards to accommodate for the dynamic sizes in my setup. In your case you use 2 buttons in the lower row.

To sketch it out in the lower row you will need the following setup:

horizontal-stack:

  • empty button with 10px width
  • empty button (see my examples)
  • your button 1
  • your button 2
  • empty button
  • empty button with 10px width

The empty button with 10px width:

type: custom:button-card
color_type: blank_card
styles:
  card:
    - width 10px

Is used as a spacer between the border of the screen and the button.

type: custom:button-card
color_type: blank_card
aspect_ratio: 1/1

Is what you need to fill up the empty spaces where otherwise would be buttons.

If you don’t use a gap between the borders you can leave the button card with 10px styling out as you won’t need it then.

Edit: not sure if this is the correct code, I just did this from the head.

Ok, now I got it. Thanks a lot, I rely appreciate it

1 Like

you do know you could take out a lot of lines using a simple template for this :wink:

I have this in templates:

horizontal-filler:
  color_type: blank-card
  styles:
    card:
      - width: 3px

vertical-filler:
  color_type: blank-card
  styles:
    card:
      - height: 3px

and use this in configs:

      - type: custom:button-card
        template: horizontal-filler

3 lines less for each occurrence in your setup …

2 Likes

Very good idea, will definitely use this. Thank you!

I’ve fixed most of the theming issues in mine by taking another theme and then splicing in some of the key parts from yours.

Care to share the code? I have 3 more things to do before I go full on theming, but a headstart will always help.

I have a new vacuum control center upcoming and some additions to the main menu. As well as decluttering the button cards (as advised by @Mariusthvdb).

These 3 things won’t take very long to complete. I expect to have some themes ready next week.

It is right here! Files · master · home-server / hass-config · GitLab

Here is the theme I “merged” with yours.

1 Like

I actually had the same idea and made my own templates, the vertical one would work great, but the horizontal one would never work and threw up an error every time I tried to integrate it. I spend a ton of time trying to fix it, but it never worked properly. Yet here you are as proof that it does work! Wonder what I did wrong…

I rely like the “bottoms” you have on the other page,

Skärmavbild 2019-07-08 kl. 12.13.03
I have tried to copy them from your code but can’t get them to look like that, what am I missing? I can’t get the icon to the left and the text centered.

This is what I get now

from this code

title: Other
path: information
cards:

  - type: vertical-stack
    cards:
      - type: conditional
        conditions:
          - entity: input_select.ovrigtmenyn
            state: Hem
        card:
          type: vertical-stack
          cards:
            - type: horizontal-stack
              cards:
                - type: 'custom:button-card'
                  color_type: blank-card
                  styles:
                    card:
                      - width: 10px
                - type: custom:decluttering-card
                  template: switch_button_card
                  variables:
                    - entity: input_boolean.test
                    - name: Klimat
                    - icon: thermometer
                    - show_state: false
                    - opacity: 0.9
                    - aspect_ratio: 4/1
                    - tap_action:
                        action: call-service
                        service: input_select.select_option
                        service_data:
                          option: Klimat
                          entity_id: input_select.ovrigtmenyn
                        haptic: light
                - type: 'custom:button-card'
                  color_type: blank-card
                  styles:
                    card:
                      - width: 10px

I added - aspect_ratio: 4/1 that was not in your code for the card, but without it I got a very big card.

What am I missing?