stockholm/makefu/2configs/home/ham/automation/light_buttons.nix

54 lines
1.3 KiB
Nix
Raw Normal View History

2020-12-30 10:02:21 +00:00
2020-11-19 00:39:10 +00:00
let
2021-08-31 13:14:37 +00:00
inherit (import ../lib) btn_cycle_light;
2020-11-19 00:39:10 +00:00
in {
services.home-assistant.config.automation = [
2021-08-27 20:45:16 +00:00
# (btn_cycle_light "light.arbeitszimmerbeleuchtung" "arbeitszimmer_btn1")
(btn_cycle_light "light.schlafzimmer_komode_osram" "schlafzimmer_btn2" 128)
2021-12-04 16:31:26 +00:00
{
alias = "toggle keller";
trigger = {
platform = "state";
entity_id = "sensor.keller_btn1_click";
to = "single";
};
action = {
service = "light.toggle";
#entity_id = lights;
data = {
entity_id = "light.keller_osram";
brightness = 255;
};
};
}
{
alias = "low brightness keller with doubleclick";
trigger = {
platform = "state";
entity_id = "sensor.keller_btn1_click";
to = "double";
};
action = {
service = "light.toggle";
data = {
entity_id = "light.keller_osram";
brightness = 50;
};
};
}
2021-08-27 20:45:16 +00:00
# (btn_cycle_light "light.wohnzimmerbeleuchtung" "wohnzimmer_btn3")
2021-12-04 16:31:26 +00:00
{
alias = "Turn of all lights via schlafzimmer_btn2 double click";
trigger = {
platform = "state";
entity_id = "sensor.schlafzimmer_btn2_click";
to = "double";
};
action = {
service = "light.turn_off";
entity_id = "all";
};
}
2020-11-19 00:39:10 +00:00
];
}