From f351bc49de523dfdde0713cc9a9c1db13d7ed9e8 Mon Sep 17 00:00:00 2001 From: aexel90 Date: Mon, 28 Dec 2020 12:55:45 +0100 Subject: [PATCH] light status metric --- hue/hue.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hue/hue.go b/hue/hue.go index 08fbd74..6c07b57 100644 --- a/hue/hue.go +++ b/hue/hue.go @@ -51,6 +51,14 @@ func (exporter *Exporter) InitMetrics() (metrics []*metric.Metric) { Labels: []string{LabelName, LabelIndex, LabelType, LabelModelID, LabelManufacturerName, LabelSWVersion, LabelUniqueID, LabelStateOn, LabelStateAlert, LabelStateBri, LabelStateCT, LabelStateReachable, LabelStateSaturation}, }) + metrics = append(metrics, &metric.Metric{ + HueType: TypeLight, + FqName: "hue_light_state", + Help: "light status (1=ON, 0=OFF)", + Labels: []string{LabelName, LabelIndex, LabelType, LabelModelID, LabelManufacturerName, LabelSWVersion, LabelUniqueID, LabelStateOn}, + ResultKey: LabelStateOn, + }) + metrics = append(metrics, &metric.Metric{ HueType: TypeSensor, FqName: "hue_sensor_info",