HA 0.116 / Supervisor 247 - Core and Supervisor & Addon Stats

Ok so you can use an https local api endpoint if you set verify_ssl to false an use this endpoint shown below.

Core and Supervisor (set the template divisor to the number of threads your CPU supports):

- platform: rest
  resource: https://homeassistant:8123/api/hassio/core/stats
  name: Core CPU
  unit_of_measurement: '%'
  value_template: '{{ (value_json.data.cpu_percent|float/4)|round(2) }}'
  scan_interval: 60
  verify_ssl: false
  headers:
    Authorization: !secret ha_api_token
    Content-Type: application/json
  json_attributes_path: "$.data"
  json_attributes:
    - memory_percent

- platform: rest
  resource: https://homeassistant:8123/api/hassio/supervisor/stats
  name: Supervisor CPU
  unit_of_measurement: '%'
  value_template: '{{ (value_json.data.cpu_percent|float/4)|round(2) }}'
  scan_interval: 60
  verify_ssl: false
  headers:
    Authorization: !secret ha_api_token
    Content-Type: application/json
  json_attributes_path: "$.data"
  json_attributes:
    - memory_percent

- platform: template
  sensors:
    core_memory:
      friendly_name: "Core RAM"
      value_template: "{{ state_attr('sensor.core_cpu', 'memory_percent') }}"
      unit_of_measurement: '%'
    supervisor_memory:
      friendly_name: "Supervisor RAM"
      value_template: "{{ state_attr('sensor.supervisor_cpu', 'memory_percent') }}"
      unit_of_measurement: '%'

Addon

- platform: rest
  resource:  https://homeassistant:8123/api/hassio/addons/core_duckdns/stats
  name: DuckDNS CPU
  unit_of_measurement: '%'
  value_template: '{{ (value_json.data.cpu_percent|float/4)|round(2) }}'
  scan_interval: 60
  verify_ssl: false
  headers:
    Authorization: !secret ha_api_token
    Content-Type: application/json
  json_attributes_path: "$.data"
  json_attributes:
    - memory_percent

- platform: template
  sensors:
    duckdns_memory:
      friendly_name: "DuckDNS RAM"
      value_template: "{{ state_attr('sensor.duckdns_cpu', 'memory_percent') }}"
      unit_of_measurement: '%'

Secret (Long Lived Access Token, set in your profile):

ha_api_token: "Bearer eyJ0eXA..."