changes
This commit is contained in:
parent
d8db7df64e
commit
c9a024840b
20 changed files with 301 additions and 70 deletions
47
hosts/fw.cloonar.com/modules/home-assistant/power-saving.nix
Normal file
47
hosts/fw.cloonar.com/modules/home-assistant/power-saving.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
services.home-assistant.extraComponents = [
|
||||
"nuki"
|
||||
];
|
||||
|
||||
services.home-assistant.config = {
|
||||
"automation power leave home" = {
|
||||
alias = "leave house power";
|
||||
mode = "restart";
|
||||
trigger = {
|
||||
platform = "state";
|
||||
entity_id = [
|
||||
"device_tracker.dominiks_iphone"
|
||||
];
|
||||
from = "home";
|
||||
to = "not_home";
|
||||
};
|
||||
action = [
|
||||
{
|
||||
service = "script.turn_on";
|
||||
target = {
|
||||
entity_id = "script.turn_off_circuits";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
"automation arrive home power" = {
|
||||
alias = "arrive home power";
|
||||
trigger = {
|
||||
platform = "state";
|
||||
entity_id = [
|
||||
"device_tracker.dominiks_iphone"
|
||||
];
|
||||
from = "not_home";
|
||||
to = "home";
|
||||
};
|
||||
action = [
|
||||
{
|
||||
service = "script.turn_on";
|
||||
target = {
|
||||
entity_id = "script.turn_on_circuits";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue