Version finale, jusqu’à ce que…
Code
#//////////////////////////////////////////////////////////////////////////////#
#/////// //////////////#
#/////// CARD: ProxMox Virtual Environment & Glances monitoring
#/////// //////////////#
#//////////////////////////////////////////////////////////////////////////////#
type: "custom:swiss-army-knife-card"
entities:
# ======================================================================== NCR
#00 NCR uptime
- entity: sensor.pve_host_ncr_last_boot
#01 NCR CPU load
- entity: sensor.glances_novasrv_cpu_load ################### unused
decimals: 2
#02 NCR CPU used
- entity: sensor.glances_novasrv_cpu_used_percentage
decimals: 1
#03 NCR CPU used max
- entity: sensor.stat_glances_novasrv_cpu_used_percentage_max
decimals: 1
#04 NCR CPU temp
- entity: sensor.glances_novasrv_cpu_temperature
decimals: 0
#05 fake
- entity: sun.sun
#06 NCR Chipset temp
- entity: sensor.glances_novasrv_chipset_temperature
decimals: 0
#07 fake
- entity: sun.sun
#08 NCR RAM used
- entity: sensor.glances_novasrv_ram_used_percentage
decimals: 1
#09 NCR RAM used max
- entity: sensor.stat_glances_novasrv_ram_used_percentage_max
decimals: 1
#10 fake
- entity: sun.sun
#11 NCR sda disk health
- entity: binary_sensor.pve_host_ncr_disk_sda_health
#12 NCR sda disk temp
- entity: sensor.glances_novasrv_disk_1_temperature
decimals: 0
#13 NCR sdb disk health
- entity: binary_sensor.pve_host_ncr_disk_sdb_health
#14 NCR sdb disk temp
- entity: sensor.glances_novasrv_disk_2_temperature
decimals: 0
# ============================================================ PVE FRIGATE LXC
#15 Frigate status
- entity: binary_sensor.pve_ct119_frigate_status
#16 Frigate CPU used
- entity: sensor.pve_ct119_frigate_cpu_used_percentage
decimals: 1
#17 Frigate RAM used
- entity: sensor.pve_ct119_frigate_memory_used_percentage
decimals: 1
#18 fake
- entity: sun.sun
#19 faje
- entity: sun.sun
# =========================================================== PVE JELLYFIN LXC
#20 Jellyfin status
- entity: binary_sensor.pve_ct118_jellyfin_status
#21 Jellyfin CPU used
- entity: sensor.pve_ct118_jellyfin_cpu_used_percentage
decimals: 1
#22 Jellyfin RAM used
- entity: sensor.pve_ct118_jellyfin_memory_used_percentage
decimals: 1
#23 fake
- entity: sun.sun
#24 fake
- entity: sun.sun
# ========================================================== PVE TAILSCALE LXC
#25 Tailscale status
- entity: binary_sensor.pve_ct117_tailscale_status
#26 Tailscale CPU used
- entity: sensor.pve_ct117_tailscale_cpu_used_percentage
decimals: 1
#27 Tailscale CPU used
- entity: sensor.pve_ct117_tailscale_memory_used_percentage
decimals: 1
#28
- entity: sun.sun
#29 fake
- entity: sun.sun
# ======================================================= PVE VM HOMEASSISTANT
#30 HomeAssistant status
- entity: binary_sensor.pve_vm113_homeassistant_status
#31 HomeAssistant CPU used
- entity: sensor.pve_vm113_homeassistant_cpu_used_percentage
decimals: 1
#32 HomeAssistant RAM used
- entity: sensor.pve_vm113_homeassistant_memory_used_percentage
decimals: 1
#33 HomeAssistant health
- entity: binary_sensor.pve_vm113_homeassistant_health
#34 fake
- entity: sun.sun
# ============================================================= PVE VM LUXRIOT
#35 Luxriot status
- entity: binary_sensor.pve_vm111_luxriot_status
#36 Luxriot CPU used
- entity: sensor.pve_vm111_luxriot_cpu_used_percentage
decimals: 1
#37 Luxriot RAM used
- entity: sensor.pve_vm111_luxriot_memory_used_percentage
decimals: 1
#38 Luxriot health
- entity: binary_sensor.pve_vm111_luxriot_health
#39 fake
- entity: sun.sun
# ====================================================== PVE VM OPENMEDIAVAULT
#40 OpenMediaVault status
- entity: binary_sensor.pve_vm114_openmediavault_status
#41 OpenMediaVault CPU used
- entity: sensor.pve_vm114_openmediavault_cpu_used_percentage
decimals: 1
#42 OpenMediaVault RAM used
- entity: sensor.pve_vm114_openmediavault_memory_used_percentage
decimals: 1
#43 OpenMediaVault health
- entity: binary_sensor.pve_vm114_openmediavault_health
#44 OpenMediaVault USB hdd
- entity: sensor.omv_disk_usb_temperature
# ============================================================= fake
#45 VM/CT status
- entity: sun.sun ################### unused unused
#46 VM/CT CPU used
- entity: sun.sun ################### unused unused
#47 VM/CT RAM used
- entity: sun.sun ################### unused unused
#48 VM/CT health
- entity: sun.sun ################### unused unused
#49 VM/CT uptime
- entity: sun.sun ################### unused unused
# ============================================================================
#50
- entity: sensor.sfr_box_temperature
decimals: 0
aspectratio: 1.8/1
layout:
styles:
card:
toolsets:
# filter: url(#nm-1)
toolsets:
### ------------------------------------------------------------------------
### ------------------------------------------------------------------------
### ---------------------------------------------------------- DEFAULT TOOLS
- toolset: default tools
position:
cx: 50
cy: 50
tools:
## ____________________________________________ default icon
- <<: &icon
type: icon
# entity_index: 0
position:
cx: 50
cy: 50
icon_size: 10
styles:
icon:
fill: var(--overlay0)
user_actions:
tap_action:
haptic: none
actions: none
## ____________________________________________ default state
- <<: &state
type: state
# entity_index: 0
position:
cx: 50
cy: 50
styles:
state:
font-size: 7em
fill: var(--primary-text-color)
uom:
opacity: 0.2
user_actions:
tap_action:
haptic: none
actions: none
## ____________________________________________ default text
- <<: &text
type: text
position:
cx: 50
cy: 50
text: 'TEXT'
styles:
text:
text-anchor: middle # middle / start / end
font-size: 6em
font-weight: 600
fill: var(--secondary-text-color)
user_actions:
tap_action:
haptic: none
actions: none
# ==================================================================================
# ==================================================================================
# ==================================================================================
# ==================================================================================
# ======================================================================== NCR n4000
### ------------------------------------------------------------------------
### ------------------------------------------------------------------------
### ----------------------------------------------------------- CORNER ICONS
- toolset: corner icons
position:
cx: 50
cy: 50
tools:
## ____________________________________________ PVE icon
- <<: *icon
icon: si:proxmox
position:
cx: 10
cy: 10
icon_size: 8
# ## ____________________________________________ ?????????????????? icon
# - <<: *icon
# icon: si:proxmox
# position:
# cx: 90
# cy: 10
# icon_size: 8
# ## ____________________________________________ ?????????????????? icon
# - <<: *icon
# icon: si:proxmox
# position:
# cx: 90
# cy: 90
# icon_size: 8
## ____________________________________________ reboot icon
- <<: *icon
icon: mdi:restart
position:
cx: 10
cy: 90
icon_size: 10
user_actions:
tap_action:
haptic: failure # selection success warning failure light medium heavy
actions:
- action: call-service
service: honeycomb
service_data:
size: 300
spacing: 4
animation_speed: 50
audio: null
autoclose: true
show_name: false
entity: null
active: true
buttons:
### button 1 TAILSCALE
- icon: mdi:dots-grid
color: var(--orange)
entity: binary_sensor.pve_ct117_tailscale_status
active: '[[[ return entity.state == "off" ]]]'
tap_action:
action: call-service
service: button.press
service_data:
entity_id: button.pve_ct117_tailscale_reboot
### button 2 HOME ASSISTANT
- icon: mdi:home-assistant
color: var(--blue)
entity: binary_sensor.pve_vm113_homeassistant_status
active: '[[[ return entity.state == "off" ]]]'
tap_action:
action: call-service
service: button.press
service_data:
entity_id: button.pve_vm113_homeassistant_reboot
### button 3 LUXRIOT
- icon: mdi:record-rec
color: var(--red)
entity: binary_sensor.pve_vm111_luxriot_status
active: '[[[ return entity.state == "off" ]]]'
tap_action:
action: call-service
service: button.press
service_data:
entity_id: button.pve_vm111_luxriot_reboot
### button 4 OPENMEDIAVAULT
- icon: mdi:nas
color: var(--green)
entity: binary_sensor.pve_vm114_openmediavault_status
active: '[[[ return entity.state == "off" ]]]'
tap_action:
action: call-service
service: button.press
service_data:
entity_id: button.pve_vm114_openmediavault_reboot
### button 5 JELLYFIN
- icon: si:jellyfin
color: var(--nova-color)
entity: binary_sensor.pve_ct118_jellyfin_status
active: '[[[ return entity.state == "off" ]]]'
tap_action:
action: call-service
service: button.press
service_data:
entity_id: button.pve_ct118_jellyfin_reboot
### button 6 FRIGATE
- icon: phu:frigate
color: var(--text)
entity: binary_sensor.pve_ct119_frigate_status
active: '[[[ return entity.state == "off" ]]]'
tap_action:
action: call-service
service: button.press
service_data:
entity_id: button.pve_ct119_frigate_reboot
### ------------------------------------------------------------------------
### ------------------------------------------------------------------------
### -------------------------------------------------------------- CPU + RAM
- toolset: cpu ram circular
position:
cx: 50
cy: 50
tools:
## ____________________________________________ circle
- type: circle
position:
cx: 50
cy: 50
radius: 46
styles:
circle:
fill: var(--primary-background-color)
user_actions:
tap_action:
haptic: none
actions: none
## ____________________________________________ sparkline
- type: sparkline
position:
cx: 50
cy: 50
width: 90
height: 90
# margin:
# x: 0
# y: 0
entity_index: 2
period:
calendar:
period: day
offset: 0
duration:
hour: 24
bins:
per_hour: 2
group_by: date
sparkline:
animate: true
show:
chart_type: radial_barcode
chart_variant: sunburst_outward
chart_viz: flower
state_values:
aggregate_func: max # avg / max
radial_barcode:
size: 12
line_width: 0.1
column_spacing: 0.3
colorstops_transition: smooth # smooth / hard
colorstops:
colors:
- value: 00
color: var(--rainbow-palette-color-05)
- value: 41
color: var(--rainbow-palette-color-07)
- value: 61
color: var(--rainbow-palette-color-08)
- value: 81
color: var(--rainbow-palette-color-10)
styles:
radial_barcode_background:
fill: var(--sidebar-background-color)
user_actions:
tap_action:
haptic: none
actions: none
## ____________________________________________ segarc
- type: segarc
entity_index: 8
position:
cx: 50
cy: 50
start_angle: 0
end_angle: 360
width: 4
radius: 32 # circle -1
scale:
min: 0
max: 100
width: 0.6
offset: 0 # 0 for outer / -2 for inner
show:
scale: true
style: colorstops
segments:
colorstops:
gap: 1
colors: &blue_palette
00: var(--blue-palette-color-02)
61: var(--blue-palette-color-04)
81: var(--blue-palette-color-08)
91: var(--red)
styles:
background:
fill: var(--sidebar-background-color)
animation:
duration: 5
user_actions:
tap_action:
haptic: none
actions: none
## ____________________________________________ CPU icon
# - <<: *icon
# entity_index: 2
# icon: mdi:cpu-64-bit
# position:
# cx: 50
# cy: 29
# icon_size: 7
- <<: *text
position:
cx: 50
cy: 29
text: 'CPU'
styles:
text:
text-anchor: middle # middle / start / end
font-size: 5em
font-weight: 600
fill: var(--secondary-text-color)
## ____________________________________________ RAM icon
# - <<: *icon
# entity_index: 8
# icon: mdi:memory
# position:
# cx: 50
# cy: 71
# icon_size: 7
- <<: *text
position:
cx: 50
cy: 71
text: 'RAM'
styles:
text:
text-anchor: middle # middle / start / end
font-size: 5em
font-weight: 600
fill: var(--secondary-text-color)
- toolset: cpu values
position:
cx: 44
cy: 40
tools:
## ____________________________________________ CPU state
- <<: *state
entity_index: 2
<<: &rainbow_percent_colorstop
show:
style: colorstops
colorstops:
fill: true
colors:
00: var(--primary-text-color)
41: var(--yellow)
61: var(--orange)
81: var(--red)
styles:
state:
font-size: 12em
## ____________________________________________ CPU max state
- <<: *state
entity_index: 3
<<: &max_state
position:
cx: 70
cy: 54
show:
style: colorstops
colorstops:
fill: true
colors:
00: var(--primary-text-color)
41: var(--yellow)
61: var(--orange)
81: var(--red)
styles:
state:
font-size: 6em
animations:
- state: '40'
operator: '<='
styles:
state:
opacity: 0.2
uom:
opacity: 0.1
- state: '40'
operator: '>'
styles:
state:
opacity: 0.6
uom:
opacity: 0.3
- state: '60'
operator: '>'
styles:
state:
opacity: 0.8
uom:
opacity: 0.5
- state: '80'
operator: '>'
styles:
state:
opacity: 1
uom:
opacity: 0.7
- toolset: ram values
position:
cx: 44
cy: 58
tools:
## ____________________________________________ RAM state
- <<: *state
entity_index: 8
<<: &blue_percent_colorstop
show:
style: colorstops
colorstops:
fill: true
colors:
<<: *blue_palette
# 00: var(--blue-palette-color-02)
# 41: var(--blue-palette-color-04)
# 71: var(--blue-palette-color-07)
# 91: var(--red)
styles:
state:
font-size: 12em
## ____________________________________________ RAM max state
- <<: *state
entity_index: 9
<<: *max_state
show:
style: colorstops
colorstops:
fill: true
colors:
00: var(--primary-text-color)
61: var(--yellow)
81: var(--orange)
91: var(--red)
styles:
state:
font-size: 6em
animations:
- state: '60'
operator: '<='
styles:
state:
opacity: 0.2
uom:
opacity: 0.1
- state: '60'
operator: '>'
styles:
state:
opacity: 0.6
uom:
opacity: 0.3
- state: '80'
operator: '>'
styles:
state:
opacity: 0.8
uom:
opacity: 0.5
- state: '90'
operator: '>'
styles:
state:
opacity: 1
uom:
opacity: 0.7
### ------------------------------------------------------------------------
### ------------------------------------------------------------------------
### ----------------------------------------------------------- TEMPERATURES
- toolset: temperature text
position:
cx: 106
cy: 9
tools:
## ____________________________________________ temp text
# - <<: *icon
# icon: mdi:thermometer
# # entity_index: 4
# position:
# cx: 64.5
# cy: 50
# icon_size: 10
- <<: *text
position:
cx: 59
cy: 50
text: 'TEMP'
- toolset: cpu temp
position:
cx: 106
cy: 22
tools:
## ____________________________________________ cpu icon
- <<: *icon
icon: mdi:cpu-64-bit
# entity_index: 2
## ____________________________________________ cpu state
- <<: *state
entity_index: 4
position:
cx: 65
cy: 50
<<: &50_temp_colorstop
show:
style: colorstops
colorstops:
fill: true
colors:
0: var(--primary-text-color)
51: var(--yellow)
71: var(--orange)
91: var(--red)
- toolset: pch (chipset) temp
position:
cx: 106
cy: 36
tools:
## ____________________________________________ pch icon
- <<: *icon
icon: mdi:chip
# entity_index: 6
## ____________________________________________ pch state
- <<: *state
entity_index: 6
position:
cx: 65
cy: 50
<<: &60_temp_colorstop
show:
style: colorstops
colorstops:
fill: true
colors:
0: var(--primary-text-color)
61: var(--yellow)
81: var(--orange)
91: var(--red)
- toolset: ssd a temp
position:
cx: 106
cy: 50
tools:
## ____________________________________________ sda icon
- <<: *icon
entity_index: 11
icon: mdi:harddisk
<<: &disk_animation
animations:
- state: 'off'
operator: '!='
styles:
icon:
fill: var(--warning-color)
- state: 'off'
styles:
icon:
transition: opacity 3s
## ____________________________________________ sda badge
- <<: *icon
entity_index: 11
<<: &disk_badge
icon: mdi:check-circle
position:
cx: 54
cy: 46
icon_size: 6
styles:
icon:
fill: var(--success-color)
animations:
- state: 'off'
operator: '!='
styles:
icon:
opacity: 0
- state: 'off'
styles:
icon:
opacity: 0.7
transition: opacity 3s
## ____________________________________________ sda state
- <<: *state
entity_index: 12
position:
cx: 65
cy: 50
<<: &40_temp_colorstop
show:
style: colorstops
colorstops:
fill: true
colors:
0: var(--primary-text-color)
41: var(--yellow)
51: var(--orange)
61: var(--red)
- toolset: ssd b temp
position:
cx: 106
cy: 64
tools:
## ____________________________________________ sdb icon
- <<: *icon
entity_index: 13
icon: mdi:harddisk-plus
<<: *disk_animation
## ____________________________________________ sdb badge
- <<: *icon
entity_index: 13
<<: *disk_badge
## ____________________________________________ sdb state
- <<: *state
entity_index: 14
position:
cx: 65
cy: 50
<<: *40_temp_colorstop
# - toolset: usb hdd temp
# position:
# cx: 106
# cy: 78
# tools:
# ## ____________________________________________ usb hdd icon
# - <<: *icon
# icon: mdi:nas
# ## ____________________________________________ usb hdd state
# - <<: *state
# entity_index: 44
# position:
# cx: 65
# cy: 50
# <<: *40_temp_colorstop
- toolset: box temp
position:
cx: 106
cy: 92
tools:
## ____________________________________________ box icon
- <<: *icon
entity_index: 50
icon: mdi:router-wireless
## ____________________________________________ box state
- <<: *state
entity_index: 50
position:
cx: 65
cy: 50
<<: *50_temp_colorstop
# ==================================================================================
# ==================================================================================
# ==================================================================================
# ==================================================================================
# ================================================== VIRTUAL MACHINES AND CONTAINERS
- toolset: vm_ct text
position:
cx: 136
cy: 9
tools:
## ____________________________________________ text
# - <<: *icon
# # entity_index: 2
# icon: mdi:cpu-64-bit
# position:
# cx: 64.5
# cy: 50
# icon_size: 10
- <<: *text
position:
cx: 66
cy: 50
text: 'CPU'
## ____________________________________________ text
# - <<: *icon
# icon: mdi:memory
# # entity_index: 8
# position:
# cx: 79.5
# cy: 50
# icon_size: 10
- <<: *text
position:
cx: 83
cy: 50
text: 'RAM'
### ------------------------------------------------------------------------
### ------------------------------------------------------------------------
### --------------------------------------------------------- HOME ASSISTANT
- toolset: vm home assistant
position:
cx: 136
cy: 22
tools:
## ____________________________________________ home assistant icon
- <<: *icon
entity_index: 33
icon: mdi:home-assistant
position:
cx: 50
cy: 50
icon_size: 8
<<: &animation
animations:
- state: 'off'
operator: '!='
styles:
icon:
fill: var(--error-color)
- state: 'off'
styles:
icon:
transition: fill 3s
## ____________________________________________ home assistant badge
- <<: *icon
entity_index: 30
<<: &run-badge
icon: mdi:play-circle
position:
cx: 54
cy: 46
icon_size: 6
styles:
icon:
fill: var(--success-color)
animations:
- state: 'on'
operator: '!='
styles:
icon:
opacity: 0
- state: 'on'
styles:
icon:
opacity: 0.7
transition: opacity 3s
- <<: *icon
entity_index: 30
<<: &stop-badge
icon: mdi:stop-circle
position:
cx: 54
cy: 46
icon_size: 6
styles:
icon:
fill: var(--error-color)
animations:
- state: 'off'
operator: '!='
styles:
icon:
opacity: 0
- state: 'off'
styles:
icon:
transition: opacity 3s
## ____________________________________________ home assistant CPU
- <<: *state
entity_index: 31
position:
cx: 67
<<: *rainbow_percent_colorstop
## ____________________________________________ home assistant RAM
- <<: *state
entity_index: 32
position:
cx: 84
<<: *blue_percent_colorstop
### ------------------------------------------------------------------------
### ------------------------------------------------------------------------
### ---------------------------------------------------------------- LUXRIOT
- toolset: vm luxriot
position:
cx: 136
cy: 36
tools:
## ____________________________________________ luxriot icon
- <<: *icon
entity_index: 38
icon: mdi:record-rec
position:
cx: 50
cy: 50
icon_size: 12
<<: *animation
## ____________________________________________ luxriot badge
- <<: *icon
entity_index: 35
<<: *run-badge
- <<: *icon
entity_index: 35
<<: *stop-badge
## ____________________________________________ luxriot CPU
- <<: *state
entity_index: 36
position:
cx: 67
<<: *rainbow_percent_colorstop
## ____________________________________________ luxriot RAM
- <<: *state
entity_index: 37
position:
cx: 84
<<: *blue_percent_colorstop
### ------------------------------------------------------------------------
### ------------------------------------------------------------------------
### --------------------------------------------------------- OPENMEDIAVAULT
- toolset: vm openmediavault
position:
cx: 136
cy: 50
tools:
## ____________________________________________ openmediavault icon
- <<: *icon
entity_index: 43
icon: mdi:nas
<<: *animation
## ____________________________________________ openmediavault badge
- <<: *icon
entity_index: 40
<<: *run-badge
- <<: *icon
entity_index: 40
<<: *stop-badge
## ____________________________________________ openmediavault CPU
- <<: *state
entity_index: 41
position:
cx: 67
<<: *rainbow_percent_colorstop
## ____________________________________________ openmediavault RAM
- <<: *state
entity_index: 42
position:
cx: 84
<<: *blue_percent_colorstop
### ------------------------------------------------------------------------
### ------------------------------------------------------------------------
### -------------------------------------------------------------- TAILSCALE
- toolset: ct tailscale
position:
cx: 136
cy: 64
tools:
## ____________________________________________ tailscale icon
- <<: *icon
entity_index: 28
icon: mdi:dots-square
## ____________________________________________ tailscale badge
- <<: *icon
entity_index: 25
<<: *run-badge
- <<: *icon
entity_index: 25
<<: *stop-badge
## ____________________________________________ tailscale CPU
- <<: *state
entity_index: 26
position:
cx: 67
<<: *rainbow_percent_colorstop
## ____________________________________________ tailscale RAM
- <<: *state
entity_index: 27
position:
cx: 84
<<: *blue_percent_colorstop
### ------------------------------------------------------------------------
### ------------------------------------------------------------------------
### ---------------------------------------------------------------- FRIGATE
- toolset: ct frigate
position:
cx: 136
cy: 78
tools:
## ____________________________________________ frigate icon
- <<: *icon
entity_index: 18
icon: phu:frigate
## ____________________________________________ frigate badge
- <<: *icon
entity_index: 15
<<: *run-badge
- <<: *icon
entity_index: 15
<<: *stop-badge
## ____________________________________________ frigate CPU
- <<: *state
entity_index: 16
position:
cx: 67
<<: *rainbow_percent_colorstop
## ____________________________________________ frigate RAM
- <<: *state
entity_index: 17
position:
cx: 84
<<: *blue_percent_colorstop
### ------------------------------------------------------------------------
### ------------------------------------------------------------------------
### --------------------------------------------------------------- JELLYFIN
- toolset: ct jellyfin
position:
cx: 136
cy: 92
tools:
## ____________________________________________ jellyfin icon
- <<: *icon
entity_index: 23
icon: si:jellyfin
position:
cx: 50
cy: 50
icon_size: 8
## ____________________________________________ jellyfin badge
- <<: *icon
entity_index: 20
<<: *run-badge
- <<: *icon
entity_index: 20
<<: *stop-badge
## ____________________________________________ jellyfin CPU
- <<: *state
entity_index: 21
position:
cx: 67
<<: *rainbow_percent_colorstop
## ____________________________________________ jellyfin RAM
- <<: *state
entity_index: 22
position:
cx: 84
<<: *blue_percent_colorstop
>