summaryrefslogtreecommitdiffstats
path: root/krebs/2configs/shack
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2020-01-09 22:42:39 +0100
committermakefu <github@syntax-fehler.de>2020-01-09 22:42:39 +0100
commitdddc3e4f6ffd4aff8aed1c18c0fa7053cb3a1185 (patch)
tree659d590b48405427a33f36b14609817b169bea3d /krebs/2configs/shack
parentbf80be669fd57a9be70bc6fbecf9cb5dbd793519 (diff)
shack/glados/schlechte_luft: add fallbacks, fix sensor naming
Diffstat (limited to 'krebs/2configs/shack')
-rw-r--r--krebs/2configs/shack/glados/multi/schlechte_luft.nix45
1 files changed, 42 insertions, 3 deletions
diff --git a/krebs/2configs/shack/glados/multi/schlechte_luft.nix b/krebs/2configs/shack/glados/multi/schlechte_luft.nix
index a72d32d9..9cd2c56f 100644
--- a/krebs/2configs/shack/glados/multi/schlechte_luft.nix
+++ b/krebs/2configs/shack/glados/multi/schlechte_luft.nix
@@ -12,6 +12,7 @@ in
(glados.esphome.led { name = "Fablab LED Part D"; host = "fablab_led"; topic = "D";})
];
sensor = [
+ (glados.esphome.temp { host = "fablab_feinstaub";})
(glados.esphome.dust_25m { host = "fablab_feinstaub";})
(glados.esphome.dust_100m { host = "fablab_feinstaub";})
];
@@ -22,7 +23,7 @@ in
{
platform = "numeric_state";
below = 25;
- entity_id = "sensor.fablab_feinstaub_25m";
+ entity_id = "sensor.fablab_feinstaub_2_5um";
}
];
action =
@@ -47,7 +48,7 @@ in
platform = "numeric_state";
above = 25;
below = 50;
- entity_id = "sensor.fablab_feinstaub_25m";
+ entity_id = "sensor.fablab_feinstaub_2_5um";
}
];
action =
@@ -66,7 +67,7 @@ in
{
platform = "numeric_state";
above = 50;
- entity_id = "sensor.fablab_feinstaub_25m";
+ entity_id = "sensor.fablab_feinstaub_2_5um";
}
];
action =
@@ -80,5 +81,43 @@ in
}
];
}
+ { alias = "Luft Sensor nicht verfügbar";
+ trigger = [
+ {
+ platform = "state";
+ to = "unavailable";
+ entity_id = "sensor.fablab_feinstaub_2_5um";
+ }
+ ];
+ action =
+ [
+ { service = "light.turn_on";
+ data = {
+ entity_id = "light.fablab_led";
+ effect = "Rainbow";
+ color_name = "blue";
+ };
+ }
+ ];
+ }
+ { alias = "Fablab Licht Reboot";
+ trigger = [
+ {
+ platform = "state";
+ from = "unavailable";
+ entity_id = "light.fablab_led";
+ }
+ ];
+ action =
+ [
+ { service = "light.turn_on";
+ data = {
+ entity_id = "light.fablab_led";
+ effect = "Rainbow";
+ color_name = "orange";
+ };
+ }
+ ];
+ }
];
}