Hi everybody,
I’ve been taking alot of knowledge and code from this amazing thread, people such as @rhysb and @piitaya have, inherently, changed my whole lovelace. Aswell as @Tinkerer on Discord, who has always pointed me in the right direction to figure out how to get this project going. Since im not a programmer myself, learning and getting skilled at this takes a bit longer for me. Nevertheless i would love to contribute my two cents by sharing something that i’ve been working on. Inspired by @benm7’s card.
type: vertical-stack
cards:
- type: custom:mushroom-title-card
- square: false
columns: 2
type: grid
cards:
- type: vertical-stack
cards:
- type: custom:mushroom-entity-card
entity: sensor.processor_use_percent
name: Processor
icon_color: green
card_mod:
style: |
ha-card {
background: none;
box-shadow: none;
}
double_tap_action:
action: none
hold_action:
action: none
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
title: Hardware monitor
content:
type: horizontal-stack
cards:
- type: custom:vertical-stack-in-card
cards:
- type: custom:mushroom-template-card
primary: CPU use
secondary: |
{{ states('sensor.processor_use_percent') }}%
icon: mdi:cpu-64-bit
icon_color: '#2eb9ff'
tap_action:
action: more-info
card_mod:
style: |
ha-card {
background: none;
--ha-card-border-width: 0px
- type: custom:layout-card
layout_type: null
layout:
width: 250
max_cols: 1
height: auto
padding: 0px
card_margin: var(--masonry-view-card-margin, -10px 8px 15px)
card_mod:
style: |
ha-card {
background: none;
--ha-card-border-width: 0px
background: none;
box-shadow: none;
}
cards:
- type: custom:apexcharts-card
apex_config:
fill:
type: gradient
gradient:
type: horizontal
shadeIntensity: 0.1
inverseColors: false
opacityFrom: 0.5
opacityTo: 1
stops: 5
graph_span: 1d
header:
show: true
series:
- entity: sensor.processor_use_percent
name: CPU Load
curve: smooth
color: '#2eb9ff'
stroke_width: 2
opacity: 2
group_by:
duration: 1h
func: max
card_mod:
style: |
ha-card {
--ha-card-border-width: 0px
- type: custom:mushroom-entity-card
entity: sensor.memory_use_percent
name: Memory
icon_color: orange
card_mod:
style: |
ha-card {
background: none;
box-shadow: none;
}
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
title: Hardware monitor
content:
type: horizontal-stack
cards:
- type: custom:vertical-stack-in-card
cards:
- type: custom:mushroom-template-card
primary: Memory use
secondary: |
{{ states('sensor.memory_use_percent') }}%
icon: mdi:memory
icon_color: orange
card_mod:
style: |
ha-card {
background: none;
box-shadow: none;
}
- type: custom:layout-card
layout_type: null
layout:
width: 250
max_cols: 1
height: auto
padding: 0px
card_margin: var(--masonry-view-card-margin, -10px 8px 15px)
card_mod:
style: |
ha-card {
background: none;
--ha-card-border-width: 0px
cards:
- type: custom:apexcharts-card
apex_config:
fill:
type: gradient
gradient:
type: horizontal
shadeIntensity: 0.1
inverseColors: false
opacityFrom: 0.5
opacityTo: 1
stops: 5
graph_span: 1d
header:
show: true
series:
- entity: sensor.memory_use_percent
name: CPU Load
curve: smooth
color: orange
stroke_width: 2
opacity: 2
group_by:
duration: 1h
func: max
card_mod:
style: |
ha-card {
--ha-card-border-width: 0px
}
- type: custom:mushroom-entity-card
entity: sensor.processor_temperature
name: Temperature
icon_color: red
card_mod:
style: |
ha-card {
background: none;
box-shadow: none;
}
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
title: Hardware monitor
content:
type: horizontal-stack
cards:
- type: custom:vertical-stack-in-card
cards:
- type: custom:mushroom-template-card
primary: CPU temperature
secondary: |
{{ states('sensor.processor_temperature') }}°C
icon: mdi:thermometer
icon_color: red
card_mod:
style: |
ha-card {
background: none;
--ha-card-border-width: 0px
- type: custom:layout-card
layout_type: null
layout:
width: 250
max_cols: 1
height: auto
padding: 0px
card_margin: var(--masonry-view-card-margin, -10px 8px 15px)
card_mod:
style: |
ha-card {
background: none;
--ha-card-border-width: 0px
cards:
- type: custom:apexcharts-card
experimental:
color_threshold: true
apex_config:
fill:
type: gradient
gradient:
type: horizontal
shadeIntensity: 0.5
inverseColors: false
opacityFrom: 0.5
opacityTo: 1
stops: 5
graph_span: 1d
header:
show: true
series:
- entity: sensor.processor_temperature
name: CPU Temperature
curve: smooth
stroke_width: 2
opacity: 2
color_threshold:
- value: 35
color: '#ade8f4'
- value: 45
color: orange
- value: 55
color: orangered
- value: 65
color: red
group_by:
duration: 1h
func: max
card_mod:
style: |
ha-card {
--ha-card-border-width: 0px
}
- type: custom:apexcharts-card
chart_type: donut
header:
show: false
floating: true
show_states: true
colorize_states: false
apex_config:
title:
floating: false
align: center
style:
fontSize: 20px
fontWeight: normal
chart:
offsetY: 0
height: 230px
legend:
show: false
position: bottom
series:
- entity: sensor.sensor_storage_capacity_free
name: Free
color: '#00b4d8'
- entity: sensor.sensor_storage_capacity_used
name: Used
color: '#ade8f4'
card_mod:
style: |
ha-card {
background: none;
box-shadow: none;
}
- type: custom:mushroom-chips-card
chips:
- type: template
content: |2-
{%- set up = now().timestamp()-as_timestamp(states('sensor.uptime')) %}
{%- macro phrase(name,divisor,mod=None) %}
{%- set value = ((up//divisor) % (mod if mod else divisor))|int %}
{%- set end = 's' if value > 1 else '' %}
{{- '{} {}{}'.format(value,name,end) if value|int > 0 else ''}}
{%- endmacro %}
{%- set values = [phrase('week',60*60*24*7),
phrase('day',60*60*24,7),
phrase('hour',60*60,24),
phrase('min',60),
phrase('sec',1,60)]
|select('!=','')|list %}
{{values[:-1]|join(', ') ~ ' and ' ~ values[-1] if values|length > 1 else
values|first}}
icon: mdi:home-assistant
icon_color: blue
- type: template
content: |2-
{%- set up = now().timestamp()-as_timestamp(states('sensor.last_boot')) %}
{%- macro phrase(name,divisor,mod=None) %}
{%- set value = ((up//divisor) % (mod if mod else divisor))|int %}
{%- set end = 's' if value > 1 else '' %}
{{- '{} {}{}'.format(value,name,end) if value|int > 0 else ''}}
{%- endmacro %}
{%- set values = [phrase('week',60*60*24*7),
phrase('day',60*60*24,7),
phrase('hour',60*60,24),
phrase('min',60),
phrase('sec',1,60)]
|select('!=','')|list %}
{{values[:-1]|join(', ') ~ ' and ' ~ values[-1] if values|length > 1 else
values|first}}
icon: mdi:nas
icon_color: '#70e000'
card_mod:
style: |
ha-card {
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
alignment: center