From 726238d8717a03f6c80da31d4923632fed27e15a Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 1 Sep 2020 23:25:17 +0200 Subject: glados/wasser: giesszeit 10 -> 20 --- krebs/2configs/shack/glados/multi/wasser.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'krebs/2configs/shack/glados/multi') diff --git a/krebs/2configs/shack/glados/multi/wasser.nix b/krebs/2configs/shack/glados/multi/wasser.nix index 6f3dc98ad..e3ba28384 100644 --- a/krebs/2configs/shack/glados/multi/wasser.nix +++ b/krebs/2configs/shack/glados/multi/wasser.nix @@ -2,7 +2,7 @@ # switch.crafting_giesskanne_relay let glados = import ../lib; - seconds = 10; + seconds = 20; wasser = "switch.crafting_giesskanne_relay"; in { -- cgit v1.2.3 From 8ed22f337c76df2ad592650ece7abe1a414c4182 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 16 Sep 2020 22:21:53 +0200 Subject: shack/glados: implement rollo triggers --- krebs/2configs/shack/glados/multi/rollos.nix | 53 +++++++++++++++++++++++++--- krebs/2configs/shack/glados/multi/wasser.nix | 10 ++++-- 2 files changed, 55 insertions(+), 8 deletions(-) (limited to 'krebs/2configs/shack/glados/multi') 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; + } + ]; + } ]; } diff --git a/krebs/2configs/shack/glados/multi/wasser.nix b/krebs/2configs/shack/glados/multi/wasser.nix index e3ba28384..74ce736a6 100644 --- a/krebs/2configs/shack/glados/multi/wasser.nix +++ b/krebs/2configs/shack/glados/multi/wasser.nix @@ -6,9 +6,13 @@ let wasser = "switch.crafting_giesskanne_relay"; in { - switch = [ - (glados.tasmota.plug { host = "Wasser"; topic = "plug";} ) - ]; + sensor = map ( entity_id: { + platform = "statistics"; + name = "Statistics for ${entity_id}"; + inherit entity_id; + max_age.minutes = "60"; + }) ["sensor.crafting_brotbox_soil_moisture"]; + automation = [ -- cgit v1.2.3