ApexCharts card - A highly customizable graph card

:tada::tada: New Release :tada::tada:

1.10.0 (2021-10-24)

Features

  • uses the time format defined in Home Assistant user profile (78df800), closes #213
  • yaxis: Align the extremas to the closest align_to value. (a46c812), closes #170
  • pie/donut now shows the value of the serie instead of the percentage. Old behavior with datalabels: percent (7591aba)
  • actions: header_actions support for actions in header (#171) (bd6a497), closes #61
  • display the chart’s last update time using last_updated (2dd84ff)
  • yaxis: Set the number of decimals shown on the yaxis. Deprecate y_axis_precision. (33fc474), closes #164
  • update from lit-html/lit-element to lit (5a7d944)
  • yaxis: id and yaxis_id no longer needed with only 1 yaxis defined (e5e8904)

Bug Fixes

  • color_threshold would sometimes render weirdly (d7063a5), closes #177
  • extremas would not display with offset applied on series (4d7d77a), closes #177
  • Floats were not truncated properly for radialBar (0c789ff), closes #174
  • history data could be modified in some rare cases (d38fd6e)
  • Ignore recorder when not required (c28a7a6), closes #169
  • the hass object could sometimes be null (ff27baf), closes #191
  • When recorder was skipped, attributes were ignored (15e5372)
  • yaxis: auto scale was not taking the serie’s offset into account (f82f7e0), closes #172
  • yaxis: Fixed + unfixed bounds on the same yaxis is now working (f7e4668)

Documentation

  • align_to description update (4471469)
  • Missing doc for last_updated (93ae54a)
10 Likes

Sorry, I was quite absent lately, will try to do better in the future :slight_smile:

3 Likes

I try to combine the chart with auto-entities. It works if I want to show each series in one graph, but how do I create separate graphs for each series, like in with mini-graph card:

type: custom:auto-entities
card:
  type: grid
  columns: 2
  square: false
card_param: cards
filter:
  include:
    - entity_id: '*b*usd*'
      state: '>2'
      options:
        type: custom:mini-graph-card

If I try the filter method I get 1 chart with different series.

type: custom:auto-entities
card:
  type: custom:apexcharts-card
  header:
    show: true
  apex_config:
    chart:
      height: 410px
    stroke:
      show: true
      width: 1
  graph_span: 12h
filter:
  include:
    - name: Binance*USD
      state: '> 0'
      options:
        group_by:
          func: avg
          duration: 10min
  exclude: []
sort:
  method: none

Thanks.
That’s a perfect alternative to the big number card!

Nobody an idea, how to send the big numbers to the back?

Thanks for this release, especially the yaxis features and bug fixes.

I had problems with decimals but with your latest version of ApexCharts everything is working perfect now!

I use the “headers” in my charts. But in one of them, the label that comes from the sensor is too long. Is there a way to edit the label in the header?

Example: in this card, I’m doing a grid with two apexcharts-card, the left card shows ‘kB/s’, the right card shows ‘packets/s’, but the word is long and I’d like to abbreviate it to ‘pkts/s’ to keep the header to two lines instead of four lines.
image

The code for the card is:

type: grid
cards:
  - type: custom:apexcharts-card
    apex_config:
      yaxis:
        show: true
        forceNiceScale: true
        decimalsInFloat: 0
      stroke:
        width: 3
        curve: smooth
      legend:
        show: false
    graph_span: 2d
    header:
      show: true
      show_states: true
      colorize_states: true
      title: pfSense WAN usage
    series:
      - entity: sensor.pfsense_interface_wan_inbytes_kilobytes_per_second
        name: Inbound
        group_by:
          func: avg
          duration: 60min
      - entity: sensor.pfsense_interface_wan_inbytes_kilobytes_per_second
        name: Inbound avg 7h
        group_by:
          func: avg
          duration: 7h
      - entity: sensor.pfsense_interface_wan_outbytes_kilobytes_per_second
        name: Outbound
        invert: true
        group_by:
          func: avg
          duration: 60min
      - entity: sensor.pfsense_interface_wan_outbytes_kilobytes_per_second
        name: Outbound avg 7h
        invert: true
        group_by:
          func: avg
          duration: 7h
  - type: custom:apexcharts-card
    apex_config:
      yaxis:
        show: true
        forceNiceScale: true
        decimalsInFloat: 0
      stroke:
        width: 3
        curve: smooth
      legend:
        show: false
    graph_span: 2d
    header:
      show: true
      show_states: true
      colorize_states: true
      title: pfSense WAN packets
    series:
      - entity: sensor.pfsense_interface_wan_inpkts_packets_per_second
        name: Inbound
        group_by:
          func: avg
          duration: 60min
      - entity: sensor.pfsense_interface_wan_inpkts_packets_per_second
        name: Inbound avg 7h
        group_by:
          func: avg
          duration: 7h
      - entity: sensor.pfsense_interface_wan_outpkts_packets_per_second
        name: Outbound
        invert: true
        group_by:
          func: avg
          duration: 60min
      - entity: sensor.pfsense_interface_wan_outpkts_packets_per_second
        name: Outbound avg 7h
        invert: true
        group_by:
          func: avg
          duration: 7h
columns: 2
square: false

Hooray for header_actions!

1 Like

Same as your mini-graph-card example, just replace csutom:mini-graph-card with custom:apexcharts-card

In each serie, you can redefine the unit:

type: custom:apexcharts-card
series:
  - entity: sensor.packets
    unit: pkts/s

This is my code:

type: custom:auto-entities
card:
  type: grid
  columns: 2
  square: false
card_param: cards
filter:
  include:
    - entity_id: '*b*usd*'
      state: '>2'
      options:
        type: custom:apexcharts-card
        series:
          - entity: this.entity_id

This is generated by the auto-entities:

entity: sensor.binancehotusd
type: custom:apexcharts-card
series:
  - entity: sensor.binancehotusd

The line ‘entity: sensor.binancehotusd’ causes this error:

/// apexcharts-card version 1.10.0-dev.6 /// value.entity is extraneous

Code below shows a card as expected:

type: custom:apexcharts-card
series:
  - entity: sensor.binancehotusd

Is it possible to ignore ‘extraneous’ values? If the value is ignored things will work as expected. Or do you have any other advice?

You can disable the configuration check

experimental:
  disable_config_validation: true

Hi all!!

Is it possible to use a sensor value to define the “max” in a graph?
I would like something like below:

type: custom:apexcharts-card
chart_type: radialBar
header:
  show: true
  floating: false
  show_states: true
  colorize_states: true
apex_config:
  title:
    floating: false
    align: center
    style:
      fontSize: 20px
      fontWeight: bold
  chart:
    fontFamily: Julius Sans One
    foreColor: rgb(148,148,148)
    offsetY: 5
  legend:
    show: false
    position: top
series:
  - entity: sensor.teams_stat_activity_in_a_call
    name: In a Call
    max: 9
    color: '#a45a52'
  - entity: sensor.teams_stat_activity_in_a_conference_call
    name: In a Conf Call
    max: 9
    color: '#8b0000'
  - entity: sensor.teams_stat_activity_busy
    name: Busy
    max: 9
  - entity: sensor.teams_stat_activity_idle
    name: Idle
    max: 9
    color: '#fada5e'
  - entity: sensor.teams_stat_activity_available
    name: Available
    max: |
      return 42;
    color: '#008000'
style: |
  ha-card {
    border: 0px solid green;
    #background-color: var(--dwains-theme-primary);
    box-shadow: none;
    font-size: 15px;
    color: rgb(148,148,148);
  }           

This fails with error:

/// apexcharts-card version 1.10.0 /// value.series[4] is not a ChartCardSeriesExternalConfig; value.series[4].max is not a number

Guys, I’m trying to use a map with this code:

        - type: custom:apexcharts-card
          header:
            title: Загрузка CPU
          series:
          - entities: sensor.processor_use_percent

But I get the error:

auto-entities.js:210 card custom:apexcharts-card Error: /// apexcharts-card version 1.10.0 /// value.series[0] is not a ChartCardSeriesExternalConfig; value.series[0].entities is extraneous
    at HTMLElement.setConfig (apexcharts-card.js:829)
    at s (hui-state-label-badge.ts:14)
    at hui-state-label-badge.ts:14
    at d (hui-state-label-badge.ts:14)
    at c (hui-state-label-badge.ts:14)
    at g (hui-state-label-badge.ts:14)
    at HTMLElement.value (hui-stack-card.ts:16)
    at hui-light-card.ts:35
    at Array.map (<anonymous>)
    at HTMLElement.value (hui-light-card.ts:35)

Tell me, what am I doing wrong?

I love that this feature is available now, something I have wanted for a long time:

  • display the chart’s last update time using last_updated (2dd84ff )

Would it be possible to integrate the time stamp in the name as shown below? Would make it look a bit nicer and better integrated in the overall layout.

Hi,

Has anybody managed to get header_actions to work with a radial bar chart?

It’s supposed to be:

series:
  - entity: sensor.xyz

Not entities :wink:

That is not possible but you can create a feature request on github

That should work the same as with other charts, if not open a bug on github

Open a feature request on github, I’ll look into it

2 Likes

Thanks!
I was not attentive.

Haven’t started using the card, just testing it sometimes.
Now I wonder how it processes unavailable data.

Here are two simple sensors:

  1. Equal to some input_number, is available if some input_boolean = on.
  2. Equal to the 1st sensor * 2, is available if that 1st sensor is available.
sensor:
  - platform: template
    sensors:

      test_availability:
        unit_of_measurement: "unit"
        icon_template: mdi:account
        value_template: >-
          {{ states("input_number.test_number") }}
        availability_template: >-
          {{ is_state("input_boolean.test_boolean","on") }} 

      test_availability_2:
        unit_of_measurement: "unit"
        icon_template: mdi:car
        value_template: >-
          {% set VALUE = states("sensor.test_availability") -%}
          {%- if is_number(VALUE) -%}
          {{ VALUE | float * 2 }}
          {%- else -%}
          {{ 0 }}
          {%- endif %}
        availability_template: >-
          {{ not states("sensor.test_availability") in ["unavailable","unknown"] }} 

Now let’s see graphs for these sensors:

  - type: entities
    entities:
      - entity: input_boolean.test_boolean
        name: Available
      - entity: input_number.test_number
        name: Value
      - type: divider
      - entity: sensor.test_availability
      - entity: sensor.test_availability_2

  - type: vertical-stack
    cards:
      - type: custom:mini-graph-card
        entities:
          - entity: sensor.test_availability
            show_points: true
          - entity: sensor.test_availability_2
            show_points: true
        lower_bound: 0
        points_per_hour: 60
        hours_to_show: 1
        average_func: last
        update_interval: 0
        line_width: 1
        smoothing: false
        cache: false

      - type: history-graph
        entities:
          - entity: sensor.test_availability
          - entity: sensor.test_availability_2
        hours_to_show: 1
        refresh_interval: 0

      - type: custom:apexcharts-card
        series:
          - entity: sensor.test_availability
            curve: stepline
            stroke_width: 1
            fill_raw: 'null'
          - entity: sensor.test_availability_2
            curve: stepline
            stroke_width: 1
            fill_raw: 'null'
        graph_span: 1h
        cache: false
        now:
          show: true

There are 3 graphs:

  • based on mini-graph-card;
  • based on stock history-graph;
  • based on apexcharts-card.

Play with the input_number value & the input_boolean value.
Note that:

  1. The mini-graph-card shows no gap for unavailable data (sad but true - and this will not be rectified unfortunately).
  2. The stock history-graph shows gaps when sensors are unavailable (great!!!).
  3. The apexcharts-card shows gaps - but in a strange manner:

it shows a gap when the data are unavailable, then shows a curve otherwise:


then again shows a gap - even for the time when the data were available:

Is it a bug? Or am I missing smth?

Hi @ all,

how i can change the font Size of the "Status Display?

5 Sensors are for this size to much, i want a display without a Linebreak.

best reguards
Faruk

Screenshot 2021-11-02 091446

:wave:

Just discovered this card

LINES NETWORK

Convert kB/s and MB/s with custom legend

yaml
type: custom:apexcharts-card
layout: minimal
graph_span: 1h
apex_config:
  tooltip:
    style:
      fontSize: 14px
    x:
      show: true
      formatter: |
        EVAL:(timestamp) => {
          let date = new Date(timestamp).toLocaleString('sv-SE',{weekday: 'long', hour: '2-digit', minute:'2-digit'}).toString();
          return date.charAt(0).toUpperCase() + date.slice(1);
        }
  chart:
    fontFamily: SF Text
    height: 250px
  legend:
    fontSize: 15px
    fontWeight: 600
    itemMargin:
      horizontal: 25
    formatter: |
      EVAL:(seriesName, opts) => {
        var arr = opts.w.globals.series[opts.seriesIndex],
          value = arr[arr.length - 1],
          convert = (value / 1024).toFixed(2);
        if (value == null) {
          return seriesName;
        } else {
          return value < 1024 ? `${Math.round(value)} kB/s` : `${convert} MB/s`;
        }
      }
    markers:
      width: 26
      height: 23
      customHTML:
        - |-
          EVAL:() => {
            return `<ha-icon icon="mdi:arrow-down-bold" style="--mdc-icon-size: 23px;"></ha-icon>`
          }
        - |-
          EVAL:() => {
            return `<ha-icon icon="mdi:arrow-up-bold" style="--mdc-icon-size: 23px;"></ha-icon>`
          }
      fillColors:
        - none
        - none
  fill:
    type: gradient
    gradient:
      type: vertical
      shadeIntensity: 0.2
      opacityFrom: 0.7
      opacityTo: 0.1
      stops:
        - 0
        - 90
        - 100
  stroke:
    curve: smooth
    width: 3
all_series_config:
  type: area
  fill_raw: last
series:
  - entity: sensor.nas_network_down
    name: Ned
    color: green
  - entity: sensor.nas_network_up
    name: Upp
    color: '#385581'

AREA WEIGHT

Fetch data directly from InfluxDB Using HA or HACS graphs w/ InfluxDB data in HA? - #6 by koying

yaml
type: custom:apexcharts-card
graph_span: 0.3month
apex_config:
  yaxis:
    show: true
    decimalsInFloat: 1
    labels:
      style:
        colors:
          - rgba(255, 255, 255, 0.5)
        fontSize: 13px
        fontWeight: 200
      offsetX: -2
  grid:
    show: true
    borderColor: rgba(112, 135, 164, 0.1)
  title:
    text: kg
    style:
      color: white
      fontSize: 30px
      fontWeight: 100
  tooltip:
    style:
      fontSize: 14px
    x:
      show: true
      formatter: |
        EVAL:(timestamp) => {
          let date = new Date(timestamp).toLocaleString('sv-SE',{day: 'numeric', year: 'numeric', month:'long'}).toString().split(' ');
          return `${date[0]} ${date[1].charAt(0).toUpperCase() + date[1].slice(1)} ${date[2]}`;
        }
  xaxis:
    tooltip:
      enabled: false
    crosshairs:
      show: false
    axisTicks:
      show: false
    axisBorder:
      show: true
      color: rgba(112, 135, 164, 0.5)
      height: 1
    labels:
      style:
        fontSize: 15px
        fontWeight: 500
      offsetX: -1
      formatter: |
        EVAL:(timestamp) => {
          return new Date(timestamp).toLocaleString('sv-SE',{day: 'numeric', month:'short'});
        }
  chart:
    fontFamily: SF Text
    height: 350px
  fill:
    type: gradient
    gradient:
      type: vertical
      shadeIntensity: 0.2
      opacityFrom: 0.7
      opacityTo: 0.1
      stops:
        - 0
        - 90
        - 100
  stroke:
    curve: smooth
    width: 3
all_series_config:
  type: area
  fill_raw: last
series:
  - entity: sensor.date
    curve: smooth
    name: Mattias
    color: '#9a0ca3'
    data_generator: |
      let params = new URLSearchParams({
        db: "home_assistant",
        q: "SELECT value FROM kg WHERE entity_id = 'weight'"
      }),
      request = async () => {
        let a = [],
          r = await fetch("http://192.168.1.241:8086/query?" + params),
          j = await r.json();
        for (let r of j.results[0].series[0].values) a.push([new Date(r[0]), r[1]]);
        return a
      };
      return request()

COLUMN ENERGY

Fetch data from Tibber API

yaml
type: custom:apexcharts-card
graph_span: 5months
apex_config:
  tooltip:
    style:
      fontSize: 14px
    x:
      show: true
      formatter: |
        EVAL:(timestamp) => {
          let date = new Date(timestamp).toLocaleString('sv-SE',{year: 'numeric', month:'long'}).toString()
          return date.charAt(0).toUpperCase() + date.slice(1);
        }
  chart:
    height: 400px
    fontFamily: SF Text
  fill:
    type: gradient
    gradient:
      type: vertical
      shadeIntensity: 0.2
      opacityFrom: 1
      opacityTo: 0.7
      stops:
        - 0
        - 70
        - 100
  grid:
    show: true
    borderColor: rgba(112, 135, 164, 0.1)
  yaxis:
    show: true
    decimalsInFloat: 0
    labels:
      style:
        colors:
          - rgba(255, 255, 255, 0.5)
        fontSize: 13px
        fontWeight: 200
      offsetX: -2
  title:
    text: ⚡ kWh
    style:
      color: white
      fontSize: 38px
      fontWeight: 700
  xaxis:
    tooltip:
      enabled: false
    crosshairs:
      show: false
    axisTicks:
      show: false
    axisBorder:
      show: true
      color: rgba(112, 135, 164, 0.5)
      height: 1
    labels:
      style:
        fontSize: 15px
        fontWeight: 500
      offsetX: -1
      formatter: |
        EVAL:(timestamp) => {
          let date = new Date(timestamp).toLocaleString('en-US',{month:'short'}).toString();
          return date.replace('c','k').replace('y','j');
        }
series:
  - entity: sensor.date
    name: Förbrukning
    unit: kWh
    type: column
    color: rgba(228,224,17,1)
    data_generator: |
      let array = [], request = async () => {
        let request = await fetch("https://api.tibber.com/v1-beta/gql", {method:"POST",headers:{Authorization:"Bearer xxx","Content-Type":"application/json"},body:JSON.stringify({query:"{viewer{homes{consumption(resolution: MONTHLY, last: 12){nodes{from consumption}}}}}"})}),
          json = await request.json();
          console.log(request);
        for (let request of json.data.viewer.homes[0].consumption.nodes) array.push([new Date(request.from), request.consumption]);
        return array
      }; return request()

RADIAL SENSOR

UniFi OS style sensor

yaml
type: grid
cards:
  - type: custom:apexcharts-card
    chart_type: radialBar
    apex_config:
      legend:
        onItemHover:
          highlightDataSeries: false
        show: false
      chart:
        height: 280px
        fontFamily: SF Display
      plotOptions:
        radialBar:
          startAngle: -180
          endAngle: 180
          dataLabels:
            name:
              show: true
              offsetY: 55
            value:
              show: true
              offsetY: 5
              fontSize: 50px
              fontWeight: 600
              color: '#379c55'
            total:
              show: true
              fontSize: 21px
              fontWeight: 300
              label: CPU Load
              color: '#a8a8a8'
              formatter: |
                EVAL:(w) => {
                  return w.globals.seriesTotals + '٪';
                }
          hollow:
            size: 75%
            image: >-
              data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'
              viewBox='0 0 283.5 283.5'%3E%3Cpath d='M117.3
              109.2h48.8v4.1h12.2v8.1h-12.2v8.1h12.2v8.1h-12.2v8.1h12.2v8.1h-12.2v8.1h12.2v8.1h-12.2v4.1h-48.8V170h-12.2v-8.1h12.2V154h-12.2v-8.1h12.2v-8.1h-12.2v-8.1h12.2v-8.1h-12.2v-8.1h12.2v-4.3m20.4
              44.8v12.2h4.1V154h-4.1m8.1 0v12.2h4.1V154h-4.1m8.2
              0v12.2h4.1V154H154z' fill='%23a8a7a7'/%3E%3C/svg%3E
            imageWidth: 118
            imageHeight: 118
            imageOffsetY: -50
            imageClipped: false
          track:
            show: true
            background: '#222222'
            strokeWidth: 155%
      stroke:
        dashArray: 3.2
        lineCap: butt
    series:
      - entity: sensor.template_udm_cpu
        color: '#379c55'
  - type: custom:apexcharts-card
    chart_type: radialBar
    apex_config:
      legend:
        onItemHover:
          highlightDataSeries: false
        show: false
      chart:
        height: 280px
        fontFamily: SF Display
      plotOptions:
        radialBar:
          startAngle: -180
          endAngle: 180
          dataLabels:
            name:
              show: true
              offsetY: 55
            value:
              show: true
              offsetY: 5
              fontSize: 50px
              fontWeight: 600
              color: '#379c55'
            total:
              show: true
              fontSize: 21px
              fontWeight: 300
              label: CPU Temp
              color: '#a8a8a8'
              formatter: |
                EVAL:(w) => {
                  return w.globals.seriesTotals + '°';
                }
          hollow:
            size: 75%
            image: >-
              data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'
              viewBox='0 0 283.5 283.5'%3E%3Cpath d='M152.1 145.4v-26.9a10.07
              10.07 0 1 0-20.2 0v26.9c-7.4 5.6-8.9 16.1-3.4 23.5 5.6 7.4 16.1
              8.9 23.5 3.4s8.9-16.1 3.4-23.5c-.9-1.4-2.1-2.5-3.3-3.4M142
              115.1a3.37 3.37 0 0 1 3.4 3.4v10.1h-6.7v-10.1c-.1-1.9 1.4-3.4
              3.3-3.4z' fill='%23a8a7a7'/%3E%3C/svg%3E
            imageWidth: 150
            imageHeight: 150
            imageOffsetY: -50
            imageClipped: false
          track:
            show: true
            background: '#222222'
            strokeWidth: 155%
      stroke:
        dashArray: 3.2
        lineCap: butt
    series:
      - entity: sensor.template_udm_cpu_temp
        color: '#379c55'
columns: 2
square: true

DONUT COUNTER

Count total entities {{ states.automation | count }} etc.

yaml
type: custom:apexcharts-card
chart_type: donut
apex_config:
  fill:
    type: gradient
    gradient:
      shade: dark
      shadeIntensity: 0.1
      opacityFrom: 0.9
      opacityTo: 0.85
      stops:
        - 0
        - 90
        - 100
  chart:
    fontFamily: SF Text
  legend:
    position: right
    fontSize: 13px
    fontWeight: 300
    markers:
      width: 16
      height: 25
      customHTML:
        - |-
          EVAL:() => {
            return `<ha-icon icon="hass:robot" style="--mdc-icon-size: 14px;"></ha-icon>`
          }
        - |-
          EVAL:() => {
            return `<ha-icon icon="hass:radiobox-blank" style="--mdc-icon-size: 14px;"></ha-icon>`
          }
        - |-
          EVAL:() => {
            return `<ha-icon icon="hass:account" style="--mdc-icon-size: 14px;"></ha-icon>`
          }
        - |-
          EVAL:() => {
            return `<ha-icon icon="hass:lightbulb" style="--mdc-icon-size: 14px;"></ha-icon>`
          }
        - |-
          EVAL:() => {
            return `<ha-icon icon="hass:cast" style="--mdc-icon-size: 14px;"></ha-icon>`
          }
        - |-
          EVAL:() => {
            return `<ha-icon icon="hass:eye" style="--mdc-icon-size: 14px;"></ha-icon>`
          }
        - |-
          EVAL:() => {
            return `<ha-icon icon="hass:flash" style="--mdc-icon-size: 14px;"></ha-icon>`
          }
        - |-
          EVAL:() => {
            return `<ha-icon icon="hass:home-assistant" style="--mdc-icon-size: 14px;"></ha-icon>`
          }
      fillColors:
        - none
        - none
        - none
        - none
        - none
        - none
        - none
        - none
  stroke:
    show: true
    width: 0.4
  dataLabels:
    enabled: false
    style:
      fontSize: 14px
      fontWeight: 700
    dropShadow:
      enabled: true
      top: 0
      left: 0
      blur: 3
      color: black
      opacity: 0.1
  plotOptions:
    pie:
      startAngle: 0
      endAngle: 360
      expandOnClick: true
      offsetX: 0
      offsetY: 0
      customScale: 1
      dataLabels:
        offset: 0
        minAngleToShowLabel: 10
      donut:
        size: 65%
        background: transparent
        labels:
          show: true
          value:
            fontSize: 42px
            fontWeight: 700
            offsetY: 16
          total:
            show: true
            label: Entities
            fontSize: 15px
            fontWeight: 800
            color: '#ffffff50'
series:
  - entity: sensor.template_domain_counter
    attribute: automation
    name: Automations
  - entity: sensor.template_domain_counter
    attribute: binary_sensor
    name: Binary sensors
  - entity: sensor.template_domain_counter
    attribute: device_tracker
    name: Device trackers
  - entity: sensor.template_domain_counter
    attribute: light
    name: Lights
  - entity: sensor.template_domain_counter
    attribute: media_player
    name: Media players
  - entity: sensor.template_domain_counter
    attribute: sensor
    name: Sensors
  - entity: sensor.template_domain_counter
    attribute: switch
    name: Switches
  - entity: sensor.template_domain_counter
    attribute: other
    name: Other

Excuse the yaml, not used to using ui editor

EDIT: fixed “lines network” graph reversal

32 Likes