shack/glados: implement rollo triggers
This commit is contained in:
parent
c64fb07027
commit
8ed22f337c
@ -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" ];
|
||||
@ -65,6 +66,10 @@ in {
|
||||
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";
|
||||
@ -94,8 +99,7 @@ in {
|
||||
};
|
||||
};
|
||||
switch =
|
||||
wasser.switch
|
||||
++ (import ./switch/power.nix)
|
||||
(import ./switch/power.nix)
|
||||
;
|
||||
light = [];
|
||||
media_player = [
|
||||
@ -114,6 +118,7 @@ in {
|
||||
++ (import ./sensors/mate.nix)
|
||||
++ (import ./sensors/darksky.nix { inherit lib;})
|
||||
++ shackopen.sensor
|
||||
++ wasser.sensor
|
||||
;
|
||||
air_quality = (import ./sensors/sensemap.nix );
|
||||
|
||||
@ -148,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);
|
||||
|
@ -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;
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
|
@ -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 =
|
||||
[
|
||||
|
Loading…
Reference in New Issue
Block a user