summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/home/ham/automation
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2023-06-03 15:27:46 +0200
committermakefu <github@syntax-fehler.de>2023-06-03 15:27:46 +0200
commitbe3284417942c0164c1b32c9cf34ba44bcfb86c3 (patch)
tree4302b9ce28125003e4daf5ae411f65cef58537ef /makefu/2configs/home/ham/automation
parentdd0a6294c8699640f47127f237104aac9d96c896 (diff)
ma home: deploy home-assistant via docker
Diffstat (limited to 'makefu/2configs/home/ham/automation')
-rw-r--r--makefu/2configs/home/ham/automation/light_buttons.nix28
-rw-r--r--makefu/2configs/home/ham/automation/urlaub.nix6
-rw-r--r--makefu/2configs/home/ham/automation/welcome.txt.j22
3 files changed, 26 insertions, 10 deletions
diff --git a/makefu/2configs/home/ham/automation/light_buttons.nix b/makefu/2configs/home/ham/automation/light_buttons.nix
index 1892917c4..460d48bc4 100644
--- a/makefu/2configs/home/ham/automation/light_buttons.nix
+++ b/makefu/2configs/home/ham/automation/light_buttons.nix
@@ -1,10 +1,12 @@
let
inherit (import ../lib) btn_cycle_light;
+ schlafzimmer_komode = "light.schlafzimmer_komode_osram";
+ schlafzimmer_button = "sensor.schlafzimmer_btn2_click";
in {
services.home-assistant.config.automation = [
# (btn_cycle_light "light.arbeitszimmerbeleuchtung" "arbeitszimmer_btn1")
- (btn_cycle_light "light.schlafzimmer_komode_osram" "schlafzimmer_btn2" 128)
+
{
alias = "toggle keller";
trigger = {
@@ -32,21 +34,35 @@ in {
service = "light.toggle";
data = {
entity_id = "light.keller_osram";
- brightness = 50;
+ brightness = 25;
};
};
}
# (btn_cycle_light "light.wohnzimmerbeleuchtung" "wohnzimmer_btn3")
{
- alias = "Turn of all lights via schlafzimmer_btn2 double click";
+ alias = "Dim Toggle schlafzimmer komode";
trigger = {
platform = "state";
- entity_id = "sensor.schlafzimmer_btn2_click";
+ entity_id = schlafzimmer_button;
+ to = "single";
+ };
+ action = {
+ service = "light.toggle";
+ entity_id = schlafzimmer_komode;
+ brightness = 1;
+ };
+ }
+ {
+ alias = "Bright Toggle schlafzimmer komode";
+ trigger = {
+ platform = "state";
+ entity_id = schlafzimmer_button;
to = "double";
};
action = {
- service = "light.turn_off";
- entity_id = "all";
+ service = "light.toggle";
+ entity_id = schlafzimmer_komode;
+ brightness = 255;
};
}
];
diff --git a/makefu/2configs/home/ham/automation/urlaub.nix b/makefu/2configs/home/ham/automation/urlaub.nix
index 019e65d25..abfe5031d 100644
--- a/makefu/2configs/home/ham/automation/urlaub.nix
+++ b/makefu/2configs/home/ham/automation/urlaub.nix
@@ -6,7 +6,7 @@
let
schranklicht = [
"light.wohnzimmer_schrank_osram"
- "light.wohnzimmer_komode_osram"
+ # "light.wohnzimmer_komode_osram"
];
weihnachtslicht = "light.wohnzimmer_fenster_lichterkette_licht";
fernsehlicht = "light.wled";
@@ -31,8 +31,8 @@ in
automation =
[
(turn_on schranklicht "-00:30:00")
- #(turn_on weihnachtslicht "-00:30:00")
- (turn_on fernsehlicht "-00:00:00")
+ (turn_on weihnachtslicht "-00:00:00")
+ #(turn_on fernsehlicht "-00:00:00")
{ alias = "Always turn off the urlaub lights at ${final_off}";
trigger = [
diff --git a/makefu/2configs/home/ham/automation/welcome.txt.j2 b/makefu/2configs/home/ham/automation/welcome.txt.j2
index 76091b868..d2a2b573b 100644
--- a/makefu/2configs/home/ham/automation/welcome.txt.j2
+++ b/makefu/2configs/home/ham/automation/welcome.txt.j2
@@ -7,7 +7,7 @@ Heute ist {{ weekday }}, du solltest gar nicht arbeiten!
{% else %}
Willkommen auf Arbeit Felix.
{% endif -%}
-Das aktuell gewählte Projekt ist {{ states("sensor.felix_project") }}.
+Dein Projekt ist {{ states("sensor.felix_project") }}.
{% set inside = states("sensor.wohnzimmer_temp_temperature") | float | round(2) -%}
{% set outside = states("sensor.dark_sky_temperature") | float | round(2) -%}