ma telegraf: count squashed flies

This commit is contained in:
makefu 2020-07-02 08:36:51 +02:00
parent 3da710a990
commit 312452431b
No known key found for this signature in database
GPG Key ID: 36F7711F3FC0F225

View File

@ -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") ]
;
}