Dashboard Script Editor


I’m looking for a way to create a dashboard with a filter by “entity_id” which contains a specific name like all the entity_id with “air_temperature” in it.

How can i do that ?

Thanks !

Hello @jeremypsl,
Are you looking to do that with grafana?
If it’s grafana:
It sounds like you want to use chained variables. Here are some useful starting points and example dashboards in our public sandbox :+1:

If it’s InfluxDB (v2 I’m guessing?)

Thanks for the answer.
I want to do it in InfluxDB.
I already searched in documentation but i’m not very familiar with your variables and i’ll appreciate so much to get an exemple of what i’m looking for please.

No one can show me an exemple ? :disappointed_relieved:

I just need to understand how i can filter an entity_id which contain something, not by all his name. :pray:

Hi @jeremypsl

Does this work? I admittedly do not use variables in InfluxDB (but in Grafana instead), so this is just a guess:

|> filter(fn: (r) => r._entity_id =~ /*air_temperature/)

or maybe

|> filter(fn: (r) => r.entity_id =~ /air_temperature/)

Worked ! Thank you !!!

1 Like