46 lines
1 KiB
Nix
46 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" ];
|
||
|
};
|
||
|
|
||
|
};
|
||
|
|
||
|
}
|