mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-18 23:06:58 +00:00
Add note about Ontario (ON)
This commit is contained in:
parent
fa00f21a1a
commit
67475ff670
@ -22,18 +22,21 @@ To enable the `workday` sensor in your installation, add the following to your `
|
|||||||
binary_sensor:
|
binary_sensor:
|
||||||
- platform: workday
|
- platform: workday
|
||||||
country: DE
|
country: DE
|
||||||
province: BW
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Configuration variables:
|
Configuration variables:
|
||||||
|
|
||||||
- **country** (*Required*): Country code according to [holidays](https://pypi.python.org/pypi/holidays/0.8.1) notation.
|
- **country** (*Required*): Country code according to [holidays](https://pypi.python.org/pypi/holidays/0.8.1) notation.
|
||||||
- **province** (*Optional*): Province code according to [holidays](https://pypi.python.org/pypi/holidays/0.8.1) notation (defaults to None).
|
- **province** (*Optional*): Province code according to [holidays](https://pypi.python.org/pypi/holidays/0.8.1) notation. Defaults to None.
|
||||||
- **workdays** (*Optional*): List of workdays (defaults to mon, tue, wed, thu, fri).
|
- **workdays** (*Optional*): List of workdays. Defaults to `mon`, `tue`, `wed`, `thu`, `fri`.
|
||||||
- **excludes** (*Optional*): List of workday excludes (defaults to sat, sun, holiday).
|
- **excludes** (*Optional*): List of workday excludes. Defaults to `sat`, `sun`, `holiday`.
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
<p class='note warning'>
|
||||||
|
If you use the sensor for Canada (`CA`) with Ontario (`ON`) as `province:` then you need to wrap `ON` in quotes. Otherwise the value is evaluated as `True` (check the YAML documentation for further details) and the sensor will not work.
|
||||||
|
</p>
|
||||||
|
|
||||||
Example usage for automation:
|
Example usage for automation:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
Loading…
x
Reference in New Issue
Block a user