Hello.
Hello.
I am trying to get data from influxdb with multiple queries.
My code:
http://localhost:8086/query?db=jpedrina&q=SELECT last(value) FROM “jpedrina”.“autogen”.“kWh” WHERE time > now() -1d AND entity_id=‘monthly_energy_13_cheias’ ;SELECT last(“value”) FROM “jpedrina”.“autogen”.“kWh” WHERE time > now() -1d AND “entity_id”=‘monthly_energy_13_vazio’ ;
The answer:
{
"results": [
{
"statement_id": 0,
"series": [
{
"name": "kWh",
"columns": [
"time",
"last"
],
"values": [
[
"2022-03-03T13:54:37.22063Z",
0.07
]
]
}
]
}
]
}
I tried a lot of ways to have both queries on the same response but they didn´t show.
I guess i have to see something like statement id:0 and statement id :1 because i am calling for two queries but it doesn´t work.
I am working in influx db homeassistant ad on.
Please could you help me.
Thanks in advanced.
Joao Gonçalves