summaryrefslogtreecommitdiffstats
path: root/makefu/2configs
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2021-10-01 18:50:13 +0200
committermakefu <github@syntax-fehler.de>2021-10-01 18:50:13 +0200
commit0e849e1eed8985bd5e0f9635c9973da4b5dc7dbb (patch)
treee9147e482756b894393ef01b16438db0b71aed0e /makefu/2configs
parentb1e291137e46c2cbe338e5fbd93783b55379e623 (diff)
ma ham: add flurlicht
Diffstat (limited to 'makefu/2configs')
-rw-r--r--makefu/2configs/home/ham/automation/flurlicht.nix39
-rw-r--r--makefu/2configs/home/ham/automation/wohnzimmer_rf_fernbedienung.nix18
-rw-r--r--makefu/2configs/home/ham/default.nix1
3 files changed, 57 insertions, 1 deletions
diff --git a/makefu/2configs/home/ham/automation/flurlicht.nix b/makefu/2configs/home/ham/automation/flurlicht.nix
new file mode 100644
index 000000000..d40022540
--- /dev/null
+++ b/makefu/2configs/home/ham/automation/flurlicht.nix
@@ -0,0 +1,39 @@
+let
+ licht = "light.flur_statuslight";
+in
+{
+ services.home-assistant.config.automation =
+ [
+ { alias = "Nachtlicht im Flur an";
+ trigger = {
+ platform = "sun";
+ event = "sunset";
+ };
+ action =
+ [
+ {
+ service = "light.turn_on";
+ target.entity_id = licht;
+ data = {
+ brightness = 87;
+ rgbw_color = [ 255 190 0 0 ]; # ein dunkles rot
+ #effect = "None";
+ };
+ }
+ ];
+ }
+ { alias = "Nachtlicht in Flur aus";
+ trigger = {
+ platform = "sun";
+ event = "sunrise";
+ };
+ action =
+ [
+ {
+ service = "light.turn_off";
+ entity_id = licht;
+ }
+ ];
+ }
+ ];
+}
diff --git a/makefu/2configs/home/ham/automation/wohnzimmer_rf_fernbedienung.nix b/makefu/2configs/home/ham/automation/wohnzimmer_rf_fernbedienung.nix
index 4303cdfa5..31d9b1634 100644
--- a/makefu/2configs/home/ham/automation/wohnzimmer_rf_fernbedienung.nix
+++ b/makefu/2configs/home/ham/automation/wohnzimmer_rf_fernbedienung.nix
@@ -123,7 +123,23 @@ in
(rf_state "401511" "light.wohnzimmer_schrank_osram" 128) # D
# OFF Lane
- (rf_turn_off "400554" "all") # A
+ (let code = "400554"; in {
+ alias = "Turn off living room light via rf code ${code}"; # A
+ trigger = {
+ platform = "event";
+ event_type = "esphome.rf_code_received";
+ event_data.code = code;
+ };
+ action = {
+ service = "light.turn_off";
+ data.entity_id = [
+ "light.wohnzimmer_fernseher_led_strip" "light.wohnzimmer_stehlampe_osram"
+ "light.wohnzimmer_komode_osram" "light.wohnzimmer_schrank_osram"
+ "light.wohnzimmer_fenster_lichterkette_licht" "light.wohnzimmer_fernsehwand_led"
+ ];
+ };
+ })
+
(rf_toggle "401154" "light.wohnzimmer_fenster_lichterkette_licht") # B
(rf_toggle "401454" "light.wohnzimmer_fernsehwand_led") # C
# (rf_toggle "401514" "") # D
diff --git a/makefu/2configs/home/ham/default.nix b/makefu/2configs/home/ham/default.nix
index cb42f32aa..6ab3cd46c 100644
--- a/makefu/2configs/home/ham/default.nix
+++ b/makefu/2configs/home/ham/default.nix
@@ -33,6 +33,7 @@ in {
./automation/light_buttons.nix
./automation/wohnzimmer_rf_fernbedienung.nix
./automation/ladestecker_timer.nix
+ ./automation/flurlicht.nix
#./automation/giesskanne.nix
./automation/pflanzen_giessen_erinnerung.nix
#./automation/urlaub.nix