Skip to content

www.rolfje.com

Finding HomeAssistant Entities in Prometheus

Posted on 2025-11-09 By rolfje No Comments on Finding HomeAssistant Entities in Prometheus

Juggling entities in HomeAssistantWhen you install the prometheus addon in HomeAssistant, it can be strange to see that the metrics do not show up in your Grafana dashboard. That is because the entity names are part of the labels, not of the metric name.

In HomeAssistant, you have created an api key for accessing HomeAssistant in the Profile -> Security page. That API key is no longer readable, but if all is well you have it as part of your Prometheus/Victoriametrics scrape config:

  - job_name: homeassistant
    scrape_interval: 60s
    metrics_path: /api/prometheus
    authorization:
      credentials: "<your home assistant api key>"
    static_configs:
    - targets:
      - <your homeassistant ip>:8123

With that info, you can also fetch the raw metrics yourself. For instance, to find everything with the word “buiten” in it:

curl -H "Authorization: Bearer <your home assistant api key>" \
    <your homeassistant ip>:8123/api/prometheus | grep buiten

You will find that some of your sensor data lives in funny places, like :

homeassistant_state_change_total{domain="sensor",entity="sensor.buiten_batterij",friendly_name="Buiten Batterij"} 1.0
homeassistant_state_change_total{domain="sensor",entity="sensor.buiten_temperatuur",friendly_name="Buiten Temperatuur"} 379.0
homeassistant_state_change_total{domain="sensor",entity="sensor.buiten_luchtvochtigheid",friendly_name="Buiten Luchtvochtigheid"} 299.0
homeassistant_state_change_created{domain="sensor",entity="sensor.buiten_batterij",friendly_name="Buiten Batterij"} 1.762457097086816e+09
homeassistant_state_change_created{domain="sensor",entity="sensor.buiten_temperatuur",friendly_name="Buiten Temperatuur"} 1.762457097096043e+09
homeassistant_state_change_created{domain="sensor",entity="sensor.buiten_luchtvochtigheid",friendly_name="Buiten Luchtvochtigheid"} 1.7624570971024454e+09
homeassistant_entity_available{domain="sensor",entity="sensor.buiten_batterij",friendly_name="Buiten Batterij"} 1.0
homeassistant_entity_available{domain="sensor",entity="sensor.buiten_temperatuur",friendly_name="Buiten Temperatuur"} 1.0
homeassistant_entity_available{domain="sensor",entity="sensor.buiten_luchtvochtigheid",friendly_name="Buiten Luchtvochtigheid"} 1.0
homeassistant_last_updated_time_seconds{domain="sensor",entity="sensor.buiten_batterij",friendly_name="Buiten Batterij"} 1.762457097083181e+09
homeassistant_last_updated_time_seconds{domain="sensor",entity="sensor.buiten_temperatuur",friendly_name="Buiten Temperatuur"} 1.762716687465655e+09
homeassistant_last_updated_time_seconds{domain="sensor",entity="sensor.buiten_luchtvochtigheid",friendly_name="Buiten Luchtvochtigheid"} 1.76271742018229e+09
homeassistant_sensor_battery_percent{domain="sensor",entity="sensor.buiten_batterij",friendly_name="Buiten Batterij"} 100.0
homeassistant_sensor_temperature_celsius{domain="sensor",entity="sensor.buiten_temperatuur",friendly_name="Buiten Temperatuur"} 9.6
homeassistant_sensor_humidity_percent{domain="sensor",entity="sensor.buiten_luchtvochtigheid",friendly_name="Buiten Luchtvochtigheid"} 85.2

I hope this explains why you don’t see the metrics you expected, or at least helps you to find the metrics you are looking for.

Have fun!

Uncategorized Tags:homeassistant, opentelemetry, prometheus

Post navigation

Previous Post: Querying Classicpress database for page hits

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

         

Recent Comments

  • rolfje on Exit WordPress
  • rolfje on Methode Buijs uitgelegd
  • LinkedIn is at Peak Enshittifaction – Will Chatham's Blog on Linked-In not really Opt-in?
  • Hans j on 1N4148 diode as RF switch
  • Roaming Rhonda on DLNA on OSX, done right

Tags

Apple backup design DIY DRM eclipse environment Fun Garmin GForge gmail google hacking hamradio Hardware helicopter iphone ipod iTunes Java Kawasaki Keynote modelling motorcycle music news opinion oracle osx photo photography programming repair review security Software T-Mobile technology Time Machine Ubuntu usability Utilities vacation windows Workshop

Categories

  • Apple (105)
  • Divorce (1)
  • Electronics (3)
  • Fun (57)
  • Games (7)
  • Hardware (72)
  • Microsoft (18)
  • Racing (14)
  • Software (135)
  • Uncategorized (68)
  • Workshop (20)

Archives

Brought to you without adds, banners, cookies or tracking. This one is on me. Yes, life can be this good. Pay it forward.

Copyright © 2025 www.rolfje.com.

Powered by PressBook WordPress theme