Update Scrape sensor component configuration (#7065)

This commit is contained in:
Klaas Schoute 2018-10-25 09:23:27 +02:00 committed by Fabian Affolter
parent c466e7b556
commit 4537605960

View File

@ -26,17 +26,45 @@ sensor:
select: ".current-version h1" select: ".current-version h1"
``` ```
Configuration variables: {% configuration %}
resource:
- **resource** (*Required*): The URL to the website that contains the value. description: The URL to the website that contains the value.
- **select** (*Required*): Defines the HTML tag to search for. Check Beautifulsoup's [CSS selectors](https://www.crummy.com/software/BeautifulSoup/bs4/doc/#css-selectors) for details. required: true
- **attribute** (*optional*): Get value of an attribute on the selected tag. type: string
- **name** (*Optional*): Name of the sensor. select:
- **unit_of_measurement** (*Optional*): Defines the units of measurement of the sensor, if any. description: "Defines the HTML tag to search for. Check Beautifulsoup's [CSS selectors](https://www.crummy.com/software/BeautifulSoup/bs4/doc/#css-selectors) for details."
- **authentication** (*Optional*): Type of the HTTP authentication. Either `basic` or `digest`. required: true
- **username** (*Optional*): The username for accessing the website. type: string
- **password** (*Optional*): The password for accessing the website. attribute:
- **headers** (*Optional*): Headers to use for the web request description: Get value of an attribute on the selected tag.
required: false
type: string
name:
description: Name of the sensor.
required: false
default: Web scrape
type: string
unit_of_measurement:
description: Defines the units of measurement of the sensor, if any.
required: false
type: string
authentication:
description: Type of the HTTP authentication. Either `basic` or `digest`.
required: false
type: string
username:
description: The username for accessing the website.
required: false
type: string
password:
description: The password for accessing the website.
required: false
type: string
headers:
description: Headers to use for the web request.
required: false
type: string
{% endconfiguration %}
## {% linkable_title Examples %} ## {% linkable_title Examples %}