Hi!
Running HomeAssistant, InfluxDB and Grafana on a Pi4. I just started building some dashboards this weekend and I absolutely love it.
One tiny thing I can’t get my head around is the following:
SELECT ( (last("prijslaag") + last("prijshoog") + last("gasprijs") ))
AS "Prijs"
FROM (
SELECT (last("value") - first("value")) * 0.2255 AS "prijslaag" FROM "kWh" WHERE ("entity_id" = 'energy_consumption_tarif_1') AND $timeFilter GROUP BY time(1d)
),
(
SELECT (last("value") - first("value")) * 0.2453 AS "prijshoog" FROM "kWh" WHERE ("entity_id" = 'energy_consumption_tarif_2') AND $timeFilter GROUP BY time(1d)
),
(
SELECT last("value") - first("value") * 0.8106 AS "gasprijs" FROM "m3" WHERE ("entity_id" = 'gas_consumption') AND $timeFilter GROUP BY time(1d)
)
GROUP BY time(1d)
What I want is to add 3 things: Power(low-hours) + Power(normal) + Gas. I simply calculate the values with the prices for a kWh and cm3.
The query works fine for adding the power prices low and normal! But when I add the gas part (individual query works fine) I don’t see any values displayed. What am I missing?