shack/glados: implement rollo triggers
This commit is contained in:
parent
c64fb07027
commit
8ed22f337c
@ -3,6 +3,7 @@ let
|
|||||||
shackopen = import ./multi/shackopen.nix;
|
shackopen = import ./multi/shackopen.nix;
|
||||||
wasser = import ./multi/wasser.nix;
|
wasser = import ./multi/wasser.nix;
|
||||||
badair = import ./multi/schlechte_luft.nix;
|
badair = import ./multi/schlechte_luft.nix;
|
||||||
|
rollos = import ./multi/rollos.nix;
|
||||||
in {
|
in {
|
||||||
services.nginx.virtualHosts."hass.shack" = {
|
services.nginx.virtualHosts."hass.shack" = {
|
||||||
serverAliases = [ "glados.shack" ];
|
serverAliases = [ "glados.shack" ];
|
||||||
@ -65,6 +66,10 @@ in {
|
|||||||
influxdb = {
|
influxdb = {
|
||||||
database = "glados";
|
database = "glados";
|
||||||
host = "influx.shack";
|
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 = {
|
tags = {
|
||||||
instance = "wolf";
|
instance = "wolf";
|
||||||
source = "glados";
|
source = "glados";
|
||||||
@ -94,8 +99,7 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
switch =
|
switch =
|
||||||
wasser.switch
|
(import ./switch/power.nix)
|
||||||
++ (import ./switch/power.nix)
|
|
||||||
;
|
;
|
||||||
light = [];
|
light = [];
|
||||||
media_player = [
|
media_player = [
|
||||||
@ -114,6 +118,7 @@ in {
|
|||||||
++ (import ./sensors/mate.nix)
|
++ (import ./sensors/mate.nix)
|
||||||
++ (import ./sensors/darksky.nix { inherit lib;})
|
++ (import ./sensors/darksky.nix { inherit lib;})
|
||||||
++ shackopen.sensor
|
++ shackopen.sensor
|
||||||
|
++ wasser.sensor
|
||||||
;
|
;
|
||||||
air_quality = (import ./sensors/sensemap.nix );
|
air_quality = (import ./sensors/sensemap.nix );
|
||||||
|
|
||||||
@ -148,6 +153,7 @@ in {
|
|||||||
|
|
||||||
automation = wasser.automation
|
automation = wasser.automation
|
||||||
++ badair.automation
|
++ badair.automation
|
||||||
|
++ rollos.automation
|
||||||
++ (import ./automation/shack-startup.nix)
|
++ (import ./automation/shack-startup.nix)
|
||||||
++ (import ./automation/party-time.nix)
|
++ (import ./automation/party-time.nix)
|
||||||
++ (import ./automation/hass-restart.nix);
|
++ (import ./automation/hass-restart.nix);
|
||||||
|
@ -1,13 +1,56 @@
|
|||||||
|
#
|
||||||
|
|
||||||
let
|
let
|
||||||
glados = import ../lib;
|
glados = import ../lib;
|
||||||
|
tempsensor = "sensor.dark_sky_temperature";
|
||||||
|
all_covers = [
|
||||||
|
"cover.crafting_rollo"
|
||||||
|
"cover.elab_rollo"
|
||||||
|
"cover.or2_rollo"
|
||||||
|
"cover.retroraum_rollo"
|
||||||
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# LED
|
|
||||||
light = [
|
|
||||||
];
|
|
||||||
sensor = [
|
|
||||||
];
|
|
||||||
automation =
|
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";
|
wasser = "switch.crafting_giesskanne_relay";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
switch = [
|
sensor = map ( entity_id: {
|
||||||
(glados.tasmota.plug { host = "Wasser"; topic = "plug";} )
|
platform = "statistics";
|
||||||
];
|
name = "Statistics for ${entity_id}";
|
||||||
|
inherit entity_id;
|
||||||
|
max_age.minutes = "60";
|
||||||
|
}) ["sensor.crafting_brotbox_soil_moisture"];
|
||||||
|
|
||||||
|
|
||||||
automation =
|
automation =
|
||||||
[
|
[
|
||||||
|
Loading…
Reference in New Issue
Block a user