Skip to content

Instantly share code, notes, and snippets.

@MarcStocker
Created November 3, 2024 04:56
Show Gist options
  • Save MarcStocker/14689d0bd515f4d035cc4bfe6e536fd7 to your computer and use it in GitHub Desktop.
Save MarcStocker/14689d0bd515f4d035cc4bfe6e536fd7 to your computer and use it in GitHub Desktop.
HA Card - Server Performance - Single Large Card
type: custom:stack-in-card
mode: horizontal
cards:
- type: custom:vertical-stack-in-card
card_mod:
style: |
ha-card {
border: none !important;
background: none !important;
}
cards:
- type: markdown
content: >-
{% set lastBoot = states('sensor.home_assistant_uptime') %}
{% set time = lastBoot.split('T') %}
{% set day = time[0] %}
{% set numDays = (( as_timestamp(now()) - as_timestamp(day)) /60/60/24
) | int %}
{% set theTime = time[1].split('+') %}
{% set theTime = theTime[0] %}
**Server:** MiPi
**Uptime:** {{ numDays }} {{ 'Day' if numDays == 1 else 'Days' }}, {{
theTime }}
**15 Min Load:** {{ states('sensor.system_monitor_load_15m') }}
- type: picture
image: >-
https://homeassistant.rokflix.tv/media/local/RaspberryPi.png?authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI3MTZhYzhjYTEzMzk0ZGQzYTAyZjQ4MjIyNjNlZjYzYSIsInBhdGgiOiIvbWVkaWEvbG9jYWwvUmFzcGJlcnJ5UGkucG5nIiwicGFyYW1zIjpbXSwiaWF0IjoxNzMwNjA1MjcyLCJleHAiOjE3MzA2OTE2NzJ9.XaygULp-7Y8Gb_rnwmkCPJhdmBuwyB2ESgIEx0oItp0
card_mod:
style: |
ha-card {
width: 65% !important;
}
- type: custom:vertical-stack-in-card
card_mod:
style: |
ha-card {
border: none !important;
background: none !important;
}
cards:
- type: vertical-stack
cards:
- type: horizontal-stack
cards:
- type: gauge
entity: sensor.processor_use_percent
name: CPU
needle: false
severity:
green: 0
yellow: 30
red: 60
card_mod:
style: |
ha-card {
border: none !important;
background: none !important;
}
- type: gauge
entity: sensor.system_monitor_memory_use
name: RAM
needle: false
max: 8000
severity:
green: 0
yellow: 5000
red: 7500
card_mod:
style: |
ha-card {
border: none !important;
background: none !important;
}
- type: horizontal-stack
cards:
- type: gauge
entity: sensor.processor_temperature
needle: false
severity:
green: 0
yellow: 70
red: 78
name: Temp
card_mod:
style: |
ha-card {
border: none !important;
background: none !important;
}
- type: gauge
entity: sensor.system_monitor_disk_use_percent
name: SD-Card
needle: false
severity:
green: 0
yellow: 75
red: 85
card_mod:
style: |
ha-card {
border: none !important;
background: none !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment