summaryrefslogtreecommitdiffstats
path: root/makefu/2configs
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2020-07-02 08:36:51 +0200
committermakefu <github@syntax-fehler.de>2020-07-02 08:36:51 +0200
commit312452431b956e6e4181817cb646a3e45f57a260 (patch)
tree0a821585b01fc18a03a73037b1d64e97c9226a32 /makefu/2configs
parent3da710a990c38770c33f95c7b5475170e67191f9 (diff)
ma telegraf: count squashed flies
Diffstat (limited to 'makefu/2configs')
-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") ]
+ ;
}