Installation home-assistant

This commit is contained in:
nyanloutre 2020-08-30 21:16:41 +02:00
parent b6cf4e19de
commit f77cb355b1
2 changed files with 96 additions and 0 deletions

View File

@ -237,6 +237,97 @@ in
kresd = { kresd = {
enable = true; 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 systemd.services.dogetipbot-telegram = let

View File

@ -184,6 +184,11 @@ in
"emby.nyanlout.re" = simpleReverse 8096; "emby.nyanlout.re" = simpleReverse 8096;
"ci.nyanlout.re" = simpleReverse 52350; "ci.nyanlout.re" = simpleReverse 52350;
"gitea.nyanlout.re" = simpleReverse config.services.gitea.httpPort; "gitea.nyanlout.re" = simpleReverse config.services.gitea.httpPort;
"apart.nyanlout.re" = recursiveUpdate (simpleReverse config.services.home-assistant.port) {
locations."/" = {
proxyWebsockets = true;
};
};
}; };
appendConfig = let appendConfig = let
rootLocation = config.services.nginx.virtualHosts."stream.nyanlout.re".locations."/".root; rootLocation = config.services.nginx.virtualHosts."stream.nyanlout.re".locations."/".root;