Hey,
can someone give me a short tip how to create the icon color depending on window state. (open/close/tilt)
I found several of topics regarind that issue, but honestly IĀ“m not well know in programming and nothing works.
What IĀ“ve already done:
create template.yaml to display the correct state of the window:
- name: "Fenster KĆ¼che EG"
state: >
{% if is_state('binary_sensor.fenster_kuche_eg_offen', 'off') and is_state('binary_sensor.fenster_kuche_eg_gekippt', 'off') %}
offen
{% elif is_state('binary_sensor.fenster_kuche_eg_offen', 'on') and is_state('binary_sensor.fenster_kuche_eg_gekippt', 'off') %}
geschlossen
{% else %}
gekippt
{% endif %}
icon: >
{% if is_state('binary_sensor.fenster_kuche_eg_offen', 'off') and is_state('binary_sensor.fenster_kuche_eg_gekippt', 'off') %}
mdi:window-open-variant
{% elif is_state('binary_sensor.fenster_kuche_eg_offen', 'on') and is_state('binary_sensor.fenster_kuche_eg_gekippt', 'off') %}
mdi:window-closed-variant
{% else %}
mdi:window-open-variant
{% endif %}
this works well.
what I wuold like to get:
Icon color red: open
Icon color orange: tilt
Icon color green: closed (Hide this state in the Dash Overview)
May I add this in the template.yaml or in the tile card config?
Hey, Iām stuck on changing the text size of only the first line in the Digital-Clock card from hacs, I can make both lines of text bigger but I only want to make the first line (time) bigger
Yeah, thatās what Iām talking about
People who will want to customize the new badges, trying to use the (soon to be) old card-mod tutorial that can be found here.
EDIT: you can use custom:hui-state-badge-element for legacy look but the good olā fashion card-mod syntax for badge like the example bellow will not work without a bit of research
This has probably already been asked a 1000 times, but I wasnāt able to get it to work with the posts I found.
Basically, I have this card (see above), I now I just like to change the icon for binary_sensor.gate_door_position_sensor, when the gate is āopenā, show icon AA, when the gate is āclosedā, show icon BB.
so the badge label doesnt have a border-radius variable of its own, which is a bit a pity, and reason we need to travers the Dom for thatā¦ Havent found a way to set different colors on the borders either. we could do that for the badge and the label individually before.
Still trying to work my way through the new Tile card features changes to get the border-radius backā¦
Team simply says thatās unsupported undocumented so weāre on our own thereā¦
Find that somewhat user unfriendly myself (after all why take the trouble to announce a warning on the changes, but leave the changes themselves unmentioned) but will probably work it out anyways
first of all, just setting those variables in a theme, which would then be picked up by the cards, as their default values for these variables are the ones I posted above, var(--feature-border-radius). That doesnāt work.
You can, you have to create your own theme, you can even include some card-mod default that will apply to every cards (wrong exemple, as it refers to badges that will change in 2024.8.0 but you get the idea)
EDIT: Donāt forget that card-mod is coming after everything else, therefore, if it was already defined/inherited by something else, you need to !important to override the value