As an update I’ve done a lot of playing with this and got every function to work properly as intended originally and think it looks pretty good so sharing what I have.
This is what it looks like:
Will also include my NUC picture:
Custom cards needed for this to work:
card-mod
mini-graph-card
config-template-card
button-card
bar-card
hui-element
configuration.yaml: (change names in the card to match these if you already have these and don’t want to rename them)
sensor:
- platform: systemmonitor
resources:- platform: systemmonitor
resources:
- type: disk_use_percent
- type: disk_use
- type: disk_free
- type: memory_use_percent
- type: memory_free
- type: processor_use
- type: memory_use
- type: swap_use
- platform: version
source: local
name: HomeAssistant Version
- platform: command_line
name: "cpu_temperature"
command: "cat /sys/class/thermal/thermal_zone2/temp"
unit_of_measurement: "°C"
value_template: '{{ value | multiply(0.001) | round(2) }}'
- platform: uptime
name: "uptime"
- platform: template
sensors:
disk_total:
value_template: "{{ ( states('sensor.disk_use')|float + states('sensor.disk_free')|float )| round (1) }}"
homeassistant_uptime:
friendly_name: HomeAssistant Uptime
value_template: >-
{%- set up_time = as_timestamp(now())-as_timestamp(states('sensor.uptime')) %}
{%- macro phrase(name, divisor, mod=None) %}
{%- set value = ((up_time // 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)
] | select('!=','') | list %}
{{ values[:-1] | join(', ') ~ ' and ' ~ values[-1] if values | length > 1 else values | first }}
And card:
id: nuc_status
type: custom:config-template-card
variables:
- states[''sensor.disk_use_percent''].state
- states[''sensor.homeassistant_version''].state
- states[''sensor.disk_total''].state
- states[''sensor.disk_use''].state
- states[''sensor.memory_use_percent''].state
- states[''sensor.processor_use''].state
- states[''sensor.cpu_temperature''].state
entities:
- sensor.disk_use_percent
- sensor.homeassistant_version
- sensor.disk_total
- sensor.disk_use
- sensor.memory_use_percent
- sensor.processor_use
- sensor.cpu_temperature
card:
type: entities
show_header_toggle: 'off'
style: |
.card-header {
padding: 0px 0px 0px 0px !important;
}
entities:
- type: section
label: '${ ''NUC i5 --- Ubuntu 18.04.1 LTS --- HA Version '' + vars[1] }'
- type: custom:hui-element
card_type: vertical-stack
cards:
- type: horizontal-stack
cards:
- type: picture
style: |
ha-card {
--paper-card-background-color: 'rgba(0, 0, 0, 0.0)';
--ha-card-background: "rgba(0, 0, 0, 0.0)";
--ha-card-box-shadow: 'none';
}
image: /local/images/intel_nuc.png
- type: custom:button-card
layout: icon_name_state2nd
show_icon: true
show_state: true
styles:
grid:
- grid-template-columns: 50px auto
icon:
- padding: 0px 0px
- height: 30px
- width: 30px
card:
- '--ha-card-background': 'rgba(0, 0, 0, 0.0)'
- '--ha-card-box-shadow': none
state:
- padding: 0px 10px
- justify-self: start
- font-family: 'Roboto, sans-serif'
- font-size: 15px
name:
- padding: 0px 10px
- justify-self: start
- color: var(--secondary-text-color)
entity: sensor.homeassistant_uptime
name: Uptime
icon: 'mdi:clock-outline'
- type: custom:bar-card
show_icon: true
align: split
columns: 1
max: 100
positions:
icon: inside
indicator: inside
name: inside
value: inside
unit_of_measurement: '%'
severity:
- value: 50
color: '#3498db'
- value: 75
color: '#f39c12'
- value: 100
color: '#e45e65'
style: |
ha-card {
--paper-card-background-color: 'rgba(0, 0, 0, 0.0)';
--ha-card-background: "rgba(0, 0, 0, 0.0)";
--paper-item-icon-color: 'var(--text-primary-color';
--ha-card-box-shadow: 'none';
}
entities:
- entity: sensor.disk_use_percent
name: '${ ''Disk ('' + vars[3] + ''Gb/'' + vars[2] + ''Gb)'' }'
entity_row: true
- type: horizontal-stack
cards:
- type: custom:bar-card
show_icon: true
align: split
columns: 1
max: 100
positions:
icon: inside
indicator: inside
name: inside
value: inside
unit_of_measurement: '%'
severity:
- value: 50
color: '#3498db'
- value: 75
color: '#f39c12'
- value: 100
color: '#e45e65'
style: |
ha-card {
--paper-card-background-color: 'rgba(0, 0, 0, 0.0)';
--ha-card-background: "rgba(0, 0, 0, 0.0)";
--paper-item-icon-color: 'var(--text-primary-color';
--ha-card-box-shadow: 'none';
}
entity: sensor.memory_use_percent
name: RAM
entity_row: true
- type: custom:bar-card
show_icon: true
align: split
columns: 1
max: 100
positions:
icon: inside
indicator: inside
name: inside
value: inside
unit_of_measurement: '%'
severity:
- value: 50
color: '#3498db'
- value: 75
color: '#f39c12'
- value: 100
color: '#e45e65'
style: |
ha-card {
--paper-card-background-color: 'rgba(0, 0, 0, 0.0)';
--ha-card-background: "rgba(0, 0, 0, 0.0)";
--paper-item-icon-color: 'var(--text-primary-color';
--ha-card-box-shadow: 'none';
}
entity: sensor.processor_use
name: CPU
entity_row: true
- type: custom:mini-graph-card
height: 30
line_width: 2
font_size: 70
hours_to_show: 168
points_per_hour: 1
show:
extrema: true
fill: true
style: |
ha-card {
--ha-card-background: "rgba(0, 0, 0, 0.0)";
--ha-card-box-shadow: 'none';
border-radius: 5px;
}
.info.flex {
font-size: 12px !important;
}
entities:
- sensor.cpu_temperature
name: Temperature
color_thresholds:
- value: 30
color: '#3498db'
- value: 50
color: '#f39c12'
- value: 80
color: '#ff0000'
EDIT: If you want to center the blue text at the very top change the type section as follows:
- type: section
style: |
.label {
text-align: center !important;
margin-left: 0px !important;
}
label: '${ ''NUC i5 --- Ubuntu 18.04.1 LTS --- HA Version '' + vars[1] }'
EDIT: Have now also played with uptime a bit to make it fit better especially with longer uptimes:
- type: custom:button-card
layout: icon_name
show_icon: true
show_state: true
styles:
grid: null
card:
- '--ha-card-background': 'rgba(0, 0, 0, 0.0)'
- '--ha-card-box-shadow': none
icon:
- padding: 20px 0px 0px
- height: 30px
- width: 30px
state:
- padding: 10px 0px 0px
- justify-self: center
- font-family: 'Roboto, sans-serif'
- font-size: 14px
name:
- padding: 19px 0px 0px
- justify-self: start
- color: var(--secondary-text-color)
entity: sensor.homeassistant_uptime
name: 'Uptime:'
icon: 'mdi:clock-outline'