nixos-config/configs/pepe/home-assistant/workday.nix
2020-04-12 14:04:15 +02:00

42 lines
969 B
Nix

{ config, ... }: {
services.homeAssistantConfig = {
# todo: add holidays package to home-assiatnt
binary_sensor = [
{
name = "before_workday";
platform = "workday";
country = "DE";
province = "NW";
workdays = [ "mon" "tue" "wed" "thu" "fri" ];
days_offset = 1;
}
{
name = "workday";
platform = "workday";
country = "DE";
province = "NW";
workdays = [ "mon" "tue" "wed" "thu" "fri" ];
}
];
homeassistant.customize = {
"binary_sensor.workday" = {
icon = "mdi:calendar";
friendly_name = "Workday?";
};
"binary_sensor.before_workday" = {
icon = "mdi:calendar";
friendly_name = "Workday Tomorrow?";
};
};
group = {
today.entities =
[ "binary_sensor.before_workday" "binary_sensor.workday" ];
view_overview.entities = [ "group.is_workday" ];
};
};
}