Home Assistant Integration for Grafana Cloud
Home Assistant is an open source home automation tool that puts local control and privacy first. It is created and powered by a worldwide community of tinkerers and DIY enthusiasts and perfect for running on a Raspberry Pi or a local server.
Use the walkthrough in Grafana Cloud to install the Home Assistant Integration
Pre-installation configuration for the Home Assistant Integration
In order for the integration to work, you must configure the in-built Prometheus exporter for Home Assistant.
At minimum you’ll need to add the
prometheus: directive to your
# Example configuration.yaml entry prometheus:
You may optionally add a
namespace which will prefix each of the metrics emitted by the in-built Prometheus exporter.
Post-install configuration for the Home Assistant Integration
In the agent configuration file, the agent must be pointed to server, such as
hass:8123 in the example below.
You will also need to create a long-lived access token which will be used to authenticate the agent with Home Assistant.
prometheus: wal_directory: /tmp/wal configs: - name: integrations scrape_configs: - job_name: integrations/hass metrics_path: /api/prometheus bearer_token: "<your long lived HASS API token>" scheme: https static_configs: - targets: ['hass:8123'] remote_write: - url: http://cortex:9009/api/prom/push
If you chose to set a custom namespace when enabling the in-build Prometheus exporter for Home Assistant, you must specify that in the
prefix variable of the dashboard in order for it to properly query your metrics.
The in-built Prometheus exporter for Home Assistant has relatively narrow coverage of the possible sensors and values which could be monitored by Home Assistant.
These will be emitted as metrics prefixed with
sensor_unit_ followed by the unit of the sensor.
The Home Assistant integration will show you the number of these metrics as “Unsupported Sensors”.
A full list of unsupported sensors can be found in a table at the bottom of this dashboard.
You can use
component_config_glob, combined with
override_metric in your Home Assistant configuration file to rewrite unsupported sensors to supported values.
An example of a full configuration with these overrides can be found in the documents for the in-built Prometheus exporter.
Please do not be afraid to change this dashboard to editable, and make changes to the size of the panels which are included.
Your particular Home Assistant may have many more sensors, or lights, and making the panels larger will dramatically improve the usability and visual impact of the dashboard.
Related Grafana Cloud resources
How to set up and visualize synthetic monitoring at scale with Grafana Cloud
Learn how to use Kubernetes, Grafana Loki, and Grafana Cloud’s synthetic monitoring feature to set up your infrastructure's checks in this GrafanaCONline session.
Using Grafana Cloud to drive manufacturing plant efficiency
This GrafanaCONline session tells how Grafana helps a 75-year-old manufacturing company with product quality and equipment maintenance.