summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--makefu/2configs/stats/telegraf/hamstats.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/makefu/2configs/stats/telegraf/hamstats.nix b/makefu/2configs/stats/telegraf/hamstats.nix
index 0b1723062..99cb0cd04 100644
--- a/makefu/2configs/stats/telegraf/hamstats.nix
+++ b/makefu/2configs/stats/telegraf/hamstats.nix
@@ -30,6 +30,13 @@ let
data_format = "value";
# json_query = tags.sensor; #TODO?
};
+ flycounter = name:
+ (genTopic_plain name ''/ham/flycounter/${name}''
+ { inherit name;
+ "sensor" = name;
+ "type" = "gauge";
+ "scope" = "ham";
+ } );
esensor = room: name: sensor:
(genTopic_plain sensor ''/ham/${room}/${name}/sensor/${sensor}/state''
{ inherit room sensor name;
@@ -56,5 +63,7 @@ in {
++ (esphome_temphum "arbeitszimmer" "box")
++ (esphome_temphum "schlafzimmer" "plug")
++ (esphome_temphum "wohnzimmer" "plug")
- ++ (esphome_temphum "terrasse" "plug");
+ ++ (esphome_temphum "terrasse" "plug")
+ ++ [ (flycounter "misa_fliegen") (flycounter "felix_fliegen") ]
+ ;
}