Skip to content

Lovelace Config

Ezra edited this page Jan 12, 2020 · 4 revisions

Example Homeassistant lovelace config

Please install all components below (you can install them all with HACS).

Optional if you also want the system stats/performance bars.

Edit the entities to your needs, for example:

switch.unraid_vm_steam -> switch.unraid_vm_VMNAME

Steam Server

  - type: custom:vertical-stack-in-card
    title: unRAID Server
    cards:
      - type: horizontal-stack
        cards:
          - type: custom:card-modder
            card: 
              type: picture
              image: /local/images/unraid.png
            style:                 
              border-radius: 5px
          - type: vertical-stack
            cards:  
              - type: custom:entity-attributes-card
                filter:
                  include:
                    - key: binary_sensor.unraid_server.cpu                      
                    - key: binary_sensor.unraid_server.memory
                    - key: binary_sensor.unraid_server.motherboard
                    - key: binary_sensor.unraid_server.arrayStatus
                    - key: binary_sensor.unraid_server.diskSpace
                    - key: binary_sensor.unraid_server.arrayProtection                                   
              - type: entities
                show_header_toggle: false
                entities:            
                  - switch.unraid_array                                
      - type: conditional
        conditions:
          - entity: sensor.glances_unraid_disk_used_percent
            state_not: "unavailable"
          - entity: sensor.glances_unraid_disk_used_percent
            state_not: "unknown"    
        card:
            type: custom:bar-card
            align: split
            show_icon: true
            padding: 4px
            columns: 2
            card_style: 
              border-radius: 5px
            severity:
            - value: 50
              color: '#3bb3ee'
            - value: 80
              color: '#e7a24a'
            - value: 100
              color: '#ff0000'                        
            entities:
              - entity: sensor.glances_unraid_disk_used_percent
                title: Disk
                max: 100            
              - entity: sensor.glances_unraid_cpu_used
                title: CPU
                max: 100             
      - type: conditional
        conditions:
          - entity: sensor.glances_unraid_disk_used_percent
            state_not: "unavailable"
          - entity: sensor.glances_unraid_disk_used_percent
            state_not: "unknown"    
        card:
            type: custom:bar-card
            align: split
            show_icon: true
            padding: 4px
            columns: 2
            card_style: 
              border-radius: 5px
            severity:
            - value: 50
              color: '#3bb3ee'
            - value: 80
              color: '#e7a24a'
            - value: 100
              color: '#ff0000'                        
            entities:
              - entity: sensor.glances_unraid_swap_used_percent
                title: SWAP             
                max: 100
              - entity: sensor.glances_unraid_ram_used_percent
                title: RAM
                max: 100
      - type: conditional
        conditions:
          - entity: sensor.glances_unraid_containers_active
            state_not: '0'
          - entity: sensor.glances_unraid_disk_used_percent
            state_not: "unavailable"
          - entity: sensor.glances_unraid_disk_used_percent
            state_not: "unknown"                
        card:
            type: custom:bar-card
            align: split
            show_icon: true
            padding: 4px
            columns: 2
            card_style: 
              border-radius: 5px
            entities:
              - entity: sensor.glances_unraid_containers_ram_used
                title: Docker RAM 
                max: 10000                
              - entity: sensor.glances_unraid_containers_cpu_used
                title: Docker CPU                   
      - type: conditional
        conditions:
          - entity: sensor.glances_unraid_disk_used_percent
            state_not: "unavailable"
          - entity: sensor.glances_unraid_disk_used_percent
            state_not: "unknown"    
        card:
            type: custom:bar-card
            align: left
            title_position: left
            show_icon: true
            padding: 4px
            columns: 1
            card_style: 
              border-radius: 5px
            severity:
            - value: 50
              color: '#3bb3ee'
            - value: 80
              color: '#e7a24a'
            - value: 100
              color: '#ff0000'                        
            entities:
              - entity: sensor.glances_unraid_containers_active 
                title: Containers    
                max: 40   
      - type: custom:auto-entities
        filter:
          include:
            - entity_id: switch.unraid_vm_*   
          exclude:
            - entity_id: switch.unraid_vm_*_usb*               
        card:
          type: custom:fold-entity-row
          head:
            type: section
            label: Virtual Machine Control   
      - type: custom:auto-entities
        filter:  
          include:
            - entity_id: switch.unraid_vm_*_usb*               
        card:
          type: custom:fold-entity-row
          head:
            type: section
            label: Virtual Machine  USB Control   
      - type: custom:auto-entities
        filter:
          include:
            - entity_id: switch.unraid_docker_*   
        card:
          type: custom:fold-entity-row
          head:
            type: section
            label: Docker Control
  - type: custom:vertical-stack-in-card
    title: Steam VM
    cards:
      - type: horizontal-stack
        cards:
          - type: custom:card-modder
            card: 
              type: picture
              image: /local/images/steam.png
            style:                 
              border-radius: 5px        
          - type: vertical-stack
            cards:  
              - type: entities
                show_header_toggle: false
                entities:            
                  - switch.unraid_vm_steam
                  - input_boolean.grub_reboot                     
              - type: custom:entity-attributes-card
                filter:
                  include:
                    - key: switch.unraid_vm_steam.status
                    - key: switch.unraid_vm_steam.coreCount
                    - key: switch.unraid_vm_steam.ram                    
                    - key: switch.unraid_vm_steam.primaryGPU  
      - type: custom:auto-entities
        filter:  
          include:
            - entity_id: switch.unraid_vm_steam_usb*               
        card:
          type: custom:fold-entity-row
          head:
            type: section
            label: USB Devices  
Clone this wiki locally