summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/home/ham/automation/flurlicht.nix
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/home/ham/automation/flurlicht.nix
parentb1e291137e46c2cbe338e5fbd93783b55379e623 (diff)
ma ham: add flurlicht
Diffstat (limited to 'makefu/2configs/home/ham/automation/flurlicht.nix')
-rw-r--r--makefu/2configs/home/ham/automation/flurlicht.nix39
1 files changed, 39 insertions, 0 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;
+ }
+ ];
+ }
+ ];
+}