Here you go
type: custom:stack-in-card
cards:
- type: custom:layout-card
layout_type: custom:grid
layout:
grid-template-columns: auto 120px
grid-template-rows: auto auto
margin: '-4px 0px -10px -4px;'
cards:
- type: custom:mushroom-template-card
primary: Prayer Times
secondary: |-
Next Prayer: {{ states('sensor.next_prayer') }} | Starts in {{
states('sensor.time_until_next_prayer_formatted') }}
icon: mdi:mosque
entity: sensor.next_prayer
tap_action:
action: none
hold_action:
action: none
icon_color: red
fill_container: false
multiline_secondary: false
card_mod:
style:
.: |
ha-card {
background: none;
box-shadow: none;
}
mushroom-state-info$: |
.container {
--primary-text-color: rgba(255, 255, 255, 0.9); /* White with slight transparency for high legibility */
--secondary-text-color: rgba(255, 235, 59, 0.9); /* A soft amber for a warm contrast */
}
- type: custom:timer-bar-card
entities:
- timer.next_prayer_timer
layout: full_row
bar_radius: 5px
bar_height: 20px
bar_width: 70%
bar_foreground: rgba(92, 107, 192, 1)
bar_background: rgba(237, 231, 246, 1)
- type: horizontal-stack
cards:
- type: custom:mushroom-template-card
primary: Fajr
secondary: |
{{ states('sensor.fajr_prayer_time') }}
icon: mdi:weather-sunset-up
icon_color: '#F44336'
layout: vertical
tap_action:
action: more-info
entity: sensor.current_prayer
card_mod:
style:
.: |
ha-card {
/* Set size and spacing of button */
{% if states('sensor.current_prayer') == 'Fajr' %}
border: 1px outset green; /* Example border color */
background: rgba(70, 130, 180, 0.5) !important;
{% else %}
background: rgba(199, 224, 238, 0.5) !important;
{% endif %}
width: 75px;
--spacing: 8px;
padding-bottom: calc(var(--spacing) * 1.718) !important;
margin-bottom: 5px;
/* Styling of button */
box-shadow: var(--ha-card-box-shadow) !important;
border-radius: calc(var(--ha-card-border-radius, 15px) * 1 ) !important;
/* Center button */
margin-left: auto;
margin-right: auto;
transition: all 0s;
}
/* Add subtle color on hover */
ha-card:hover {
background: rgba(255, 235, 59, 0.5) !important; /* Soft amber on hover with reduced opacity */
border-color: orange; /* Orange border on hover */
}
ha-state-icon {
{% if states('sensor.current_prayer') == 'Fajr' %}
animation: spin 2s linear infinite;
{% endif %}
}
@keyframes spin {
0% {transform: rotate(0deg);}
mushroom-state-info$: |
.container {
--secondary-text-color: rgba(13, 71, 161, 0.9); /* A soft amber for a warm contrast */
}
- type: custom:mushroom-template-card
primary: Dhuhr
secondary: |
{{ states('sensor.dhuhr_prayer_time') }}
tap_action:
action: more-info
entity: sensor.current_prayer
icon: mdi:weather-sunny
icon_color: '#FFC107'
layout: vertical
card_mod:
style:
.: |
ha-card {
/* Set size and spacing of button */
{% if states('sensor.current_prayer') == 'Dhuhr' %}
border: 1px outset green; /* Example border color */
background: rgba(70, 130, 180, 0.5) !important;
{% else %}
background: rgba(199, 224, 238, 0.5) !important;
{% endif %}
width: 75px;
--spacing: 8px;
padding-bottom: calc(var(--spacing) * 1.718) !important;
margin-bottom: 5px;
/* Styling of button */
box-shadow: var(--ha-card-box-shadow) !important;
border-radius: calc(var(--ha-card-border-radius, 15px) * 1 ) !important;
/* Center button */
margin-left: auto;
margin-right: auto;
transition: all 0s;
}
/* Add subtle color on hover */
ha-card:hover {
background: rgba(255, 235, 59, 0.5) !important; /* Soft amber on hover with reduced opacity */
border-color: orange; /* Orange border on hover */
}
ha-state-icon {
{% if states('sensor.current_prayer') == 'Dhuhr' %}
animation: spin 2s linear infinite;
{% endif %}
}
@keyframes spin {
0% {transform: rotate(0deg);}
mushroom-state-info$: |
.container {
--secondary-text-color: rgba(13, 71, 161, 0.9); /* A soft amber for a warm contrast */
}
- type: custom:mushroom-template-card
primary: Asr
secondary: |
{{ states('sensor.asr_prayer_time') }}
icon: mdi:weather-sunset-down
icon_color: '#9C27B0'
layout: vertical
tap_action:
action: more-info
entity: sensor.current_prayer
card_mod:
style:
.: |
ha-card {
/* Set size and spacing of button */
{% if states('sensor.current_prayer') == 'Asr' %}
border: 1px outset green; /* Example border color */
background: rgba(70, 130, 180, 0.5) !important;
{% else %}
background: rgba(199, 224, 238, 0.5) !important;
{% endif %}
width: 75px;
--spacing: 8px;
padding-bottom: calc(var(--spacing) * 1.718) !important;
margin-bottom: 5px;
/* Styling of button */
box-shadow: var(--ha-card-box-shadow) !important;
border-radius: calc(var(--ha-card-border-radius, 15px) * 1 ) !important;
/* Center button */
margin-left: auto;
margin-right: auto;
transition: all 0s;
}
/* Add subtle color on hover */
ha-card:hover {
background: rgba(255, 235, 59, 0.5) !important; /* Soft amber on hover with reduced opacity */
border-color: orange; /* Orange border on hover */
}
ha-state-icon {
{% if states('sensor.current_prayer') == 'Asr' %}
animation: spin 2s linear infinite;
{% endif %}
}
@keyframes spin {
0% {transform: rotate(0deg);}
mushroom-state-info$: |
.container {
--secondary-text-color: rgba(13, 71, 161, 0.9); /* A soft amber for a warm contrast */
}
- type: custom:mushroom-template-card
primary: Maghrib
secondary: |
{{ states('sensor.maghrib_prayer_time') }}
icon: mdi:weather-sunset
icon_color: '#FF9800'
layout: vertical
tap_action:
action: more-info
entity: sensor.current_prayer
card_mod:
style:
.: |
ha-card {
/* Set size and spacing of button */
{% if states('sensor.current_prayer') == 'Maghrib' %}
border: 1px outset green; /* Example border color */
background: rgba(70, 130, 180, 0.5) !important;
{% else %}
background: rgba(199, 224, 238, 0.5) !important;
{% endif %}
width: 75px;
--spacing: 8px;
padding-bottom: calc(var(--spacing) * 1.718) !important;
margin-bottom: 5px;
/* Styling of button */
box-shadow: var(--ha-card-box-shadow) !important;
border-radius: calc(var(--ha-card-border-radius, 15px) * 1 ) !important;
/* Center button */
margin-left: auto;
margin-right: auto;
transition: all 0s;
}
/* Add subtle color on hover */
ha-card:hover {
background: rgba(255, 235, 59, 0.5) !important; /* Soft amber on hover with reduced opacity */
border-color: orange; /* Orange border on hover */
}
ha-state-icon {
{% if states('sensor.current_prayer') == 'Maghrib' %}
animation: spin 2s linear infinite;
{% endif %}
}
@keyframes spin {
0% {transform: rotate(0deg);}
mushroom-state-info$: |
.container {
--secondary-text-color: rgba(13, 71, 161, 0.9); /* A soft amber for a warm contrast */
}
- type: custom:mushroom-template-card
primary: Isha
secondary: |
{{ states('sensor.isha_prayer_time') }}
tap_action:
action: more-info
entity: sensor.current_prayer
icon: mdi:weather-night
icon_color: '#673AB7'
layout: vertical
card_mod:
style:
.: |
ha-card {
/* Set size and spacing of button */
{% if states('sensor.current_prayer') == 'Isha' %}
border: 1px outset green; /* Example border color */
background: rgba(70, 130, 180, 0.5) !important;
{% else %}
background: rgba(199, 224, 238, 0.5) !important;
{% endif %}
width: 75px;
--spacing: 8px;
padding-bottom: calc(var(--spacing) * 1.718) !important;
margin-bottom: 5px;
/* Styling of button */
box-shadow: var(--ha-card-box-shadow) !important;
border-radius: calc(var(--ha-card-border-radius, 15px) * 1 ) !important;
/* Center button */
margin-left: auto;
margin-right: auto;
transition: all 0s;
}
/* Add subtle color on hover */
ha-card:hover {
background: rgba(255, 235, 59, 0.5) !important; /* Soft amber on hover with reduced opacity */
border-color: orange; /* Orange border on hover */
}
ha-state-icon {
{% if states('sensor.current_prayer') == 'Isha' %}
animation: spin 2s linear infinite;
{% endif %}
}
@keyframes spin {
0% {transform: rotate(0deg);}
mushroom-state-info$: |
.container {
--secondary-text-color: rgba(13, 71, 161, 0.9); /* A soft amber for a warm contrast */
}
card_mod:
style: |
ha-card {
/* Styling of card background */
background: linear-gradient(to bottom right, rgba(95, 158, 160, 0.85) 30%, rgba(173, 216, 230, 0.85) 100%);
}