2020-04-12 13:36:15 +02:00
|
|
|
{ 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";
|
2020-04-12 14:04:15 +02:00
|
|
|
friendly_name = "Workday?";
|
2020-04-12 13:36:15 +02:00
|
|
|
};
|
|
|
|
"binary_sensor.before_workday" = {
|
|
|
|
icon = "mdi:calendar";
|
2020-04-12 14:04:15 +02:00
|
|
|
friendly_name = "Workday Tomorrow?";
|
2020-04-12 13:36:15 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
group = {
|
2020-04-12 14:04:15 +02:00
|
|
|
today.entities =
|
|
|
|
[ "binary_sensor.before_workday" "binary_sensor.workday" ];
|
2020-04-12 13:36:15 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|