summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/home/ham/automation/flurlicht.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2023-07-28 22:24:15 +0200
committermakefu <github@syntax-fehler.de>2023-07-28 22:24:15 +0200
commit060a8f28fa1fc648bdf66afb31a5d1efac868837 (patch)
tree2b354eacc7897365ee45244fe7a51720e0d0333f /makefu/2configs/home/ham/automation/flurlicht.nix
parentcbfcc890e3b76d942b927809bf981a5fa7289e6a (diff)
makefu: move out to own repo, add vacation-note
Diffstat (limited to 'makefu/2configs/home/ham/automation/flurlicht.nix')
-rw-r--r--makefu/2configs/home/ham/automation/flurlicht.nix63
1 files changed, 0 insertions, 63 deletions
diff --git a/makefu/2configs/home/ham/automation/flurlicht.nix b/makefu/2configs/home/ham/automation/flurlicht.nix
deleted file mode 100644
index bb487710..00000000
--- a/makefu/2configs/home/ham/automation/flurlicht.nix
+++ /dev/null
@@ -1,63 +0,0 @@
-let
- nachtlicht = [ "light.flur_statuslight" "light.wohnzimmer_status_led" ];
-
- # flurlicht an
- lightcond = name: conditions: rgb_color: brightness:
- {
- inherit conditions;
- sequence = {
- service = "light.turn_on";
- target.entity_id = nachtlicht;
- data = {
- inherit rgb_color brightness;
- };
- };
- };
-in
-{
- services.home-assistant.config.automation =
- [
- { alias = "Nachtlicht trigger";
- trigger = [
- { platform = "sun"; event = "sunset"; }
- { platform = "sun"; event = "sunrise"; }
- { platform = "state"; entity_id = [
- "calendar.kehrwoche_kehrwoche"
- "binary_sensor.badezimmer_fenster_contact"
- "binary_sensor.dusche_fenster_contact"
- ];
- }
- ];
- action =
- [
- { choose = [
- (lightcond "Badezimmer Fenster Auf"
- [ { condition = "state"; entity_id = "binary_sensor.badezimmer_fenster_contact"; state = "on"; }
- { condition = "state"; entity_id = "input_boolean.ist_sommer"; state = "off"; }
-
- ]
- [ 64 207 255 ] 128 # hellblau
- )
- (lightcond "Duschenster auf"
- [ { condition = "state"; entity_id = "binary_sensor.dusche_fenster_contact"; state = "on"; }
- { condition = "state"; entity_id = "input_boolean.ist_sommer"; state = "off"; } ]
- [ 64 207 255 ] 128 # hellblau
- )
- (lightcond "Nachtlicht"
- { condition = "state"; entity_id = "sun.sun"; state = "below_horizon"; }
- [ 255 190 0 ] 90 # red
- )
- (lightcond "Kehrwoche"
- { condition = "state"; entity_id = "calendar.kehrwoche_kehrwoche"; state = "on"; }
- [ 204 0 255 ] 128 # pink
- )
- ];
- default = {
- service = "light.turn_off";
- entity_id = nachtlicht;
- };
- }
- ];
- }
- ];
-}