From 2676e426ec1da0dfd7a156cd6fa85c40d957ef3d Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 25 Sep 2019 14:05:38 +0200 Subject: ma bureautomation/aramark: init --- 2configs/bureautomation/multi/aramark.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 2configs/bureautomation/multi/aramark.nix (limited to '2configs/bureautomation/multi') diff --git a/2configs/bureautomation/multi/aramark.nix b/2configs/bureautomation/multi/aramark.nix new file mode 100644 index 000000000..ebe2cde81 --- /dev/null +++ b/2configs/bureautomation/multi/aramark.nix @@ -0,0 +1,24 @@ +{ lib, ... }: +let + aramark = topic: name: + { platform = "mqtt"; + inherit name; + state_topic = "/aramark/thales-deutschland/${topic}"; + }; + aramark_menue = menue: + [ + (aramark "${menue}/title" menue) + (aramark "${menue}/description" "${menue} Text") + ((aramark "${menue}/price" "${menue} Preis") // { unit_of_measurement = "€"; }) + ]; +in +{ + sensor = (aramark_menue "Menü 1") + ++ (aramark_menue "Menü 2") + ++ (aramark_menue "Mercato") + ++ (aramark_menue "Aktion"); + binary_sensor = + [ + ((aramark "pommes" "Pommes" ) // { payload_on = "True"; payload_off = "False"; }) + ]; +} -- cgit v1.2.3