From 312452431b956e6e4181817cb646a3e45f57a260 Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 2 Jul 2020 08:36:51 +0200 Subject: ma telegraf: count squashed flies --- makefu/2configs/stats/telegraf/hamstats.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'makefu') 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") ] + ; } -- cgit v1.2.3