Homekit Infused 5 (HKI) v2023.1.3

try:

    {% set time = states('sensor.time') %}
    {% if '00:00' < time < '06:00' %} ## Good Night
    {% elif '06:00' < time < '12:00' %} ## Good Morning
    {% elif '12:00' < time < '18:00' %} ## Good Afternoon
    {% else %} ## Good Evening
    {% endif %}

1 Like

Always great stuff haha, thanks, will try this.

I actually use input_text to show the actual word, but for the sake of the example I had hardcoded the text.

Any difference between my method and your shared one? (Other than being shorter?)

yeah, but its subtle. Always try to set a variable and then call that variable, (in templates that evaluate the same state many times) because during the calculation of the template the state might have changed and the template could become susceptible to those changes. In this case it might be a theoretical issue, but nonetheless…

also, always include an else clause. This way you know for sure the template will never be None, and cause errors because of that.

2 Likes

Thanks that is actually a helpful answer. Thanks, will try this when I get back home tonight.

I’m interested to how you do the welcome messages

i tried this, but it says good evening although its morning :stuck_out_tongue:My timezone is correct though…

so what could this be?

not sure, works here :wink:
Schermafbeelding 2020-02-27 om 10.23.37

what does the template return in developers-tools/template?

      {%- set time = states('sensor.time') -%}
      ## {{time}} - Good
      {%- if '00:00' < time < '06:00' %} Night
      {%- elif '06:00' < time < '12:00' %} Morning
      {%- elif '12:00' < time < '18:00' %} Afternoon
      {%- else %} Evening
      {% endif %}

it returns:

unknown - Good Evening

mmm if it doesnt know the time, its normal it says good evening, why doesnt it show time?

Hi,
Make sure you have the sensor.time which comes from

sensor:
  - platform: time_date
    display_options:
      - time
      - date
      - date_time

Lol silly of me
thx Hassan
working p:

perfect example of the need for an else clause :wink:

3 Likes

Hi, congratulations for the excellent work.
I have this problem:
The number is not displayed on the thermostat.
Why? Where am I wrong?

1 Like

you have to change the sensor to which it refers…go on view 00frontpage in lovelace and change in the configuration of the first button in the notification line with the sensor ‘average temperature’ instead of ‘sensor.current_radiator_valves_on’.

1 Like

Thank you. :wink:

2 Likes

In the upcoming version this can be done through the UI. More information soon!

2 Likes

@jimz011 Sorry for not paying attention, but do I remember reading you saying that changes were made to some of @DBuit s pop-up cards that no longer require your custom versions? They all have updates available but I didn’t want to break my HKI setup again.

Well yes and no, it requires some changes to the base code of HKI. Which I have fixed for v2.0.0 but not patched for v1.1 anymore (srry). Though it shouldn’t work differently. I’d just leave those 2 cards and update anything else for now. Release will be soon :smiley:

Ok, thanks, I thought I had read something in either this thread or dbuits but couldn’t find it again… I’ll just wait for 2.0, thank you.

Picked up your theme just before the recent major overhauls. I appreciate how you are attempting to make this user friendly, excellent work!

I have finally fumbled my way through the latest release and here’s a couple of views I’ve customized for my HA. The person cards blur and fade to gray when for the away state. The weather card incorporates the animated icons. The alarm card was styled to make the buttons more recognizable. Thanks for the inspiration!

5 Likes

Love the Animoji idea… I definitely don’t wanna see my real face every time I open HA, I like that.

I actually really like those person pictures, could you send me the code for that (and the alarm) I am almost ready with v2.0 (which will finally be separated from custom config so that updating will be easy).

That way I can merge this with the project as in v2.0.0 most things can be setup with the UI. That way I can have people choose if they want to use photos or more this discrete variant you have created.

Edit: what do you mean with before the major overhaul? It looks like v1.x already?