New to home assistant and loving these cards. Is it possible to use a title card to display the time and date?
hope there will be a proper room/area card like yours in the future.
You can use a template in the Title card.
something like:
The time is {{ states('sensor.date_time') }}
Thanks! Have you found a way to hide the box of the non-chip card in the stack-in by any chance? It doesnāt look too bad in dark mode, but it looks a little strange in light mode.
Which card do you use for the history? Looks nice!
Unfortunately not, I use the mushroom theme that hide the border quite a bit.
Maybe with css is possible, but I donāt want to go that route
Can I get the template-card to use light rgb as icon-color
? It seems as if I use any kind of rgb with an IF it does not work. Even tried {{ state_attr("light.bathroom", "rgb_color")|regex_replace(find="[()]", replace='') }}
I had this same issue and created an github issue some time ago.
Today I found some time to make a fix in the code and create a Pull Request.
Hope this also solves it for you.
You can do this if you have card mod installed.
type: custom:stack-in-card
mode: vertical
cards:
- type: custom:mushroom-template-card
primary: Hello, {{user}}
secondary: How are you?
icon: mdi:home
card_mod: null
style: |
ha-card {
box-shadow: 0px 0px;
}
- type: custom:mushroom-chips-card
chips:
- type: entity
entity: person.phil
card_mod: null
style: |
ha-card {
box-shadow: 0px 0px;
}
- type: entity
entity: person.phil
card_mod: null
style: |
ha-card {
box-shadow: 0px 0px;
}
Bram, Many thanks for the support. Will wait patientlyš
Iām overwhelmed of the possibilities these cards offer to me and what I learned about templating and conditional cards and stuff.
Thank you guys very much!
Butā¦
My inner Monk does have a problem with the custom:mushroom-template-card. I use these on the first page of my dashboard instead of a simple custom:mushroom-light-card to customize stuff but I stumble over one small design problem.
-
If I use the custom:mushroom-light-card and choose the main light of that room as the entity and the Icon Color I want I get the correct icon color when the light is on and simply no icon color when the light is off. Right as I want it
See the card āKĆ¼cheā which is a custom:mushroom-light-card. -
If I use the custom:mushroom-template-card an the same light entity and put in a template for the icon color I get the icon color I choose when light is on BUT when the light is off I got an ugly white icon.
See custom:mushroom-template-card with āKammerā
tl:dr
Am I making something wrong or is it a card design bug/feature?
Both main lights are on:
Both main lights are off
Hereās my code:
type: horizontal-stack
cards:
- type: custom:mushroom-entity-card
entity: light.kuche
icon_color: amber
layout: horizontal
tap_action:
action: navigate
navigation_path: kuche
name: KĆ¼che
icon: ''
secondary_info: none
primary_info: name
hold_action:
action: toggle
- type: custom:mushroom-template-card
entity: light.decke_kammer
secondary: " {% if is_state('vacuum.robby_rock', 'docked') %}\n \n {% elif is_state('vacuum.robby_rock', 'cleaning') %}\n Roberto ist unterwegs\n {% elif is_state('vacuum.robby_rock', 'returning') %}\n Roberto fƤhrt nach Hause\n {% elif is_state('vacuum.robby_rock', 'error') %}\n Roberto steckt fest\n {% elif is_state('vacuum.robby_rock', 'paused') %}\n Roberto macht Pause\t\t\t\n {% else %}\n failed\n {% endif %}\n\n\n\n\n"
primary: Kammer
tap_action:
action: navigate
navigation_path: kammer
hold_action:
action: toggle
double_tap_action:
action: none
icon_color: |-
{% if is_state('light.decke_kammer', 'on') %}
amber
{% else %}
{% endif %}
icon: mdi:food
card_mod:
style: |
ha-card {
--secondary-text-color: {{ 'red' if is_state('vacuum.robby_rock', 'error') else '' }};;
}
have you tried this?
icon_color: |-
{% if is_state('light.decke_kammer', 'on') %}
amber
{% else %}
grey
{% endif %}
[/quote]
The disabled
color is not accessible for now. Iām trying to add this support for entity and template but itās not simple because of light/dark theme
I keep you updated
As I now know that I didnāt do something wrong and you even understood what my problem is I can wait as long as it takes you.
Thank you very much for the quick reply.
Tinkering now with more secondary informations template based.
Yes, I did. Just see Pauls answer. But thanks for trying to help me.
Try add this
I experienced the same, it used to work in the past. Use this instead:
icon_color: |
{%- if is_state(entity, 'on') %}
{{ '#%02x%02x%02x' % state_attr(entity, 'rgb_color') }}
{%- else %} #b8b8b8
{% endif %}
Yes! that is the one that I am using
Where did you get the graphic at the top of your ui? Love it!!