Title and entity:
type: vertical-stack
cards:
- type: custom:mushroom-title-card
title: Study
- type: custom:stack-in-card
mode: horizontal
cards:
- type: custom:mushroom-template-card
primary: Bens PC
secondary: |-
{{ states((entity)) | title }} {% if is_state((entity), 'on') %}
{% if (now() - states('sensor.winterfell_lastactive')|as_datetime).total_seconds() < 10 %}
- Active
{% else %}
- Inactive
{% endif %}
{% endif %}
icon: mdi:microsoft-windows
icon_color: |-
{% if is_state((entity), 'off') %}
disabled
{% else %}
blue
{% endif %}
badge_icon: >-
{% if (now() -
states('sensor.winterfell_lastactive')|as_datetime).total_seconds() <
10 %}
mdi:run
{% else %}
''
{% endif %}
badge_color: >-
{% if (now() -
states('sensor.winterfell_lastactive')|as_datetime).total_seconds() <
10 %}
green
{% else %}
''
{% endif %}
entity: switch.winterfell
card_mod:
style: |
ha-card {
--ha-card-border-width: 0;
}
ha-card:active {
background: rgba(var(--rgb-disabled), 0.1);
transform: scale(0.985);
transition: 0s;
}
- type: custom:mushroom-chips-card
chips:
- type: entity
entity: button.winterfell_lock
icon_color: white
icon: mdi:lock
content_info: none
tap_action:
action: call-service
service: button.press
target:
entity_id: button.winterfell_lock
card_mod:
style: |
ha-card {
--chip-background: rgba(var(--rgb-primary-text-color), 0.05);
--chip-border-width: 0;
--icon-color: rgb(var(--rgb-white));
}
- type: entity
entity: button.winterfell_sleep
icon_color: white
icon: mdi:power-sleep
content_info: none
tap_action:
action: call-service
confirmation:
text: Are you sure you want to Sleep?
service: button.press
target:
entity_id: button.winterfell_sleep
card_mod:
style: |
ha-card {
--chip-background: rgba(var(--rgb-primary-text-color), 0.05);
--chip-border-width: 0;
--icon-color: rgb(var(--rgb-white));
}
- type: entity
entity: button.winterfell_restart
icon_color: white
icon: mdi:restart
content_info: none
tap_action:
action: call-service
confirmation:
text: Are you sure you want to Restart?
service: button.press
target:
entity_id: button.winterfell_restart
card_mod:
style: |
ha-card {
--chip-background: rgba(var(--rgb-primary-text-color), 0.05);
--chip-border-width: 0;
--icon-color: rgb(var(--rgb-white));
}
- type: entity
entity: button.winterfell_shutdown
icon_color: white
icon: mdi:power
content_info: none
tap_action:
action: call-service
confirmation:
text: Are you sure you want to Shutdown?
service: button.press
target:
entity_id: button.winterfell_shutdown
card_mod:
style: |
ha-card {
--chip-background: rgba(var(--rgb-primary-text-color), 0.05);
--chip-border-width: 0;
--icon-color: rgb(var(--rgb-white));
}
card_mod:
style: |
ha-card {
--chip-box-shadow: none;
top: 16px;
width: -webkit-fill-available;
right: 12px;
position: absolute;
}
.chip-container {
right: 0px;
position: absolute;
}
CPU/RAM/GPU:
type: conditional
conditions:
- entity: sensor.winterfell_cpuload
state_not: unavailable
card:
type: vertical-stack
cards:
- type: grid
square: false
columns: 3
cards:
- type: custom:stack-in-card
cards:
- type: custom:apexcharts-card
chart_type: radialBar
series:
- entity: sensor.winterfell_cpuload
color: rgb(76, 175, 80)
max: 100
show:
legend_value: false
apex_config:
plotOptions:
radialBar:
offsetY: 0
startAngle: -108
endAngle: 108
hollow:
size: 65%
dataLabels:
name:
show: false
value:
show: false
track:
strokeWidth: 80%
margin: 0
legend:
show: false
chart:
height: 170px
card_mod:
style: |
ha-card {
--ha-card-border-width: 0;
}
- type: custom:mushroom-entity-card
entity: sensor.winterfell_cpuload
primary_info: name
secondary_info: state
name: Core
icon: mdi:cpu-64-bit
icon_color: green
layout: vertical
tap_action:
action: more-info
hold_action:
action: more-info
double_tap_action:
action: more-info
card_mod:
style: |
ha-card {
top: -63px;
--ha-card-border-width: 0;
}
card_mod:
style: |
ha-card {
height: 158px;
}
- type: custom:stack-in-card
cards:
- type: custom:apexcharts-card
chart_type: radialBar
series:
- entity: sensor.winterfell_memoryusage
color: rgb(33, 150, 243)
max: 100
show:
legend_value: false
apex_config:
plotOptions:
radialBar:
offsetY: 0
startAngle: -108
endAngle: 108
hollow:
size: 65%
dataLabels:
name:
show: false
value:
show: false
track:
strokeWidth: 80%
margin: 0
legend:
show: false
chart:
height: 170px
card_mod:
style: |
ha-card {
--ha-card-border-width: 0;
}
- type: custom:mushroom-entity-card
entity: sensor.winterfell_memoryusage
primary_info: name
secondary_info: state
name: Memory
icon_color: blue
layout: vertical
tap_action:
action: more-info
hold_action:
action: more-info
double_tap_action:
action: more-info
card_mod:
style: |
ha-card {
top: -63px;
--ha-card-border-width: 0;
}
card_mod:
style: |
ha-card {
height: 158px;
}
- type: custom:stack-in-card
cards:
- type: custom:apexcharts-card
chart_type: radialBar
series:
- entity: sensor.winterfell_gpuload
color: rgb(233, 30, 99)
max: 100
show:
legend_value: false
apex_config:
plotOptions:
radialBar:
offsetY: 0
startAngle: -108
endAngle: 108
hollow:
size: 65%
dataLabels:
name:
show: false
value:
show: false
track:
strokeWidth: 80%
margin: 0
legend:
show: false
chart:
height: 170px
card_mod:
style: |
ha-card {
--ha-card-border-width: 0;
}
- type: custom:mushroom-entity-card
entity: sensor.winterfell_gpuload
primary_info: name
secondary_info: state
name: GPU
icon: mdi:expansion-card
icon_color: pink
layout: vertical
tap_action:
action: more-info
hold_action:
action: more-info
double_tap_action:
action: more-info
card_mod:
style: |
ha-card {
top: -63px;
--ha-card-border-width: 0;
}
card_mod:
style: |
ha-card {
height: 158px;
}
Harddrives:
type: vertical-stack
cards:
- type: conditional
conditions:
- entity: sensor.winterfell_cpuload
state_not: unavailable
card:
type: custom:stack-in-card
mode: horizontal
cards:
- type: custom:mushroom-template-card
icon: mdi:sd
icon_color: red
layout: vertical
tap_action:
action: more-info
hold_action:
action: none
double_tap_action:
action: none
primary: C Drive
secondary: '{{ state_attr((entity), ''UsedSpacePercentage'') }} %'
multiline_secondary: false
entity: sensor.winterfell_storage_c
card_mod:
style:
mushroom-shape-icon$: |
.shape {
background: radial-gradient(var(--card-background-color) 60%, transparent calc(60% + 1px)), conic-gradient(rgb(var(--rgb-{{ config.icon_color }})) {{ (state_attr(config.entity, 'UsedSpacePercentage')) }}% 0%, var(--card-background-color) 0% 100%);
}
.shape:after {
content: "";
height: 100%;
width: 100%;
position: absolute;
border-radius: var(--icon-border-radius);
background: rgba(var(--rgb-{{ config.icon_color }}), 0.2);
}
.: |
ha-card {
--ha-card-border-width: 0;
}
- type: custom:mushroom-template-card
icon: mdi:harddisk
icon_color: teal
layout: vertical
tap_action:
action: more-info
hold_action:
action: none
double_tap_action:
action: none
primary: D Drive
secondary: '{{ state_attr((entity), ''UsedSpacePercentage'') }} %'
multiline_secondary: false
entity: sensor.winterfell_storage_d
card_mod:
style:
mushroom-shape-icon$: |
.shape {
background: radial-gradient(var(--card-background-color) 60%, transparent calc(60% + 1px)), conic-gradient(rgb(var(--rgb-{{ config.icon_color }})) {{ (state_attr(config.entity, 'UsedSpacePercentage')) }}% 0%, var(--card-background-color) 0% 100%);
}
.shape:after {
content: "";
height: 100%;
width: 100%;
position: absolute;
border-radius: var(--icon-border-radius);
background: rgba(var(--rgb-{{ config.icon_color }}), 0.2);
}
.: |
ha-card {
--ha-card-border-width: 0;
}
- type: custom:mushroom-template-card
icon: mdi:harddisk
icon_color: orange
layout: vertical
tap_action:
action: more-info
hold_action:
action: none
double_tap_action:
action: none
primary: E Drive
secondary: '{{ state_attr((entity), ''UsedSpacePercentage'') }} %'
multiline_secondary: false
entity: sensor.winterfell_storage_e
card_mod:
style:
mushroom-shape-icon$: |
.shape {
background: radial-gradient(var(--card-background-color) 60%, transparent calc(60% + 1px)), conic-gradient(rgb(var(--rgb-{{ config.icon_color }})) {{ (state_attr(config.entity, 'UsedSpacePercentage')) }}% 0%, var(--card-background-color) 0% 100%);
}
.shape:after {
content: "";
height: 100%;
width: 100%;
position: absolute;
border-radius: var(--icon-border-radius);
background: rgba(var(--rgb-{{ config.icon_color }}), 0.2);
}
.: |
ha-card {
--ha-card-border-width: 0;
}