From 8a00a52b87e00ab11ffa26be9eb090ab5ad39aff Mon Sep 17 00:00:00 2001 From: Matthew Gottlieb <87102888+matthewgottlieb@users.noreply.github.com> Date: Tue, 27 Jul 2021 14:28:23 -0400 Subject: [PATCH] Add description for removing holidays by name (#18423) --- source/_integrations/workday.markdown | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/source/_integrations/workday.markdown b/source/_integrations/workday.markdown index d15c01e7446..22169dfba7a 100644 --- a/source/_integrations/workday.markdown +++ b/source/_integrations/workday.markdown @@ -66,7 +66,7 @@ add_holidays: required: false type: list remove_holidays: - description: "Remove holidays (treat holiday as workday). Needs to formatted as `YYYY-MM-DD`." + description: "Remove holidays (treat holiday as workday). Can be formatted as `YYYY-MM-DD` or by name for a partial string match (e.g. Thanksgiving)." required: false type: list {% endconfiguration %} @@ -127,6 +127,20 @@ binary_sensor: - '2020-12-25' ``` +This example excludes Saturdays, Sundays and holidays. Two holidays are removed by name: Thanksgiving and Christmas Day. + +```yaml +# Example 4 configuration.yaml entry +binary_sensor: + - platform: workday + country: US + workdays: [mon, tue, wed, thu, fri] + excludes: [sat, sun, holiday] + remove_holidays: + - 'Thanksgiving' + - 'Christmas Day' +``` + ## Automation example Example usage for automation: