mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-12-11 09:22:02 +01:00
aff0158ef7
Signed-off-by: magic_rb <magic_rb@redalder.org>
62 lines
1.2 KiB
Nix
62 lines
1.2 KiB
Nix
{
|
|
alias = "Bathroom Light Brighten";
|
|
description = "";
|
|
id = "dff10ca7-a27c-469a-8015-bd6899458c8d";
|
|
|
|
action = [
|
|
{
|
|
"else" = [{stop = "";}];
|
|
"if" = [
|
|
{
|
|
condition = "trigger";
|
|
id = "brightness_down";
|
|
}
|
|
];
|
|
"then" = [
|
|
{
|
|
repeat = {
|
|
sequence = [
|
|
{
|
|
data = {brightness_step_pct = 10;};
|
|
service = "light.turn_on";
|
|
target = {entity_id = "light.bathroom_lights";};
|
|
}
|
|
{
|
|
delay = {
|
|
hours = 0;
|
|
milliseconds = 200;
|
|
minutes = 0;
|
|
seconds = 0;
|
|
};
|
|
}
|
|
];
|
|
while = [
|
|
{
|
|
condition = "not";
|
|
conditions = [];
|
|
}
|
|
];
|
|
};
|
|
}
|
|
];
|
|
}
|
|
];
|
|
|
|
condition = [];
|
|
|
|
trigger = [
|
|
{
|
|
entity_id = ["sensor.0x540f57fffe3c601d_action"];
|
|
id = "brightness_down";
|
|
platform = "state";
|
|
to = "brightness_move_up";
|
|
}
|
|
{
|
|
entity_id = ["sensor.0x540f57fffe3c601d_action"];
|
|
platform = "state";
|
|
to = "brightness_stop";
|
|
}
|
|
];
|
|
|
|
mode = "restart";
|
|
}
|