diff --git a/src/Elektrifikatsiya/host/mqtt/mqtt2prom/config.yaml b/src/Elektrifikatsiya/host/mqtt/mqtt2prom/config.yaml index 3c2b49c..225e946 100644 --- a/src/Elektrifikatsiya/host/mqtt/mqtt2prom/config.yaml +++ b/src/Elektrifikatsiya/host/mqtt/mqtt2prom/config.yaml @@ -43,7 +43,7 @@ metrics: # The name of the metric in a MQTT JSON message mqtt_name: temperature # The prometheus help text for this metric - help: DHT22 temperature reading + help: The temperature of the Shelly sensor # The prometheus type for this metric. Valid values are: "gauge" and "counter" type: gauge # A map of string to string for constant labels. This labels will be attached to every prometheus metric @@ -54,9 +54,20 @@ metrics: mqtt_name: power # The scale of the metric in a MQTT JSON message (prom_value = mqtt_value * scale) # The prometheus help text for this metric - help: DHT22 humidity reading + help: The current power draw of the attached device # The prometheus type for this metric. Valid values are: "gauge" and "counter" type: gauge const_labels: sensor_type: shelly #A map of string to string for constant labels. This labels will be attached to every prometheus metric + - prom_name: state + mqtt_name: 0 + help: The current state the relay is in + type: gauge + const_labels: + sensor_type: shelly + string_value_mapping: + map: + off: 0 + on: 1 + error_value: 0 \ No newline at end of file