Merge branch 'current' into next

This commit is contained in:
Franck Nijhof 2022-04-04 11:50:37 +02:00
commit 730dd0f0bb
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
4 changed files with 17 additions and 21 deletions

View File

@ -10,7 +10,7 @@ jobs:
- name: Check out files from GitHub
uses: actions/checkout@v3.0.0
- name: Setting up Node.js
uses: actions/setup-node@v3.0.0
uses: actions/setup-node@v3.1.0
with:
node-version: 16.x
cache: "npm"
@ -27,7 +27,7 @@ jobs:
- name: Check out files from GitHub
uses: actions/checkout@v3.0.0
- name: Setting up Node.js
uses: actions/setup-node@v3.0.0
uses: actions/setup-node@v3.1.0
with:
node-version: 16.x
cache: "npm"

12
package-lock.json generated
View File

@ -4205,9 +4205,9 @@
}
},
"node_modules/minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
"dev": true
},
"node_modules/misspellings": {
@ -8990,9 +8990,9 @@
}
},
"minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
"dev": true
},
"misspellings": {

View File

@ -77,15 +77,9 @@ Supported sensors:
## Camera
If the OctoPrint host is equipped with a web camera it is possible to add this as well.
If the OctoPrint host is equipped with a web camera it is possible to add this as well using the [`MJPEG IP Camera`](/integrations/mjpeg) integration. Use `http://YOUR_OCTOPRINT_HOST_IP/webcam/?action=stream` for the MJPEG URL and `http://YOUR_OCTOPRINT_HOST_IP/webcam/?action=snapshot` as the still image URL.
```yaml
camera:
- platform: mjpeg
name: OctoPrint
still_image_url: http://YOUR_OCTOPRINT_HOST_IP/webcam/?action=snapshot
mjpeg_url: http://YOUR_OCTOPRINT_HOST_IP/webcam/?action=stream
```
{% my config_flow_start badge domain="mjpeg" %}
## Buttons

View File

@ -14,12 +14,14 @@ ha_platforms:
- binary_sensor
---
The `workday` binary sensor indicates, whether the current day is a workday or not. It allows specifying, which days of the week will count as workdays and also
The `workday` binary sensor indicates whether the current day is a workday or not. It allows specifying which days of the week will count as workdays and also
uses the Python module [holidays](https://pypi.python.org/pypi/holidays) to incorporate information about region-specific public holidays.
This can be used to make automations that act differently on weekdays vs weekends. For example, you could make your bedroom lights turn on (gently) at 7 in the morning if it is a weekday, but wait until 11 if it is a weekend day.
## Setup
Check the [country list](https://github.com/dr-prodigy/python-holidays#available-countries) for available province.
Check the [country list](https://github.com/dr-prodigy/python-holidays#available-countries) for available provinces (and other subdivisions, like states and territories) for each country.
## Configuration
To enable the `workday` sensor in your installation, add the following to your `configuration.yaml` file:
@ -81,13 +83,13 @@ Otherwise, the value is evaluated as `false`.
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.
One other thing to watch is how the `holiday` keyword is used. Your first instinct might be to add it to the `exclude` configuration, thinking that it means to skip the holidays. Actually it means to exclude the days in the holidays list from the workdays. So when you exclude `holiday` and a workday falls on that day, then that workday is excluded. Meaning the sensor will be off. If you want the workday flagged without regarding holidays, make sure that there is something in your `Excludes` configuration other than `holiday`.
One other thing to watch is how the `holiday` keyword is used. Your first instinct might be to add it to the `exclude` configuration, thinking that it means to skip the holidays. Actually it means to exclude the days in the holidays list from the workdays. So, when you exclude `holiday` and a workday falls on that day, then that workday is excluded, and the sensor will be **off**. If you want every workday flagged with no regard to holidays, make sure that there is something in your `Excludes` configuration _other_ than `holiday`.
</div>
## Full examples
This example excludes Saturdays and Sundays but not holidays. Two custom holidays are added.
This example excludes Saturdays and Sundays but not pre-configured holidays. Two custom holidays are added.
```yaml
# Example 1 configuration.yaml entry
@ -102,7 +104,7 @@ binary_sensor:
```
This example excludes Saturdays, Sundays and holidays. One custom holiday is added.
The date February 24th, 2020 is a Monday but will be excluded because it was added to the `add_holidays` configuration.
The date February 24th, 2020 is a Monday, but will be excluded (the sensor will be **off**) because it was added to the `add_holidays` configuration.
```yaml
# Example 2 configuration.yaml entry