mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 15:26:59 +00:00
Add description for removing holidays by name (#18423)
This commit is contained in:
parent
dca72d1f4f
commit
8a00a52b87
@ -66,7 +66,7 @@ add_holidays:
|
|||||||
required: false
|
required: false
|
||||||
type: list
|
type: list
|
||||||
remove_holidays:
|
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
|
required: false
|
||||||
type: list
|
type: list
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
@ -127,6 +127,20 @@ binary_sensor:
|
|||||||
- '2020-12-25'
|
- '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
|
## Automation example
|
||||||
|
|
||||||
Example usage for automation:
|
Example usage for automation:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user