Oui biensur! (désolé pour le délais de réponse)
Voici la tuile de mon NAS:
############## NAS ##########
- type: custom:button-card
entity: binary_sensor.containers_portainer
entity_picture: /local/images/nas.png
show_entity_picture: true
name: Nas - Magnum
styles:
icon:
- width: 90px
tap_action:
action: url
url_path: http://adressedemonnas/
template:
- info_tile
custom_fields:
contenu: |
[[[
var result =
`<p style="margin:0px;">
<ha-icon icon="mdi:server" style="width:16px;"></ha-icon>
<span style="color: var(--text-color-sensor);">CPU: ${states['sensor.magnum_cpu_load_total'].state}% </span><ha-icon icon="mdi:chart-timeline-variant" style="width:16px;color:lightgray;"></ha-icon></br>
<ha-icon icon="mdi:memory" style="width:16px;"></ha-icon>
<span style="color: var(--text-color-sensor);">RAM: ${states['sensor.magnum_memory_usage_real'].state}% </span><ha-icon icon="mdi:chart-timeline-variant" style="width:16px;color:dimgray;"></ha-icon></br>
<ha-icon icon='mdi:database' style='width:16px;'></ha-icon>
<span style='color:var(--text-color-sensor);'>Temp: ${states['sensor.magnum_temperature'].state}°C </span><ha-icon icon="mdi:chart-timeline-variant" style="width:16px;color:deepskyblue;"></ha-icon></br>
<ha-icon icon='mdi:database' style='width:16px;'></ha-icon>
<span style='color:var(--text-color-sensor);'>HDD: ${states['sensor.magnum_volume_1_volume_used'].state}%</span>`;
return result;
]]]
graph:
card:
type: custom:decluttering-card
template: graph_3_series
variables:
- serie1: sensor.magnum_cpu_load_total
- serie2: sensor.magnum_memory_usage_real
- serie3: sensor.magnum_temperature
- serie3_max: |
[[[ return (states['sensor.magnum_temperature'].state )*2.5; ]]]
Avec le decluttering correspondant:
#------ Graph_3_series
graph_3_series:
card:
type: custom:mini-graph-card
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';
}
show:
icon: false
name: false
state: false
legend: false
hours_to_show: 1
points_per_hour: 120
upper_bound: 100
lower_bound: 0
line_width: 5
height: 120
lower_bound_secondary: 0
upper_bound_secondary: '[[serie3_max]]'
entities:
- entity: '[[serie1]]'
color: LightGray
- entity: '[[serie2]]'
color: dimgray
- entity: '[[serie3]]'
color: deepskyblue
y_axis: secondary
show_fill: false
et les templates button card:
#------ Base
base_monitor:
styles:
card:
- text-shadow: 0px 0px 5px black
- font: 13px Roboto
- font-weight: 500
- opacity: 0.8
#------ Info Tile
info_tile:
template:
- base_monitor
- graph
styles:
card:
- height: 160px
grid:
- grid-template-areas: '"n n" "i contenu"'
- grid-template-columns: 50% auto
- grid-template-rows: 20px 70%
icon:
- width: 40px
- align-self: top
name:
- font-size: 16px
- align-self: top
- opacity: 0.8
custom_fields:
contenu:
- text-align: start
- align-self: middle # Vertical
- font-size: 12px
#------ Graph
graph:
styles:
custom_fields:
graph:
- position: absolute
- bottom: 0%
- left: 0%
- width: 100%
- padding-bottom: 0px
- opacity: 70%