mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-29 04:06:54 +00:00
Update Scrape sensor component configuration (#7065)
This commit is contained in:
parent
c466e7b556
commit
4537605960
@ -26,17 +26,45 @@ sensor:
|
||||
select: ".current-version h1"
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **resource** (*Required*): 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.
|
||||
- **attribute** (*optional*): Get value of an attribute on the selected tag.
|
||||
- **name** (*Optional*): Name of the sensor.
|
||||
- **unit_of_measurement** (*Optional*): Defines the units of measurement of the sensor, if any.
|
||||
- **authentication** (*Optional*): Type of the HTTP authentication. Either `basic` or `digest`.
|
||||
- **username** (*Optional*): The username for accessing the website.
|
||||
- **password** (*Optional*): The password for accessing the website.
|
||||
- **headers** (*Optional*): Headers to use for the web request
|
||||
{% configuration %}
|
||||
resource:
|
||||
description: The URL to the website that contains the value.
|
||||
required: true
|
||||
type: string
|
||||
select:
|
||||
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."
|
||||
required: true
|
||||
type: string
|
||||
attribute:
|
||||
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 %}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user