2023.9: New climate entity dialogs, lots of tile features, and template sensors from the UI!

The question was not about the template syntax (yours is not correct btw) but where to put it in the helper. The answer is that the helper is a simple version of the sensor template integration and does not support templating the icon.

OK, my bad totally misunderstood the question then, however, the syntax works for me, thou in custom:mushroom-template-card (could be the reason)

In the example you posted above, one (or both) of the if statements lacks a terminating endif. Do unterminated if statements work in custom:mushroom-template-card?

Or did that example simply contain a mistake?

No, they don’t. :slight_smile:

1 Like

Hello guys, I did a lot of analysis and find out:

From my location github.com response with 2 IP: 140.82.121.4 and 140.82.121.3, and from my home network I can’t ping 140.82.121.3. So when I reboot HA and at that time my network pointing github.com to IP adress 140.82.121.4 HA starting fine. But if my network at this time pointing github.com to IP 140.82.121.3 HA supervisor do not start up because supervisor can’t access github.com.
I tried pinging from my job both IP adreses responding.

Here it’s traceroutes:

Tracing route to lb-140-82-121-4-fra.github.com [140.82.121.4]
over a maximum of 30 hops:

1 3 ms 3 ms 9 ms unifi.localdomain [192.168.8.1]
2 7 ms 10 ms 15 ms 78-61-43-254.static.zebra.lt [78.61.43.254]
3 6 ms 5 ms 5 ms 82-135-179-128.static.zebra.lt [82.135.179.128]
4 31 ms 28 ms 44 ms xe-1-2-0.mpr1.fra4.de.above.net [80.81.194.26]
5 * 30 ms 29 ms ae27.cs1.fra9.de.eth.zayo.com [64.125.30.254]
6 36 ms 28 ms 32 ms ae1.mcs1.fra9.de.eth.zayo.com [64.125.29.65]
7 32 ms 31 ms 30 ms 82.98.193.29
8 * * * Request timed out.
9 * * * Request timed out.
10 31 ms 31 ms 29 ms lb-140-82-121-4-fra.github.com [140.82.121.4]

Trace complete.

C:\Users\marnau>tracert 140.82.121.3

Tracing route to lb-140-82-121-3-fra.github.com [140.82.121.3]
over a maximum of 30 hops:

1 2 ms 2 ms 2 ms unifi.localdomain [192.168.8.1]
2 * * 4 ms 78-61-43-254.static.zebra.lt [78.61.43.254]
3 6 ms 7 ms 4 ms 82-135-179-128.static.zebra.lt [82.135.179.128]
4 29 ms 28 ms 28 ms xe-1-2-0.mpr1.fra4.de.above.net [80.81.194.26]
5 * * * Request timed out.
6 33 ms 37 ms 36 ms ae1.mcs1.fra9.de.eth.zayo.com [64.125.29.65]
7 33 ms 29 ms 29 ms 82.98.193.29
8 * * * Request timed out.
9 * * * Request timed out.
10 * * * Request timed out.
11 * * * Request timed out.
12 * * * Request timed out.
13 * * * Request timed out.
14 Transmit error: code 1232.

Trace complete.

So I think problem not HA update or internet provider, but problem is that github server with IP 140.82.121.3 drop packet from some IP ranges.

3 Likes

if statements work fine in a template mushroom card
Something like this will give a dynamic icon based on the state (using a multi line if statement) and an icon color based on the state (using a single line if statement)

  - type: custom:mushroom-template-card
    entity: switch.espresso
    primary: Espressomachine
    secondary: >-
      {{ states(entity) | title }}
      {{ (' | ' ~ states('sensor.espresso_power') ~ ' W') if is_state('switch.espresso', 'on') }}
    icon: >
      {% if is_state(entity, 'on' ) %}
        mdi:coffee-maker-check
      {% else %}
        mdi:coffee-maker
      {% endif %}
    icon_color: >-
      {{ 'blue' if is_state(entity, 'on') }}
1 Like

I too can confirm that removing and adding the integration again using the installer account does the trick. No password needed. And a nice extra bonus to get the information from the individual panels.

Yeah but like this? 2023.9: New climate entity dialogs, lots of tile features, and template sensors from the UI! - #163 by boheme61

1 Like

No, not like that mess

1 Like

Same problem here.

1 Like

I tried upgrading today again. This time it worked. So, looks like there was really something with an external resource not available yesterday.

I just c/p the relevant “part” from my very well working template, as i thought that maybe an {elif} could’t work in the “editor” … and i absolute found no reasons to paste the whole template to aceindy, as im very well aware that he knows ( and also had an {endif} )

And yes there is also "missing an starting IF (in example) as well as then rest of is_state.statement, which there’s also no reason to c/p , as im sure aceindy got that right to

However i more and more realizes that, many people don’t think like i do, and they ofcause also can have hard to understand what i mean, and others pick on details, spite they might have seen (in this case) that my point was "replace {elif} with

08.09.2023_11.15.50_REC

2 of my very well working examples of mushroom template cards, first icon change colors ( with the wind-speed) second example , you :slight_smile: have to guess your self , by the way the text below, “primary” is also multi-line templated, ( from weird english description, to my own defined )

So now again i had to try with some “derailing” extra text, to explain my initial “short example” , which im sure aceindy would have understood my “purpose” with, if that was the case ( as in my first answer to Tom ) … Have a nice weekend

PS: So no there was not a “mistake” in the example either, i as said just often expect/think that people think like me, and atleast understand the context ( i know im also wrong in this matter :laughing: )

Multi-line also works for icon-color changes ( with “elif” )

Groups in use.

“message” or “mess” , if latest Yes i agree, maybe i should “rewrite” with “elif” , if that would work , i have quite some "endif"s , so it’s a “mess” yess :slight_smile:


Is the light colour temperature not compatible with WLED?

Not when the light is off.


not working with lights on too

You have the correct light? Wled has a bunch of different light entities.

Hello, since I updated to 2023.9, the energy dashboard is doing wrong calculation and it’s due to template change into 2023.9
See here the screenshot with HA 2023.8.4. It’s correct calculation: Return to grid is aligned with consumption and solar production.
26 August 2023:


Now with 2023.9, the return to grid is higher then solar production which is impossible.
Yesterday data:

Monthly view:
image

I use templates to do calculation for the return to grid and after analyzing, the template which was correctly running since a while, now doing double calculation into return to grid.

The return to grid is having the double of the value at the trigger time.
It seems that when it’s triggered, it passing twice into it.

1 Like