Installation home-assistant
This commit is contained in:
parent
b6cf4e19de
commit
f77cb355b1
@ -237,6 +237,97 @@ in
|
||||
kresd = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
home-assistant = {
|
||||
enable = true;
|
||||
# package = pkgs.home-assistant.override {
|
||||
# extraPackages = ps: with ps; [ aiohttp-cors netdisco zeroconf ];
|
||||
# };
|
||||
config = {
|
||||
default_config = null;
|
||||
yeelight.devices = {
|
||||
"10.40.249.0".name = "Chambre";
|
||||
"10.40.249.1".name = "Bureau";
|
||||
"10.40.249.2".name = "Cuisine";
|
||||
};
|
||||
light = [
|
||||
{
|
||||
platform = "group";
|
||||
name = "Salon";
|
||||
entities = [
|
||||
"light.bureau"
|
||||
"light.cuisine"
|
||||
];
|
||||
}
|
||||
];
|
||||
media_player = [
|
||||
{
|
||||
platform = "squeezebox";
|
||||
host = "10.30.0.1";
|
||||
}
|
||||
];
|
||||
switch = [
|
||||
{
|
||||
platform = "wake_on_lan";
|
||||
name = "PC Fixe";
|
||||
mac = "b4:2e:99:ed:24:26";
|
||||
host = "10.30.135.71";
|
||||
broadcast_address = "10.30.255.255";
|
||||
}
|
||||
];
|
||||
automation = [
|
||||
{
|
||||
alias = "Aziz lumière";
|
||||
trigger = [
|
||||
{
|
||||
platform = "sun";
|
||||
event = "sunset";
|
||||
offset = "-01:00:00";
|
||||
}
|
||||
{
|
||||
platform = "state";
|
||||
entity_id = "person.paul";
|
||||
to = "home";
|
||||
}
|
||||
];
|
||||
condition = [
|
||||
{
|
||||
condition = "state";
|
||||
entity_id = "person.paul";
|
||||
state = "home";
|
||||
}
|
||||
{
|
||||
condition = "time";
|
||||
after = "16:00:00";
|
||||
before = "23:00:00";
|
||||
}
|
||||
];
|
||||
action = {
|
||||
service = "light.turn_on";
|
||||
entity_id = "light.salon";
|
||||
};
|
||||
}
|
||||
{
|
||||
alias = "Adios";
|
||||
trigger = {
|
||||
platform = "state";
|
||||
entity_id = "person.paul";
|
||||
to = "not_home";
|
||||
};
|
||||
action = [
|
||||
{
|
||||
service = "light.turn_off";
|
||||
entity_id = "all";
|
||||
}
|
||||
{
|
||||
service = "media_player.media_pause";
|
||||
entity_id = "all";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.dogetipbot-telegram = let
|
||||
|
@ -184,6 +184,11 @@ in
|
||||
"emby.nyanlout.re" = simpleReverse 8096;
|
||||
"ci.nyanlout.re" = simpleReverse 52350;
|
||||
"gitea.nyanlout.re" = simpleReverse config.services.gitea.httpPort;
|
||||
"apart.nyanlout.re" = recursiveUpdate (simpleReverse config.services.home-assistant.port) {
|
||||
locations."/" = {
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
appendConfig = let
|
||||
rootLocation = config.services.nginx.virtualHosts."stream.nyanlout.re".locations."/".root;
|
||||
|
Loading…
Reference in New Issue
Block a user