summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/ham/multi/esphome.nix
diff options
context:
space:
mode:
Diffstat (limited to 'makefu/2configs/ham/multi/esphome.nix')
-rw-r--r--makefu/2configs/ham/multi/esphome.nix45
1 files changed, 45 insertions, 0 deletions
diff --git a/makefu/2configs/ham/multi/esphome.nix b/makefu/2configs/ham/multi/esphome.nix
new file mode 100644
index 000000000..8ca12d899
--- /dev/null
+++ b/makefu/2configs/ham/multi/esphome.nix
@@ -0,0 +1,45 @@
+# provides:
+# switch
+# automation
+# binary_sensor
+# sensor
+# input_select
+# timer
+let
+ inherit (import ../lib) esphome;
+ sonoff_s20 = host: {
+ sensor = [
+ (esphome.ip { inherit host;})
+ (esphome.wifi { inherit host;})
+ (esphome.temp { inherit host;})
+ (esphome.hum { inherit host;})
+ ];
+ binary_sensor = [
+ (esphome.btn { inherit host;})
+ ];
+ light = [
+ (esphome.monoled { inherit host;})
+ ];
+ switch = [
+ (esphome.relay { inherit host;})
+ (esphome.restart { inherit host;})
+ ];
+ };
+ dusche = sonoff_s20 "dusche_plug";
+ schlafzimmer = sonoff_s20 "schlafzimmer_plug";
+in {
+ sensor = [
+ (esphome.pressure {host = "dusche_plug";})
+ ]
+ ++ dusche.sensor
+ ++ schlafzimmer.sensor;
+ binary_sensor =
+ dusche.binary_sensor
+ ++ schlafzimmer.binary_sensor;
+ light =
+ dusche.light
+ ++ schlafzimmer.light;
+ switch =
+ dusche.switch
+ ++ schlafzimmer.switch;
+}