summaryrefslogtreecommitdiffstats
path: root/krebs/2configs/shack/glados
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2020-10-03 13:44:30 +0200
committertv <tv@krebsco.de>2020-10-03 13:44:30 +0200
commitd1e52425e0d5d79a33b11c92cc2afb498075d953 (patch)
tree29277982f014eaae680e006b6afc7fdb42e8d9b2 /krebs/2configs/shack/glados
parent654f64f05935a69607a540f2e8d15619cee9e15e (diff)
parent7e7499d86302d261c8f8404fb34f2ac091318d0e (diff)
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'krebs/2configs/shack/glados')
-rw-r--r--krebs/2configs/shack/glados/default.nix25
-rw-r--r--krebs/2configs/shack/glados/multi/rollos.nix53
-rw-r--r--krebs/2configs/shack/glados/multi/wasser.nix12
3 files changed, 72 insertions, 18 deletions
diff --git a/krebs/2configs/shack/glados/default.nix b/krebs/2configs/shack/glados/default.nix
index 9bf90bca4..f47bca2db 100644
--- a/krebs/2configs/shack/glados/default.nix
+++ b/krebs/2configs/shack/glados/default.nix
@@ -3,6 +3,7 @@ let
shackopen = import ./multi/shackopen.nix;
wasser = import ./multi/wasser.nix;
badair = import ./multi/schlechte_luft.nix;
+ rollos = import ./multi/rollos.nix;
in {
services.nginx.virtualHosts."hass.shack" = {
serverAliases = [ "glados.shack" ];
@@ -62,13 +63,18 @@ in {
];
};
# https://www.home-assistant.io/components/influxdb/
- #influxdb = {
- # database = "hass";
- # tags = {
- # instance = "wolf";
- # source = "hass";
- # };
- #};
+ influxdb = {
+ database = "glados";
+ host = "influx.shack";
+ component_config_glob = {
+ "sensor.*particulate_matter_2_5um_concentration".override_measurement = "2_5um particles";
+ "sensor.*particulate_matter_10_0um_concentration".override_measurement ="10um particles";
+ };
+ tags = {
+ instance = "wolf";
+ source = "glados";
+ };
+ };
esphome = {};
api = {};
mqtt = {
@@ -93,8 +99,7 @@ in {
};
};
switch =
- wasser.switch
- ++ (import ./switch/power.nix)
+ (import ./switch/power.nix)
;
light = [];
media_player = [
@@ -113,6 +118,7 @@ in {
++ (import ./sensors/mate.nix)
++ (import ./sensors/darksky.nix { inherit lib;})
++ shackopen.sensor
+ ++ wasser.sensor
;
air_quality = (import ./sensors/sensemap.nix );
@@ -147,6 +153,7 @@ in {
automation = wasser.automation
++ badair.automation
+ ++ rollos.automation
++ (import ./automation/shack-startup.nix)
++ (import ./automation/party-time.nix)
++ (import ./automation/hass-restart.nix);
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 6f3dc98ad..74ce736a6 100644
--- a/krebs/2configs/shack/glados/multi/wasser.nix
+++ b/krebs/2configs/shack/glados/multi/wasser.nix
@@ -2,13 +2,17 @@
# switch.crafting_giesskanne_relay
let
glados = import ../lib;
- seconds = 10;
+ seconds = 20;
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 =
[