Hey, for anyone else struggling with this, I found an even easier method: just use a data transform on the query.
My entity is named the_kite_alert_station_wind_speed
and the_kite_alert_station_wind_direction
respectively.
This can all be done from the Grafana GUI.
Here’s my setup:
Query A:
SELECT last("value") FROM "kn" WHERE ("entity_id"::tag = 'the_kite_alert_station_wind_speed') AND $timeFilter GROUP BY time($interval)
Alias: wind_speed
(< This is important! Make sure it has the alias)
Query B:
SELECT last("value") FROM "°" WHERE ("entity_id"::tag = 'the_kite_alert_station_wind_direction') AND $timeFilter GROUP BY time($interval)
Alias: wind_direction
Next, go to the Transform tab, create a transform, and use Join by field
:
- MODE is
Outer (Time Series)
- field is
time
And that’s it!
Here’s mine, working:
Hope that helps.