diff --git a/source/_components/binary_sensor.workday.markdown b/source/_components/binary_sensor.workday.markdown index 75cd8c6e2719..d21550d0d92c 100644 --- a/source/_components/binary_sensor.workday.markdown +++ b/source/_components/binary_sensor.workday.markdown @@ -30,7 +30,6 @@ To enable the `workday` sensor in your installation, add the following to your ` binary_sensor: - platform: workday country: DE - workdays: [mon, wed, fri] ``` {% configuration %} @@ -63,11 +62,14 @@ days_offset: required: false type: integer default: 0 +add_holidays: + description: "Add custom holidays (such as company, personal holidays or vacations). Needs to formatted as `YYYY-MM-DD`." + required: false + type: list {% endconfiguration %} Days are specified as follows: `mon`, `tue`, `wed`, `thu`, `fri`, `sat`, `sun`. -The keyword `holiday` is used for public -holidays identified by the holidays module. +The keyword `holiday` is used for public holidays identified by the holidays module.

If you use the sensor for Norway (`NO`) you need to wrap `NO` in quotes or write the name in full. @@ -76,6 +78,22 @@ If you use the sensor for Canada (`CA`) with Ontario (`ON`) as `province:` then Otherwise the value is evaluated as `true` (check the YAML documentation for further details) and the sensor will not work.

+## {% linkable_title Full example %} + +This examples excludes Saturdays, Sundays and holiday. Two custom holidays are added. + +```yaml +# Example configuration.yaml entry +binary_sensor: + - platform: workday + country: DE + workdays: [mon, wed, fri] + excludes: [sat, sun, holiday] + add_holidays: + - '2018-12-26' + - '2018-12-31' +``` + ## {% linkable_title Automation example %} Example usage for automation: @@ -98,4 +116,3 @@ automation:

Please remember that [as explained here](/docs/configuration/devices/) you can only have a single `automation:` entry. Add the automation to your existing automations.

-