I have setup home-assistant to talk to by Ecobee3, and to report data into influxdb. I use Grafana to visualize my temperature data. And this all works fine.
However, I would like to overlay on my temperature graphs the furnace state. HA reports to influxdb a filed called ‘state’ which is one of ‘off’, ‘heat’ or ‘fan’. I’d like to be able to visualize this data on my Grafana graphs.
The problem is that ‘state’ has text values, and thus cannot be plotted directly in Grafana. I do not see any way in influxdb or Grafana to map the text results into numerical values that I could graph.
Grafana also supports Annotations which would be sufficient for me, however, HA reports ‘state’ for every sample, and annotations are expected to only show state-change, so I end up with to many annotations, and they are unusable. I do not see any way to filter the query to only show changes in Grafana or influxdb.
Has anyone run into this, and already has a solution?
If not, I am not sure where to address the problem…
Should the ecobee3 plugin, or influxdb plugins be enhanced to ensure that data stored in inflluxdb is in a format that can be used by grafana?
Should influxdb have improved queries to allow mapping text to numerical value in the ‘select’ query?
Should Grafana have a mechanism to do the text->numeric mapping, or to do an edge-detect during annotations?
Should I be using different tools that have more flexibility (if so which ones)?