summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/home/ham/automation/flurlicht.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2022-01-30 23:51:32 +0100
committermakefu <github@syntax-fehler.de>2022-01-30 23:51:32 +0100
commit965a6c96c3b7216bf8ca1b985f8bece6c73213c4 (patch)
tree546b554bb339859a2fb182d4b9df8c21db5fc085 /makefu/2configs/home/ham/automation/flurlicht.nix
parenta721b7ad9b605dc90fa731b2f9a176f2238dc82f (diff)
ma ham: commit open changes
Diffstat (limited to 'makefu/2configs/home/ham/automation/flurlicht.nix')
-rw-r--r--makefu/2configs/home/ham/automation/flurlicht.nix31
1 files changed, 25 insertions, 6 deletions
diff --git a/makefu/2configs/home/ham/automation/flurlicht.nix b/makefu/2configs/home/ham/automation/flurlicht.nix
index d40022540..c26f7e3e0 100644
--- a/makefu/2configs/home/ham/automation/flurlicht.nix
+++ b/makefu/2configs/home/ham/automation/flurlicht.nix
@@ -1,5 +1,7 @@
let
- licht = "light.flur_statuslight";
+ licht = [ "light.flur_statuslight" "light.wohnzimmer_status_led" ];
+ kehrwoche_color = [ 204 0 255 ]; # pink
+ nachtlicht_color = [ 255 190 0 ]; # ein dunkles rot
in
{
services.home-assistant.config.automation =
@@ -16,22 +18,39 @@ in
target.entity_id = licht;
data = {
brightness = 87;
- rgbw_color = [ 255 190 0 0 ]; # ein dunkles rot
+ rgb_color = nachtlicht_color;
#effect = "None";
};
}
];
}
- { alias = "Nachtlicht in Flur aus";
+ { alias = "Nachtlicht in Flur aus, Kehrwoche an";
trigger = {
platform = "sun";
event = "sunrise";
};
action =
[
- {
- service = "light.turn_off";
- entity_id = licht;
+ { choose = [
+ {
+ conditions = {
+ condition = "state";
+ entity_id = "calendar.kehrwoche_kehrwoche";
+ state = "on";
+ };
+ sequence = {
+ service = "light.turn_on";
+ target.entity_id = licht;
+ data = {
+ brightness = 190;
+ rgb_color = kehrwoche_color; # pink
+ };
+ };
+ }];
+ default = {
+ service = "light.turn_off";
+ entity_id = licht;
+ };
}
];
}