mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-29 12:17:01 +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"
|
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 %}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user