Areas in Prometheus

I would like to have the Area information of a sensor exported to prometheus. Is this possible somehow? I’m migrating from Homey to HA and with Homey it was possible to use the Room/Area/Group information in prometheus.

I would like to group for example all my climate sensors by their location

# current situation
ha_temperature_c{domain="sensor",entity="sensor.foo_temperature",friendly_name="Klima_temperature",instance="192.168.0.4:8123",job="ha"}
# wish
ha_temperature_c{domain="sensor",area="basement/bath",entity="sensor.foo_temperature",friendly_name="Klima_temperature",instance="192.168.0.4:8123",job="ha"}

Is this possible somehow?

1 Like

Hey - did you found a solution? I would like to use area as property as well (could be useful for grafana-templating). For example to create a dashboard where all sensors are shown for a specific room/area.

Hi, unfortunately I didn’t found a solution. I ended up putting the area name also in the entity name.

Okay - seems to be a dirty hack but a simple one :slight_smile:
Thx!

I opened a feature request on that - feel free to vote if you want!

Cheers