Add description for removing holidays by name (#18423)

This commit is contained in:
Matthew Gottlieb 2021-07-27 14:28:23 -04:00 committed by GitHub
parent dca72d1f4f
commit 8a00a52b87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: