Dashboard Proxmox

YAML
title: Proxmox Server
type: sections
max_columns: 4
sections:
  - type: grid
    cards:
      - cards:
          - image: https://bachtran.net/media/proxmox.png
            type: picture
          - entities:
              - decimal: 0
                entity: sensor.node_tongtb_cpu_used
                entity_row: true
                height: 25
                name: CPU%
                positions:
                  icon: inside
                severity:
                  - color: "#0F9D58"
                    from: 0
                    to: 50
                  - color: "#F4B400"
                    from: 51
                    to: 80
                  - color: "#DB4437"
                    from: 81
                    to: 100
                type: custom:bar-card
              - decimal: 0
                entity: sensor.node_tongtb_memory_used_percentage
                entity_row: true
                height: 25
                max: 100
                min: 0
                name: RAM
                positions:
                  icon: inside
                severity:
                  - color: "#0F9D58"
                    from: 0
                    to: 70
                  - color: "#F4B400"
                    from: 70
                    to: 90
                  - color: "#DB4437"
                    from: 90
                    to: 100
                type: custom:bar-card
            type: entities
        title: false
        type: custom:vertical-stack-in-card
      - type: vertical-stack
        cards:
          - type: heading
            icon: mdi:information-variant-circle-outline
            heading_style: subtitle
            badges:
              - type: entity
                show_state: true
                show_icon: true
                entity: binary_sensor.node_tongtb_status
                name: Ubuntu
                icon: ""
                color: green
            heading: Trạng thái
          - type: heading
            icon: mdi:harddisk
            heading_style: subtitle
            badges:
              - type: entity
                show_state: true
                show_icon: true
                name: Ubuntu
                icon: ""
                color: green
                entity: sensor.storage_tongtb_local_zfs_disk_used_percentage
            heading: SSD đã dùng
          - type: heading
            icon: mdi:memory
            heading_style: subtitle
            badges:
              - type: entity
                show_state: true
                show_icon: true
                entity: sensor.node_tongtb_memory_used
                name: Ubuntu
                icon: ""
                color: green
            heading: RAM đã dùng
          - type: heading
            icon: mdi:ubuntu
            heading_style: subtitle
            badges:
              - type: entity
                show_state: true
                show_icon: true
                entity: sensor.node_tongtb_last_boot
                name: Ubuntu
                icon: ""
                color: green
            heading: Last Boot
      - type: vertical-stack
        cards:
          - type: heading
            icon: mdi:shield-check
            heading: Adguard
            heading_style: subtitle
            badges:
              - type: entity
                show_state: true
                show_icon: true
                entity: binary_sensor.lxc_adguard_100_status
                name: Adguard
                icon: ""
                color: green
          - type: heading
            icon: mdi:home-assistant
            heading: Home assistant
            heading_style: subtitle
            badges:
              - type: entity
                show_state: true
                show_icon: true
                name: Adguard
                icon: ""
                color: green
                entity: binary_sensor.qemu_haos_105_status
          - type: heading
            icon: mdi:microsoft-windows
            heading_style: subtitle
            badges:
              - type: entity
                show_state: true
                show_icon: true
                entity: binary_sensor.qemu_win10_103_status
                name: Adguard
                icon: ""
                color: green
            heading: Windows 10
          - type: heading
            icon: mdi:ubuntu
            heading_style: subtitle
            badges:
              - type: entity
                show_state: true
                show_icon: true
                entity: binary_sensor.qemu_ubuntuvm_104_status
                name: Adguard
                icon: ""
                color: green
            heading: Ubuntu
          - type: heading
            icon: mdi:docker
            heading_style: subtitle
            badges:
              - type: entity
                show_state: true
                show_icon: true
                entity: binary_sensor.qemu_ubuntuvm_104_status
                name: Adguard
                icon: ""
                color: green
            heading: Docker
      - type: markdown
        content: >-
          <ha-alert alert-type="info" title="Thông tin chi tiết Proxmox Server">


          | Thông số | Giá trị |

          | :--- | :--- |

          | **Nhiệt độ SSD** | `{{
          states('sensor.disk_tongtb_skhynix_hfs256gej4x113n_temperature') }}°C`
          |

          | **VM đang chạy** | `{{
          states('sensor.node_tongtb_virtual_machines_running') }}` |

          | **LXC đang chạy** | `{{
          states('sensor.node_tongtb_containers_running') }}` |

          | **Bộ nhớ đã sử dụng** | `{{
          (states('sensor.node_tongtb_memory_used') | float) | round(2) }} GB
          ({{ (states('sensor.node_tongtb_memory_used_percentage') | float) |
          round(2) }}%)` |


          </ha-alert>
        text_only: true
      - type: custom:button-card
        show_icon: false
        show_name: false
        color_type: card
        styles:
          card:
            - background-color: "#000"
            - padding: 24px 28px
            - border-radius: 16px
            - box-shadow: 0 6px 20px rgba(0,0,0,0.45)
            - font-family: Segment7
            - font-variant-numeric: tabular-nums
            - text-align: right
          grid:
            - grid-template-areas: |
                "volt"
                "amp"
                "watt"
            - grid-template-rows: auto auto auto
            - row-gap: 20px
          custom_fields:
            volt:
              - grid-area: volt
              - justify-self: end
              - align-self: center
              - font-size: 56px
              - line-height: 1.05
              - color: "#ffff33"
              - letter-spacing: 1px
              - margin: 6px 0 2px 0
            amp:
              - grid-area: amp
              - justify-self: end
              - align-self: center
              - font-size: 56px
              - line-height: 1.05
              - color: "#00ff00"
              - letter-spacing: 1px
              - margin: 6px 0 2px 0
            watt:
              - grid-area: watt
              - justify-self: end
              - align-self: center
              - font-size: 56px
              - line-height: 1.05
              - color: "#ff3333"
              - letter-spacing: 1px
              - margin: 6px 0 0 0
        custom_fields:
          volt: |
            [[[
              const s = states['sensor.energy_monitoring_smartplug_dien_ap']?.state ?? '0';
              const n = Number(s);
              if (isNaN(n)) return `${s} V`;
              const p = Math.floor(Math.abs(n)).toString().padStart(4,'0');  // 0236
              const f = Math.abs(n).toFixed(2).split('.')[1];                // 46
              return `${n<0?'-':''}${p}.${f} V`;
            ]]]
          amp: |
            [[[
              const s = states['sensor.energy_monitoring_smartplug_dong']?.state ?? '0';
              const n = Number(s);
              if (isNaN(n)) return s + ' A';
              const p = Math.floor(Math.abs(n)).toString().padStart(3,'0');         // 000
              const f = Math.abs(n).toFixed(3).split('.')[1];                       // 000
              return `${n<0?'-':''}${p}.${f} A`;
            ]]]
          watt: |
            [[[
              const s = states['sensor.energy_monitoring_smartplug_cong_suat']?.state ?? '0';
              const n = Number(s);
              if (isNaN(n)) return `${s} W`;
              const p = Math.floor(Math.abs(n)).toString().padStart(4,'0');   // 0000
              const f = Math.abs(n).toFixed(2).split('.')[1];                 // 00
              return `${n<0?'-':''}${p}.${f} W`;
            ]]]
  - type: grid
    cards:
      - cards:
          - image: https://bachtran.net/media/w10.png
            type: picture
          - entities:
              - decimal: 0
                entity: sensor.qemu_win10_103_cpu_used
                entity_row: true
                height: 25
                icon: mdi:cpu-64-bit
                name: C
                positions:
                  icon: inside
                severity:
                  - color: "#0F9D58"
                    from: 0
                    to: 50
                  - color: "#F4B400"
                    from: 51
                    to: 80
                  - color: "#DB4437"
                    from: 81
                    to: 100
                type: custom:bar-card
              - decimal: 0
                entity: sensor.qemu_win10_103_memory_used_percentage
                entity_row: true
                height: 25
                max: 100
                min: 0
                name: R
                positions:
                  icon: inside
                severity:
                  - color: "#0F9D58"
                    from: 0
                    to: 70
                  - color: "#F4B400"
                    from: 70
                    to: 90
                  - color: "#DB4437"
                    from: 90
                    to: 100
                type: custom:bar-card
              - entity: sensor.qemu_win10_103_last_boot
                name: Windows 10 Boot
                icon: mdi:microsoft-windows
            type: entities
        title: false
        type: custom:vertical-stack-in-card
      - type: vertical-stack
        cards:
          - type: heading
            icon: mdi:information-variant-circle-outline
            heading_style: subtitle
            badges:
              - type: entity
                show_state: true
                show_icon: true
                entity: binary_sensor.qemu_win10_103_status
                name: Ubuntu
                icon: ""
                color: green
            heading: Trạng thái
          - type: heading
            icon: mdi:memory
            heading: Bộ nhớ trống
            heading_style: subtitle
            badges:
              - type: entity
                show_state: true
                show_icon: true
                name: Ubuntu
                icon: ""
                color: green
                entity: sensor.qemu_win10_103_memory_free
          - type: heading
            icon: mdi:memory
            heading_style: subtitle
            badges:
              - type: entity
                show_state: true
                show_icon: true
                entity: sensor.qemu_win10_103_memory_used
                name: Ubuntu
                icon: ""
                color: green
            heading: Bộ nhớ đã dùng
          - type: heading
            icon: mdi:ubuntu
            heading_style: subtitle
            badges:
              - type: entity
                show_state: true
                show_icon: true
                entity: sensor.qemu_win10_103_last_boot
                name: Ubuntu
                icon: ""
                color: green
            heading: Last Boot
  - type: grid
    cards:
      - cards:
          - image: https://bachtran.net/media/ha.png
            type: picture
          - entities:
              - decimal: 0
                entity: sensor.qemu_haos_105_cpu_used
                entity_row: true
                height: 25
                icon: mdi:cpu-64-bit
                name: C
                positions:
                  icon: inside
                severity:
                  - color: "#0F9D58"
                    from: 0
                    to: 30
                  - color: "#F4B400"
                    from: 30
                    to: 60
                  - color: "#DB4437"
                    from: 60
                    to: 100
                type: custom:bar-card
              - decimal: 0
                entity: sensor.qemu_haos_105_memory_used_percentage
                entity_row: true
                height: 25
                max: 100
                min: 0
                name: R
                positions:
                  icon: inside
                severity:
                  - color: "#0F9D58"
                    from: 0
                    to: 30
                  - color: "#F4B400"
                    from: 30
                    to: 70
                  - color: "#DB4437"
                    from: 70
                    to: 100
                type: custom:bar-card
              - entity: sensor.qemu_haos_105_last_boot
                name: HASSOS Boot
                icon: mdi:home-assistant
            type: entities
        title: false
        type: custom:vertical-stack-in-card
      - type: vertical-stack
        cards:
          - type: heading
            icon: mdi:information-variant-circle-outline
            heading_style: subtitle
            badges:
              - type: entity
                show_state: true
                show_icon: true
                entity: binary_sensor.qemu_haos_105_status
                name: Ubuntu
                icon: ""
                color: green
            heading: Trạng thái
          - type: heading
            icon: mdi:memory
            heading: Bộ nhớ trống
            heading_style: subtitle
            badges:
              - type: entity
                show_state: true
                show_icon: true
                name: Ubuntu
                icon: ""
                color: green
                entity: sensor.qemu_haos_105_memory_free
          - type: heading
            icon: mdi:memory
            heading_style: subtitle
            badges:
              - type: entity
                show_state: true
                show_icon: true
                entity: sensor.qemu_haos_105_memory_used
                name: Ubuntu
                icon: ""
                color: green
            heading: Bộ nhớ đã dùng
          - type: heading
            icon: mdi:ubuntu
            heading_style: subtitle
            badges:
              - type: entity
                show_state: true
                show_icon: true
                entity: sensor.qemu_haos_105_last_boot
                name: Ubuntu
                icon: ""
                color: green
            heading: Last Boot
  - type: grid
    cards:
      - cards:
          - image: https://bachtran.net/media/us.png
            type: picture
          - entities:
              - decimal: 0
                entity: sensor.qemu_ubuntuvm_104_cpu_used
                entity_row: true
                height: 25
                icon: mdi:cpu-64-bit
                name: C
                positions:
                  icon: inside
                severity:
                  - color: "#0F9D58"
                    from: 0
                    to: 50
                  - color: "#F4B400"
                    from: 51
                    to: 80
                  - color: "#DB4437"
                    from: 81
                    to: 100
                type: custom:bar-card
              - decimal: 0
                entity: sensor.qemu_ubuntuvm_104_memory_used_percentage
                entity_row: true
                height: 25
                max: 100
                min: 0
                name: R
                positions:
                  icon: inside
                severity:
                  - color: "#0F9D58"
                    from: 0
                    to: 70
                  - color: "#F4B400"
                    from: 70
                    to: 90
                  - color: "#DB4437"
                    from: 90
                    to: 100
                type: custom:bar-card
              - entity: sensor.qemu_ubuntuvm_104_last_boot
                name: Ubuntu server Boot
                icon: mdi:ubuntu
            type: entities
        title: false
        type: custom:vertical-stack-in-card
      - type: vertical-stack
        cards:
          - type: heading
            icon: mdi:information-variant-circle-outline
            heading_style: subtitle
            badges:
              - type: entity
                show_state: true
                show_icon: true
                entity: binary_sensor.qemu_ubuntuvm_104_status
                name: Ubuntu
                icon: ""
                color: green
            heading: Trạng thái
          - type: heading
            icon: mdi:memory
            heading: Bộ nhớ trống
            heading_style: subtitle
            badges:
              - type: entity
                show_state: true
                show_icon: true
                name: Ubuntu
                icon: ""
                color: green
                entity: sensor.qemu_ubuntuvm_104_memory_free
          - type: heading
            icon: mdi:memory
            heading_style: subtitle
            badges:
              - type: entity
                show_state: true
                show_icon: true
                entity: sensor.qemu_ubuntuvm_104_memory_used
                name: Ubuntu
                icon: ""
                color: green
            heading: Bộ nhớ đã dùng
          - type: heading
            icon: mdi:ubuntu
            heading_style: subtitle
            badges:
              - type: entity
                show_state: true
                show_icon: true
                entity: sensor.qemu_ubuntuvm_104_last_boot
                name: Ubuntu
                icon: ""
                color: green
            heading: Last Boot
  - type: grid
    cards: []
cards: []
0 0 đánh giá
Đánh giá bài viết
Theo dõi
Thông báo của
0 Góp ý
Được bỏ phiếu nhiều nhất
Mới nhất Cũ nhất
Phản hồi nội tuyến
Xem tất cả bình luận
0
Rất thích suy nghĩ của bạn, hãy bình luận.x