From 0e849e1eed8985bd5e0f9635c9973da4b5dc7dbb Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 1 Oct 2021 18:50:13 +0200 Subject: ma ham: add flurlicht --- makefu/2configs/home/ham/automation/flurlicht.nix | 39 +++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 makefu/2configs/home/ham/automation/flurlicht.nix (limited to 'makefu/2configs/home/ham/automation/flurlicht.nix') diff --git a/makefu/2configs/home/ham/automation/flurlicht.nix b/makefu/2configs/home/ham/automation/flurlicht.nix new file mode 100644 index 00000000..d4002254 --- /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; + } + ]; + } + ]; +} -- cgit v1.2.3