update
This commit is contained in:
parent
a18e244ba5
commit
05a9d96d4e
26 changed files with 861 additions and 182 deletions
55
server/home-assistant/lights.nix
Normal file
55
server/home-assistant/lights.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{...}: {
|
||||
services.home-assistant.config.automation = [
|
||||
{
|
||||
alias = "Wake Up Light";
|
||||
description = "Turn on the light on alarm ringing";
|
||||
trigger = {
|
||||
platform = "time";
|
||||
at = "sensor.lilith_phone_next_alarm";
|
||||
};
|
||||
condition = [];
|
||||
action = [
|
||||
{
|
||||
action = "light.turn_on";
|
||||
metadata = {};
|
||||
data = {
|
||||
transition = 3;
|
||||
kelvin = 3000;
|
||||
brightness_pct = 100;
|
||||
};
|
||||
target = {
|
||||
device_id = "7d40ebcac890a2743d7dc2a6dc4ca797";
|
||||
};
|
||||
}
|
||||
];
|
||||
mode = "single";
|
||||
}
|
||||
{
|
||||
alias = "Automatic Light Off";
|
||||
description = "Turn off the light after 15 minutes once Liv leaves the house";
|
||||
trigger = {
|
||||
platform = "state";
|
||||
entity_id = "person.liv_benstem";
|
||||
from = "home";
|
||||
to = "not_home";
|
||||
for = {
|
||||
hours = 0;
|
||||
minutes = 10;
|
||||
seconds = 0;
|
||||
};
|
||||
};
|
||||
condition = [];
|
||||
action = [
|
||||
{
|
||||
action = "light.turn_off";
|
||||
metadata = {};
|
||||
data = {};
|
||||
target = {
|
||||
area_id = "bedroom";
|
||||
};
|
||||
}
|
||||
];
|
||||
mode = "single";
|
||||
}
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue