summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/home/ham/light/tint_wohnzimmer.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2022-01-20 23:48:09 +0100
committermakefu <github@syntax-fehler.de>2022-01-20 23:48:41 +0100
commitef48f536a3e539b215bb004b512e62c2d0f96907 (patch)
tree589957e86d0f088d4afa8c134fb81e6fa8cd2993 /makefu/2configs/home/ham/light/tint_wohnzimmer.nix
parentf66b93ab324af7b869544981a4d8eaa3e1e96952 (diff)
ma ham: init tint remote control for arbeitszimmer
Diffstat (limited to 'makefu/2configs/home/ham/light/tint_wohnzimmer.nix')
-rw-r--r--makefu/2configs/home/ham/light/tint_wohnzimmer.nix51
1 files changed, 18 insertions, 33 deletions
diff --git a/makefu/2configs/home/ham/light/tint_wohnzimmer.nix b/makefu/2configs/home/ham/light/tint_wohnzimmer.nix
index 3811972e..18e69a77 100644
--- a/makefu/2configs/home/ham/light/tint_wohnzimmer.nix
+++ b/makefu/2configs/home/ham/light/tint_wohnzimmer.nix
@@ -15,39 +15,34 @@
# {% endif -%}
let
- # effect - color
- # Solid Pattern - Hult
+ # Solid Pattern
+ # Hult
group_id_1 = 16388;
group_id_2 = 16389;
group_id_3 = 16390;
- # main_light_1 = "light.wled";
- # default_scene_1 = "Solid";
- # default_color_1 = "Default";
- # main_color_select_1 = "select.wled_color_palette";
+ remote = "sensor.schlafzimmer_remote1_action";
+ main_light_1 = "light.wled";
+ default_scene_1 = "Solid";
+ default_color_1 = "Default";
+ main_color_select_1 = "select.wled_color_palette";
+ light_group_1 = { entity_id = [ main_light_1 ];};
# contains only the actually changeable lights
+ light_group_2 = { entity_id = [
+ "light.wohnzimmer_komode_osram"
+ "light.wohnzimmer_schrank_osram"
+ "light.wohnzimmer_fenster_lichterkette_licht"
+ ];
+ };
+ light_group_3 = { entity_id = [ "light.wohnzimmer_stehlampe_osram" ]; };
statecond = cond: { # cond must be a list
condition = "template";
value_template = "{{ trigger.to_state.attributes.action in ( " +
(lib.concatMapStringsSep "," (x: "'${x}'") cond) + ") }}";
- };
-
- # The remote manages WLED on ID1, and basic lights on ID2 and ID3
- tint_remote = { remote
- , wled_name_1
- , lights_2 ? []
- , lights_3 ? []
- , main_light_1 ? "light.${wled_name_1}"
- , main_color_select_1 ? "select.${wled_name_1}_color_plaette"
- , default_scene_1 ? "Solid"
- , default_color_1 ? "Default"
- }:
- let
- light_group_1.entity_id = [ main_light_1 ];
- light_group_2.entity_id = lights_2;
- light_group_3.entity_id = lights_2;
- in
+ };
+in {
+ services.home-assistant.config.automation = [
{
alias = "Perform Actions with ${remote}";
mode = "queued";
@@ -295,15 +290,5 @@ let
}
];
}
-
- ;
-in {
- services.home-assistant.config.automation = [
- (tint_remote {
- remote = "sensor.schlafzimmer_remote1_action";
- wled_name_1 = "wled";
- lights_2 = [ "light.wohnzimmer_komode_osram" "light.wohnzimmer_schrank_osram" "light.wohnzimmer_fenster_lichterkette_licht" ];
- lights_3 = [ "light.wohnzimmer_stehlampe_osram" ];
- })
];
}