@arganto and @Ildar_Gabdullin forgive me for tagging you, hope you can relate to the issue Ill describe, and which we worked on in more than a few posts here and there.
As of 2023.6, I havent been able to show the left menu mods anymore at all.
card-mod-sidebar-yaml: |
They were a bit shaky before, but after some cache clearing, Ive always been able to show them again.
Currently, there is nothing at al, not an icon color, not a header subtitle, let alone the notifications on each menu item.
Would appreciate if you all could check for yourselves, and see what gives? I dont have any errors in the inspector, though admit to using a modded 3.1.4 version stil, as previously explained.
update
complete rebuild made me aware I had made a mistake myself, though its a bit odd:
a[data-panel='ui-data'] paper-icon-item:after {
{%- set id = states('sensor.netto_verbruik')|int(default='?') %}
content: "{{id}}";
{%- set length = id|length %}
{%- set table = {1:44,2:48,3:52,4:56,5:60} %}
{%- set pix = table.get(length,42) %}
left: calc(var(--app-drawer-width,248px) - {{pix}}px);
/*right: 14px;*/
position: absolute;
min-width: 20px;
box-sizing: border-box;
border-radius: 24px;
font-weight: 400;
font-size: 14px;
line-height: 20px;
text-align: center;
padding: 0px 6px;
background-color: {{'saddlebrown' if id|int(default=0) >= 0 else 'gold'}};
color: {{'ivory' if id|int(default=0) >= 0 else 'saddlebrown'}};
}
Returns a: TypeError: object of type 'int' has no len()
on the line {%- set length = id|length %}
I had set the |int(default='?')
because that particular sensor did cause issues, because my smart meter has been down (still isā¦) and wasnt available (hence a default) and now is 0, so the |int kicks in.
I wasnt aware we canāt use |length on a numberā¦ and because of that this particular error causes the full card_mod_theme on the sidebar to be disabled.
Iāve now changed that to: states('sensor.netto_verbruik')|default('?')
so itās either a number as string (templates are always strings, or ā?ā which ofc also is a string, preventing the type errorā¦
sorry for tagging you again.