Homekit Infused 5 (HKI) v2023.1.3

@jimz011

Is there anyway to enable more things on the bottom bar for mobile?

So I just started using the “conversation” integration cuz I wanna experiment with it, and it works great so far on desktop, but as you can see in the screenshots below the microphone doesn’t actually show on mobile, like it does on desktop.

Desktop:

Mobile:

It only appears when you click on some invisible menu like this:

Hi David,

First of all, best wishes. I will look into this. I never took into account that this was possible nowadays and since you are the first to mention it…

I will definitely try to fix this though I am not entirely sure how long that will take.

Though I figure that many people currently use Homekit, Google Home or Alexa for these kind of tasks. Maybe in the future the announced voice assistant will change all this, but for now I don’t think you’ll get a better experience than using any of those. Setting up own intents for conversations can be very tedious and would take a lot of time (for example changing light colors and such, whereas all three of those assistants can do this by default without any custom editing required).

Edit: I could probably easily fix the hidden menu button, though I hid it because it takes up space (and there weren’t any useful buttons for yaml mode dashboards anyways). I’ll try to make it conditional so that you can choose to show the button or not.

1 Like

I am actually a Google home user so yes I do mostly use that, I just discovered the conversation integration and have already set up a couple of intents, really I would like to experiment especially with the upcoming HA voice assistant, which won’t replace my Google Homes by any chances but it’s fun to experiment with still in my dashboard lol.

Would be cool if you gave us the option to unhide it, next I need to experiment with conditional cards and the media player but I’ll reply back with that when I get there soon.

@davidnestico Well, the good news is that I have added the option back, tested it and confirm it working.

The bad news, I remember why I hid it, it is actually not hidden at all. I had transformed the icon/button so that it can display the time, username or date instead (if you click on the time/name/date it should show you that ‘hidden’ menu that you were talking about in your screenshot).

What this means is that yes you will be able to get the button back, though you will lose the ability to set it to something else. But hey, at least it is going to be choice now.

I’ll add this to the next release

1 Like

In other news, I have been experimenting a bit with core cards and button-card. I made these card layouts for fun, I will not add them to HKI (at least for now), but you will be able to download all the logo’s and pictures from the repo soon. Ofcourse the code will be placed on my personal repo as well so you don’t have to wait until the end of the year for me to release something like this.

Here are some examples of what I have been playing with. I actually got inspired a bit by mushroom cards, though they were not flexible enough for what I wanted to achieve so in most cases I just used a button-card instead.




3 Likes

Sweet, thanks!

Hey @jimz011 just saw this on the discord and was wondering if putting the media player at the bottom like this is currently possible on HKI5?

Love the idea and would be great on a condition to appear when the state is not idle.


Yes, well… this is virtually impossible in HA as it doesn’t respect css all the time.

You could do this by adding a lot of blank space between the last card and the media player card and then add css code to fix the media player to the bottom.

If you don’t add whitespace, the media player will be fixed to the last card (unless the page is large enough to be scrolled on). I have been trying this for years and I have never been able to do this. I also haven’t found anyone that did manage to do it (but again, it must be last year that I last tried this)

1 Like

Damn… hope it comes in a future HA update since it was teased in a recent blog post I saw…

Well, another question I have is can you tell me why this conditional code isn’t working? I thought that this would only make the media players appear if the media player is playing or paused, but nope they are appearing right now on my dashboard even though nothing is playing or paused…

media_player:
        - title: hide
          type: conditional
          conditions:
            - entity: media_player.kitchen_display
              state: "playing"
          entities:
            - media_player.kitchen_display
        - title: hide
          type: conditional
          conditions:
            - entity: media_player.kitchen_display
              state: "paused"
          entities:
            - media_player.kitchen_display
        - title: hide
          type: conditional
          conditions:
            - entity: media_player.android_tv_192_168_2_123
              state: "playing"
          entities:
            - media_player.android_tv_192_168_2_123
        - title: hide
          type: conditional
          conditions:
            - entity: media_player.android_tv_192_168_2_123
              state: "paused"
          entities:
            - media_player.android_tv_192_168_2_123
        - title: hide
          type: conditional
          conditions:
            - entity: media_player.garage_tv
              state: "playing"
          entities:
            - media_player.garage_tv
        - title: hide
          type: conditional
          conditions:
            - entity: media_player.garage_tv
              state: "paused"
          entities:
            - media_player.garage_tv

Here are the states to show nothing is playing or paused:
Screen Shot 2023-01-05 at 3.14.31 PM

Try this:

replace type: conditional with conditional: true

I know it deviates from core slightly, but that is because I have mapped type to button-types instead
You can find more examples here:

1 Like

Fixed! Thanks.

Hi all,
I am trying to use this wonderful dashboard on a newly created HAOS VM in Proxmox before I will do this in my production system. (I followed @jimz011 latest Video tutorial).
So I installed all cards according the doc (including the creation of the cards resources) and copying the three directories, then restarting HA, I get this error when I open the Homekit Infused left menu:

I don’t know where this error is coming from; when i go to the github page:

https://github.com/thomasloven/lovelace-popup-card

there is mentioned that this card is replaced by browser_mod, which is not a Card but an Integration.
I did install both browser_mod and lovelace_gen, and added the resources for these two also.

This the list of resources I added:

In order for find a solution, i also installed by hand, the lovelace-popup-card, AND added the reasource (see picture above). But that did not solve the issue.

I think I need some help with this…
Kind regards, Bert

Hi Bert, the solution to this can be found here:

Hoi Jim, Thank you for your swift reply. Sorry, I did not check the Issues page…
Yesterday, I followed the documentation and I installed the system from this URL:

https://github.com/jimz011/homekit-infused/releases

So, I assume that it is the 2022.5.1 version (Nov 14, 2022)
Followed your instructions from the issues page and the error msg is gone now.

One remark though. When browser_mod was installed, clicking or double clicking did not gave the browser_mod menu. Right mouse click gave a menu with the option to open the settings in an new tab.
Now I can start building the dashboard. But lets first follow your video’s.
Once more thank you for a beautiful dashboard. Hope I can manage to use it. :wink:

1 Like

The latest version is 2022.6.3, you can find the version number in the developer tools or in the HKI info menu.

Hi Jim et al,

First, thank you so much for making all of your code available, this is a really nice project from which i’m already using some parts for the better part of a year!

I managed to solve most of my problems with the excellent discussions in this forum but I’m struggling with the thermostat setup (i’m using the thermostat card, not the add-on).

Background:

  • Home Assistant 2023.1.2
  • Supervisor 2022.12.1
  • Operating System 9.4
  • Frontend 20230104.0 - latest
  • Latest homekit infused (6.3)
  • Using nearly all of the pre-defined stuff from the repository from Jim

The problem:
In a nutshell, i have 3 climate components:

  1. CV - manually defined with ebusd / mqtt polling from a vaillant boiler/thermostat
mqtt:
  climate:
    - name: CV
      max_temp: 25
      min_temp: 15
      precision: 0.1
      temp_step: 0.5
      modes:
       - auto
       - heat
       - cool
       - 'off'
      mode_state_template: >-
        {% set values = { 'auto':'auto', 'day':'heat',  'night':'cool', 'off':'off'} %}
        {{ values[value] if value in values.keys() else 'off' }}
      mode_state_topic:  "ebusd/700/z1OpMode"
      mode_command_template: >-
        {% set values = { 'auto':'auto', 'heat':'day',  'cool':'night', 'off':'off'} %}
        {{ values[value] if value in values.keys() else 'auto' }}
      mode_command_topic: "ebusd/700/z1OpMode/set"
      temperature_state_topic: "ebusd/700/z1ActualRoomTempDesired"
      temperature_low_state_topic: "ebusd/700/z1NightTemp"
      temperature_high_state_topic: "ebusd/700/z1DayTemp"
      temperature_low_command_topic: "ebusd/700/z1NightTemp/set"
      temperature_high_command_topic: "ebusd/700/z1DayTemp/set"
      current_temperature_topic: "ebusd/700/z1RoomTemp"

State attributes in developer tools:

hvac_modes:
  - auto
  - heat
  - cool
  - 'off'
min_temp: 15
max_temp: 25
target_temp_step: 0.5
current_temperature: 19.1
temperature: 19
target_temp_high: 19
target_temp_low: 17
friendly_name: CV
supported_features: 3
  1. Boiler - manually defined with ebusd / mqtt polling from a vaillant boiler/thermostat
mqtt:
  climate:
    - name: Boiler
      max_temp: 100
      min_temp: 20
      precision: 0.5
      temp_step: 1
      modes:
       - auto
       - heat
       - 'off'
      mode_state_template: >-
        {% set values = { 'auto':'auto',  'day':'heat', 'off':'off'} %}
        {{ values[value] if value in values.keys() else 'off' }}
      mode_state_topic:  "ebusd/700/HwcOpMode"
      mode_command_template: >-
        {% set values = { 'auto':'auto', 'heat':'day', 'off':'off'} %}
        {{ values[value] if value in values.keys() else 'auto' }}
      mode_command_topic: "ebusd/700/HwcOpMode/set"
      temperature_state_topic: "ebusd/700/HwcTempDesired"
      # temperature_low_state_topic: "ebusd/700/z1NightTemp"
      temperature_high_state_topic: "ebusd/700/HwcTempDesired"
      # temperature_low_command_topic: "ebusd/700/z1NightTemp/set"
      temperature_high_command_topic: "ebusd/700/HwcTempDesired/set"
      current_temperature_topic: "ebusd/700/HWCwatertempcorrected"

State attributes in developer tools:

hvac_modes:
  - auto
  - heat
  - 'off'
min_temp: 20
max_temp: 100
target_temp_step: 1
current_temperature: 63
temperature: 65
target_temp_high: 65
target_temp_low: 21
friendly_name: Boiler
supported_features: 3
  1. Airco - this climate entity was autofilled by the daikin integration but i see the following state attributes in developer tools:
hvac_modes:
  - fan_only
  - dry
  - cool
  - heat
  - heat_cool
  - 'off'
min_temp: 7
max_temp: 35
target_temp_step: 1
fan_modes:
  - Auto
  - Silence
  - '1'
  - '2'
  - '3'
  - '4'
  - '5'
preset_modes:
  - none
  - away
  - eco
  - boost
swing_modes:
  - 'Off'
  - Vertical
  - Horizontal
  - 3D
current_temperature: 19
temperature: 20
fan_mode: '3'
preset_mode: none
swing_mode: 'Off'
friendly_name: Airco kamer ouders
supported_features: 57

While some states are represented correct

=> Off-state:
off state

Or semi-correct:
=> heat state
heat

others are apparently not:
=> auto state (for CV and boiler) and heat/cool for the airco:
auto setting & heat-cool

Although i’m not a template specialist nor a Jinja2 specialist, I’m thinking the issue lies within the thermostat custom-button template, specifically this part (i already modified it by adding more states to the label part)

label: "[[[ if (states['{{entity}}'].state == 'heat_cool') return `${states['{{entity}}'].attributes.temperature}°`; if (states['{{entity}}'].state == 'auto') return `${states['{{entity}}'].attributes.temperature}°`; if (states['{{entity}}'].state == 'heat') return `${states['{{entity}}'].attributes.temperature}°`; if (states['{{entity}}'].state == 'cool') return `${states['{{entity}}'].attributes.temperature}°`; else return `--` ]]]"
{% if ((attribute is defined) and (attribute == 'state')) %}
state_display: "[[[ if (states['{{entity}}'].state == 'off') return `Off`; else return `${states['{{entity}}'].state}` ]]]"
{% else %}
state_display: "[[[ if (states['{{entity}}'].state == 'off') return `Off`; else return `${states['{{entity}}'].attributes.hvac_action}` ]]]"
{% endif %}

Most of the above I understand, but I dont understand this part (nor can i find anything about it online) and I think this is also part of the problem:

{% if ((attribute is defined) and (attribute == 'state')) %}

Another thing I noticed is that the CV and boiler climates do not have an hvac_action attribute, whereas certain modes of the Airco also do not (eg the heat/cool that doesn’t work properly).

Apologies for the long post; hopefully someone is able to help out!

Kind regards,

Ben

From what I can read here, some of your thermostats/cv/boiler etc have HVAC_states and some do not.

This part {% if ((attribute is defined) and (attribute == 'state')) %} is something I’ve written so that when you define the thermostat addon that you can switch quickly between either showing the HVAC state in the label or the actual entity state.

So in general:

# views.yaml
addons:
  thermostat:
    - title: my thermostats
      entities:
        - climate.upstairs
        - climate.downstairs

The above code will show the HVAC state in the label as that is the default
However…

# views.yaml
addons:
  thermostat:
    - title: my thermostats
      entities:
        - entity: climate.upstairs
          attribute: state
        - entity: climate.downstairs
          attribute: state

The above code will show the actual entity state instead (this is probably what you need)

You can set it per thermostat so that it shows either HVAC or state depending on your needs.

If you don’t use my addons and have recreated this card yourself, then just give the thermostats with hvac the first state_display label (as you have shared above)
else choose the second one.

Hi Jim,

Thanks a lot for the explanation above, it is 100% clear now what {% if ((attribute is defined) and (attribute == 'state')) %} means.

However, even after correcting all my cards like you mentioned above (inputting the state argument, see code extract below), i still dont get the correct states for the state_display. (btw i use the thermostat button card, not the addon).

    button:
      - title: Thermostats
        entities:
          - entity: climate.cv
            icon: mdi:fire
            attribute: state
            type: thermostat
          - entity: climate.boiler
            icon: mdi:water-boiler
            attribute: state
            type: thermostat
          - entity: climate.airco_kamer_ouders
            icon: mdi:air-conditioner
            # attribute: state
            type: thermostat

I corrected the code to account for all the states, just to be sure, however the only state that really shows the state on the card (and not ‘undefined’) is the ‘off’ state… could it be that something is wrong with the code below (nothing behind the ‘off’ arguments seems to be parsed by HA - referring to text in bold). It is the same both for the boiler and CV climate entities. Like mentioned above, these both climate entities are manually define by mqtt (and don’t have any HVAC_states).

{% if ((attribute is defined) and (attribute == 'state')) %}
**state_display: "[[[ if (states['{{entity}}'].state == 'off') return `Off`; if (states['{{entity}}'].state == 'heat') return `Heating`; if (states['{{entity}}'].state == 'auto') return `auto`; else return `${states['{{entity}}'].state}` ]]]"**
{% else %}
state_display: "[[[ if (states['{{entity}}'].state == 'off') return `Off`; if (states['{{entity}}'].state == 'heat_cool') return `Auto`;else return `${states['{{entity}}'].attributes.hvac_action}` ]]]"
{% endif %}

Something similar for the airco.climate entity (this one has HVAC_states), the first argument gets parsed (the off state), the second one doesn’t - code in bold (the heat_cool state - i put this one in manually as heat_cool state doesn’t provide an HVAC_state as the only exception) and the third one does (giving the HVAC_states properly.

{% if ((attribute is defined) and (attribute == 'state')) %}
state_display: "[[[ if (states['{{entity}}'].state == 'off') return `Off`; if (states['{{entity}}'].state == 'heat') return `Heating`; if (states['{{entity}}'].state == 'auto') return `auto`; else return `${states['{{entity}}'].state}` ]]]"
{% else %}
**state_display: "[[[ if (states['{{entity}}'].state == 'off') return `Off`; if (states['{{entity}}'].state == 'heat_cool') return `Auto`;else return `${states['{{entity}}'].attributes.hvac_action}` ]]]"**
{% endif %}

Really am puzzled what I am doing wrong… i am working in the ‘hki-thermostat.yaml’ inside the folder ‘hki-base\templates\button’ but seems whatever i change doesn’t impact the outcome… i’m sure i’m looking over something obvious… :slight_smile:

Anyway, thank you for your thoughts!

kind regards,
Ben

Does anyone here use kiosk mode? I am fine with the lovelace header but I am trying to use my own made with card_mode so it stays at the top, the problem is kiosk mode and also turning header off in HKI settings isn’t working. Please help.

Installed it manually from maykar github “JS” file and put it in the “www” folder and then added the resource, still the header won’t hide.

views.yaml code:

kiosk_mode:
  hide_header: true

views: # NEVER REMOVE THIS LINE
  # Home

http://yourhomeassistant/homekit-infused/home?hide_header

hides just the header

http://yourhomeassistant/homekit-infused/home?hide_overflow

hides just the top right menu

http://yourhomeassistant/homekit-infused/home?hide_sidebar

leaves just the header showing from hki

http://yourhomeassistant/homekit-infused/home?kiosk

hides both the header and sidebar

Once you use this browser will remember and hide permantly from you, to get back to default you have to

http://yourhomeassistant/homekit-infused/home?clear_km_cache