System Monitoring - How does yours look?

Love love you dashboard it looks great, you are giving me so many ideas. Can you please post the code for you “Component Count”. Thanks

1 Like

Sure thing. Here it is:

type: entities
view_layout:
  grid-area: header
entities:
  - type: 'custom:text-divider-row'
    text: Component Count
  - entities:
      - entity: sensor.total_automations
        name: Automations
        tap_action:
          action: navigate
          navigation_path: /config/automation
        hold_action:
          action: call-service
          service: automation.reload
      - entity: sensor.total_binary_sensors
        name: Binary Sensors
      - entity: sensor.total_input_booleans
        name: Booleans
        hold_action:
          action: call-service
          service: input_boolean.reload
      - entity: sensor.total_cameras
        name: Cameras
        tap_action:
          action: navigate
          navigation_path: /lovelace/cameras
      - entity: sensor.total_counters
        name: Counters
        tap_action:
          action: navigate
          navigation_path: /lovelace/system
      - entity: sensor.total_input_datetimes
        name: DateTimes
      - entity: sensor.total_devicetrackers
        name: Devices
        tap_action:
          action: navigate
          navigation_path: /config/devices/dashboard
      - entity: sensor.domains_in_use
        name: Domains
      - entity: sensor.total_entities
        name: Entities
        tap_action:
          action: navigate
          navigation_path: /developer-tools/state
        hold_action:
          action: navigate
          navigation_path: /config/entities
      - entity: sensor.total_groups
        name: Groups
      - entity: sensor.total_lights
        name: Lights
      - entity: sensor.total_input_numbers
        name: Numbers
        hold_action:
          action: call-service
          service: input_number.reload
      - entity: sensor.total_persons
        name: People
        tap_action:
          action: navigate
          navigation_path: /config/person
        hold_action:
          action: call-service
          service: person.reload
      - entity: sensor.total_media_players
        name: Players
      - entity: sensor.total_remotes
        name: Remotes
      - entity: sensor.total_scenes
        name: Scenes
        tap_action:
          action: navigate
          navigation_path: /config/scene/dashboard
        hold_action:
          action: call-service
          service: scene.reload
      - entity: sensor.total_scripts
        name: Scripts
        tap_action:
          action: navigate
          navigation_path: /config/script
        hold_action:
          action: call-service
          service: script.reload
      - entity: sensor.total_input_selects
        name: Selects
        hold_action:
          action: call-service
          service: input_select.reload
      - entity: sensor.total_sensors
        name: Sensors
      - entity: sensor.total_shelly_devices
        name: Shelly
      - entity: sensor.total_switches
        name: Switches
      - entity: sensor.total_tasmota_devices
        name: Tasmota
        tap_action:
          action: navigate
          navigation_path: /tasmoadmin
      - entity: sensor.total_input_texts
        name: Texts
        hold_action:
          action: call-service
          service: input_text.reload
      - entity: sensor.total_timers
        name: Timers
        hold_action:
          action: call-service
          service: timer.reload
      - entity: sensor.total_zones
        name: Zones
        tap_action:
          action: navigate
          navigation_path: /config/zone
        hold_action:
          action: call-service
          service: zone.reload
    columns: 13
    type: 'custom:hui-glance-card'
    style: |
      ha-card {
        height: 100%;
        border-radius: 5px;
        background-image: none;
        box-shadow: none;
        background-color: rgba(255, 255, 255, 0);
      }
style:
  .: |
    #states > * {
      margin: 2px 0px !important;
    }
    ha-card {
      border: solid 2px var(--primary-color);
    }

Oh and if you want to know, these are the sensors:

  #================================
  # Counters
  #================================
  - platform: template
    sensors:
      
      #----- Count All Domains
      domains_in_use:
        friendly_name: Domains in use
        value_template: >
            {%- for d in states | groupby('domain') %}
            {% if loop.first %}{{loop.length}} 
            {% endif %}
            {%- endfor %}
            
      #----- Count All Entities
      total_entities:
        friendly_name: 'Entities'
        icon_template: mdi:code-tags
        value_template: "{{ states | count }}"    
    
      #----- Count Automations
      total_automations:
        friendly_name: 'Automations'
        icon_template: mdi:robot
        value_template: "{{ states.automation | list | length }}"

      #----- Count Binary Sensors
      total_binary_sensors:
        friendly_name: 'Binary Sensors'
        icon_template: mdi:checkbox-multiple-marked-circle
        value_template: "{{ states.binary_sensor | list | length }}"

      #----- Count Cameras
      total_cameras:
        friendly_name: 'Cameras'
        icon_template: mdi:cctv
        value_template: "{{ states.camera | list | length }}"

      #----- Count Counters (haha)
      total_counters:
        friendly_name: 'Counters'
        icon_template: mdi:counter
        value_template: "{{ states.counter | list | length }}"

      #----- Count Device Trackers
      total_devicetrackers:
        friendly_name: 'Devices'
        icon_template: mdi:cellphone-link
        value_template: "{{ states.device_tracker | list | length }}"

      #----- Count Groups
      total_groups:
        friendly_name: 'Groups'
        icon_template: mdi:group
        value_template: "{{ states.group | list | length }}"

      #----- Count Input Booleans
      total_input_booleans:
        friendly_name: 'Input Booleans'
        icon_template: mdi:toggle-switch
        value_template: "{{ states.input_boolean | list | length }}"

      #----- Count Input Datetimes
      total_input_datetimes:
        friendly_name: 'Input Datetimes'
        icon_template: mdi:calendar-clock
        value_template: "{{ states.input_datetime | list | length }}"

      #----- Count Input Numbers
      total_input_numbers:
        friendly_name: 'Input Numbers'
        icon_template: mdi:numeric
        value_template: "{{ states.input_number | list | length }}"

      #----- Count Input Selects
      total_input_selects:
        friendly_name: 'Input Selects'
        icon_template: mdi:format-align-justify
        value_template: "{{ states.input_select | list | length }}"

      #----- Count Input Texts
      total_input_texts:
        friendly_name: 'Input Texts'
        icon_template: mdi:alphabetical
        value_template: "{{ states.input_text | list | length }}"

      #----- Count Lights
      total_lights:
        friendly_name: 'Lights'
        icon_template: mdi:lightbulb-on
        value_template: "{{ states.light | list | length }}"

      #----- Count Media Players
      total_media_players:
        friendly_name: 'Media Players'
        icon_template: mdi:cast-connected
        value_template: "{{ states.media_player | list | length }}"

      #----- Count Persons
      total_persons:
        friendly_name: 'Persons'
        icon_template: mdi:account-multiple
        value_template: "{{ states.person | list | length }}"

      #----- Count Remotes
      total_remotes:
        friendly_name: 'Remotes'
        icon_template: mdi:remote
        value_template: "{{ states.remote | list | length }}"

      #----- Count Scenes
      total_scenes:
        friendly_name: 'Scenes'
        icon_template: mdi:palette
        value_template: "{{ states.scene | list | length }}"

      #----- Count Scripts
      total_scripts:
        friendly_name: 'Scripts'
        icon_template: mdi:script-text-outline
        value_template: "{{ states.script | list | length }}"

      #----- Count Sensors
      total_sensors:
        friendly_name: 'Sensors'
        icon_template: mdi:pulse
        value_template: "{{ states.sensor | list | length }}"

      #----- Count Switches
      total_switches:
        friendly_name: 'Switches'
        icon_template: mdi:power-socket-us
        value_template: "{{ states.switch | list | length }}"

      #----- Count Timers
      total_timers:
        friendly_name: 'Timers'
        icon_template: mdi:timer
        value_template: "{{ states.timer | list | length }}"

      #----- Count Zones
      total_zones:
        friendly_name: 'Zones'
        icon_template: mdi:map-marker-radius
        value_template: "{{ states.zone | list | length }}"

      #----- Count Tasmota Devices
      total_tasmota_devices:
        friendly_name: 'Tasmota'
        icon_template: mdi:tasmota
        value_template: "{{states.light |selectattr('entity_id','in',state_attr('group.Tasmota','entity_id'))| map(attribute='name') | list|count }}"   
        
      #----- Count Shelly Devices
      total_shelly_devices:
        friendly_name: 'Shelly'
        icon_template: mdi:flash
        value_template: "{{states.switch |selectattr('entity_id','in',state_attr('group.shelly','entity_id'))| map(attribute='name') | list|count }}"
        
      #----- Count Shelly Devices That need a firmware upgrade
      outdated_shelly_devices:
        friendly_name: 'Shelly firmware'
        icon_template: mdi:flash
        value_template:  >-
            {% set ns = namespace(count=0) %}
            {% set iter = states.switch | map(attribute='attributes.has_firmware_update') | list %}
            {% for name in iter %}
            {% if 'true' in (name | string).lower() %}
            {% set ns.count = ns.count + 1 %}
            {% endif %}
            {% endfor %}
            {{ ns.count }}
7 Likes

Thank you so much…love it

1 Like

Here’s my Energy monitor (3 phases, Solaredge 10K Solar inverter)

Virtual environment:

Devices, batteries, update:

Some of the detail information expanded:

5 Likes

Would like to use the Home Assistant Info part, can you share it with us?

Sure, here you go:

type: 'custom:stack-in-card'
mode: vertical
keep:
  background: true
  border_radius: true
  margin: true
style: |
  ha-card {
   border-radius: 10px;
   background-color: rgba(0, 0, 0, 0.2);
  } 
title: Home Assistant Info
cards:
  - type: entities
    style: |
      ha-card {
       border-radius: 10px;
       background-color: rgba(0, 0, 0, 0.4);
      } 
    entities:
      - type: divider
      - type: buttons
        entities:
          - entity: script.restart_home_assistant
            name: Restart Home Assistant
            icon: 'mdi:restart'
            style: |
              ha-card {
               border-radius: 10px;
               background-color: rgba(0, 0, 0, 0.2);
              } 
      - type: divider
      - type: 'custom:fold-entity-row'
        head:
          entity: sensor.processor_use_percent
          type: 'custom:bar-card'
          entity_row: true
          name: CPU Use
          style: |
            ha-card {
             border-radius: 10px;
             background-color: rgba(0, 0, 0, 0.0);
            }         
          severity:
            - color: mediumseagreen
              from: 0
              to: 40
            - color: lightsalmon
              from: 40
              to: 70
            - color: tomato
              from: 70
              to: 100
        entities:
          - entities:
              - entity: sensor.processor_use_percent
            hours_to_show: 2
            points_per_hour: 60
            line_width: 1
            line_color: lightgreen
            type: 'custom:mini-graph-card'
            name: CPU usage
            show:
              average: true
              extrema: true
              labels: true
            style: |
              ha-card {
               border-radius: 10px;
               background-color: rgba(0, 0, 0, 0.0);
              }
        style: |
          ha-card {
           border-radius: 10px;
           background-color: rgba(0, 0, 0, 0.4);
          }  
      - type: 'custom:fold-entity-row'
        head:
          entity: sensor.memory_use_percent
          type: 'custom:bar-card'
          entity_row: true
          name: RAM Use
          style: |
            ha-card {
             border-radius: 10px;
             background-color: rgba(0, 0, 0, 0.0);
            }         
          severity:
            - color: mediumseagreen
              from: 0
              to: 70
            - color: lightsalmon
              from: 70
              to: 90
            - color: tomato
              from: 90
              to: 100
        entities:
          - entities:
              - entity: sensor.memory_use_percent
            hours_to_show: 2
            points_per_hour: 60
            line_width: 1
            line_color: lightgreen
            type: 'custom:mini-graph-card'
            name: RAM usage
            show:
              average: true
              extrema: true
              labels: true
            style: |
              ha-card {
               border-radius: 10px;
               background-color: rgba(0, 0, 0, 0.0);
              }
        style: |
          ha-card {
           border-radius: 10px;
           background-color: rgba(0, 0, 0, 0.4);
          } 
      - type: 'custom:fold-entity-row'
        head:
          entity: sensor.disk_use_percent
          type: 'custom:bar-card'
          entity_row: true
          name: HDD Use
          style: |
            ha-card {
             border-radius: 10px;
             background-color: rgba(0, 0, 0, 0.0);
            }         
          severity:
            - color: mediumseagreen
              from: 0
              to: 60
            - color: lightsalmon
              from: 60
              to: 80
            - color: tomato
              from: 80
              to: 100
        entities:
          - entities:
              - entity: sensor.disk_use_percent
            hours_to_show: 2
            points_per_hour: 60
            line_width: 1
            line_color: lightgreen
            type: 'custom:mini-graph-card'
            name: HDD usage
            show:
              average: true
              extrema: true
              labels: true
            style: |
              ha-card {
               border-radius: 10px;
               background-color: rgba(0, 0, 0, 0.0);
              }
        style: |
          ha-card {
           border-radius: 10px;
           background-color: rgba(0, 0, 0, 0.4);
          } 
      - entity: sensor.public_ip
        name: Public IP
      - entity: sensor.uptime
      - entity: sensor.last_boot
      - entity: sensor.current_version
        type: 'custom:multiple-entity-row'
        name: HA version
        state_header: Current
        entities:
          - entity: sensor.latest_available_version
            name: Latest
        style: |
          :host {
            
                {% if states.sensor.current_version.state != states.sensor.latest_available_version.state %}
                      color: rgb(255, 165, 0);
                      --paper-item-icon-color: rgb(255, 165, 0);
                {% endif %};
            }
      - entity: sensor.hacs
        icon: 'mdi:update'
        name: HACS updates
        style: |
          :host {
            
                {% if states.sensor.hacs.state | int >0 %}
                      color: rgb(255, 165, 0);
                      --paper-item-icon-color: rgb(255, 165, 0);
                {% endif %};
            }
      - entity: sensor.supervisor_updates
        type: 'custom:multiple-entity-row'
        style: |
          :host {
            
                {% if states.sensor.supervisor_updates.state | int >0 %}
                      color: rgb(255, 165, 0);
                      --paper-item-icon-color: rgb(255, 165, 0);
                {% endif %};
            }
      - entity: sensor.home_assistant_v2_db
        style: |
          :host {
            
                {% if states.sensor.home_assistant_v2_db.state | int >10000 %}
                      color: rgb(255, 165, 0);
                      --paper-item-icon-color: rgb(255, 165, 0);
                {% endif %};
            }
  - entities:
      - entity: sensor.count_binary_sensors
        name: Binary Sensors
      - entity: sensor.count_sensors
        name: Sensors
      - entity: sensor.count_switches
        name: Switches
      - entity: sensor.count_scripts
        name: Scripts
      - entity: sensor.count_input_booleans
        name: Input Booleans
      - entity: sensor.count_automations
        name: Automations
    columns: 3
    show_icon: false
    type: glance
    style: |
      ha-card {
       border-radius: 10px;
       background-color: rgba(0, 0, 0, 0.4);

2 Likes

Thank you…
A bit of a learning curve, but i get there step by step
Thanks again

Here’s my Server Monitoring


1 Like

Hello!

Great to see that someone else (it seems also from Germany) is also using QNAP.
Are you using the standard QNAP integration of Home Assistant? I am asking because I can not get any information about USB mounted disks on my QNAP. I want to use it to automate the Backup of the QNAP itself. I can switch on the external USB disks to backup the QNAP from Home Assistant. Then the backup will take place automatically and the drives will unmount but I can not get the status of them to switch them off afterwards.

I use the standard setting.
However, I don’t have any USB hard drives.
I do the HA backup on the integrated QNAP drives.

Ok. How do you backup your NAS?

I am doing this also via “Samba Backup”.

via Samba Backup

Hi! Can You share yaml code Home Assistant Info card?

Yes, no problem. I shared this a few posts back:

Learning so much today by using your stuff! Would you mind sharing the sensor config for the Home Assistant Info part too? I actually have managed to stumble my way this far… Just not sure how to get these missing items working…

2 Likes

For the File Size I use the build in integration

Below the sensor for the supervisor updates, more info can be found in this link:

  - platform: command_line
    name: Supervisor updates
    command: 'curl http://supervisor/supervisor/info -H "Authorization: Bearer $(printenv SUPERVISOR_TOKEN)" | jq ''{"newest_version":.data.version_latest,"current_version":.data.version,"update_available":.data.update_available,"addons":[.data.addons[] | select(.update_available)]}'''
    value_template: "{{ value_json.addons | length }}"
    unit_of_measurement: pending update(s)
    json_attributes:
    - update_available
    - newest_version
    - current_version
    - addons

Oh and for the restart I simply call service: ‘homeassistant.restart’

2 Likes

Love this!
Wanting me to add more around Synology as mine is pretty plain.

Also, how are you monitoring MariaDB, PHP MyAdmin etc?

Hi @91JJ Those are the official add-ons, not separate containers or anything. But I have just followed some steps in another post in this forum: Get notified of Available Hassio Addon Updates

Then to show them in the dashboard I made a vertical stack inside a grid-layout for every addon like this:

    - type: vertical-stack
      view_layout:
        grid-column: 3/3
        grid-row: 1/1
      cards:
        - type: markdown
          content: >-
            <center><img src="/local/Pictures/addons/duckdns-ico.png"
            width="52"/> <center>DuckDNS</center>   <center>Installed: {{
            state_attr('sensor.duckdns', 'version') }}</center> <center>Newest:
            {{ state_attr('sensor.duckdns', 'version_latest') }}</center>
          style: |
            ha-card{
              background: none;
              box-shadow: none;
              font-size: 11px;
            }
        - color: green
          decimal: '1'
          entity_row: true
          height: 12px
          name: CPU Temperature
          positions:
            icon: 'off'
            indicator: 'off'
            name: 'off'
            value: 'off'
          type: 'custom:bar-card'
          width: 50%
          tap_action:
            action: navigate
            navigation_path: >-
              https://bloomassistant.duckdns.org:8123/hassio/addon/core_duckdns/info
          min: 0
          max: 50
          severity:
            - color: '#ff4d4d'
              from: 0
              to: 50
            - color: '#00e64d'
              from: 51
              to: 100
          style: |
            ha-card {
              top: -10px;
              width: 80%;
              left: 10%;            
            }
          entities:
            - entity: sensor.duckdns_update_available

Hope this helps.

1 Like

Any way to disable this behavior in canvas-gauge-card?
Every time my CPU speed refreshes the arrow starts from bottom and this annoys me a lot. :slight_smile:

cpu_gauge

type: custom:canvas-gauge-card
entity: sensor.cpu_speed
card_height: 200
gauge:
  type: radial-gauge
  title: Processor (%)
  width: 220
  height: 220
  borderShadowWidth: 0
  borderOuterWidth: 0
  borderMiddleWidth: 0
  borderInnerWidth: 0
  minValue: 0
  maxValue: 3
  startAngle: 30
  ticksAngle: 180
  valueBox: false
  majorTicks:
    - '1'
    - '2'
    - '3'
  minorTicks: 20
  strokeTicks: true
  highlights:
    - from: 2
      to: 3
      color: rgba(200, 50, 50, .75)
  borders: false

Did you check the documentation? All Configuration Options
Tried it locally and “animation: false” solved that problem for me