summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/home/ham/automation
diff options
context:
space:
mode:
authorlassulus <git@lassul.us>2023-06-19 03:25:39 +0200
committerlassulus <git@lassul.us>2023-06-19 03:25:39 +0200
commit139799c53cdaf55c362109e01be9dd96cc8700ed (patch)
treeb1ce719ec8f62458bce2d9fe2191b8d004630f2a /makefu/2configs/home/ham/automation
parentcb8fbb09127392a17d698d91f78ede7ae46accb8 (diff)
parenta766e88e7c8d87aa6bdbde796d3a454f7b5e546e (diff)
Merge remote-tracking branch 'gum/master'
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) -%}