summaryrefslogtreecommitdiffstats
path: root/krebs/2configs/shack/glados/multi/rollos.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2020-09-16 22:21:53 +0200
committermakefu <github@syntax-fehler.de>2020-09-16 22:21:53 +0200
commit8ed22f337c76df2ad592650ece7abe1a414c4182 (patch)
tree78b8f8e0175120dd09f53b4a81836ac11a08c583 /krebs/2configs/shack/glados/multi/rollos.nix
parentc64fb07027b49a3825b6f0814ebeb17782b8266a (diff)
shack/glados: implement rollo triggers
Diffstat (limited to 'krebs/2configs/shack/glados/multi/rollos.nix')
-rw-r--r--krebs/2configs/shack/glados/multi/rollos.nix53
1 files changed, 48 insertions, 5 deletions
diff --git a/krebs/2configs/shack/glados/multi/rollos.nix b/krebs/2configs/shack/glados/multi/rollos.nix
index 1febad525..4e6494936 100644
--- a/krebs/2configs/shack/glados/multi/rollos.nix
+++ b/krebs/2configs/shack/glados/multi/rollos.nix
@@ -1,13 +1,56 @@
+#
+
let
glados = import ../lib;
+ tempsensor = "sensor.dark_sky_temperature";
+ all_covers = [
+ "cover.crafting_rollo"
+ "cover.elab_rollo"
+ "cover.or2_rollo"
+ "cover.retroraum_rollo"
+ ];
in
{
- # LED
- light = [
- ];
- sensor = [
- ];
automation =
[
+ { alias = "Rollos fahren Runter";
+ trigger = [
+ {
+ platform = "numeric_state";
+ entity_id = tempsensor;
+ above = 25;
+ for = "00:30:00";
+ }
+ ];
+ condition =
+ [
+ {
+ condition = "state";
+ entity_id = "sun.sun";
+ state = "above_horizon";
+ }
+ ];
+ action =
+ [
+ { service = "cover.close_cover";
+ entity_id = all_covers;
+ }
+ ];
+ }
+ { alias = "Rollos fahren Hoch";
+ trigger = [
+ {
+ platform = "sun";
+ event = "sunset";
+ }
+ ];
+ condition = [ ];
+ action =
+ [
+ { service = "cover.open_cover";
+ entity_id = all_covers;
+ }
+ ];
+ }
];
}