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

45 lines
1 KiB
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 = "Today?";
};
"binary_sensor.before_workday" = {
icon = "mdi:calendar";
friendly_name = "Tomorrow?";
};
};
group = {
is_workday = {
name = "Workday";
control = "hidden";
entities = [ "binary_sensor.before_workday" "binary_sensor.workday" ];
};
view_overview.entities = [ "group.is_workday" ];
};
};
}