From 45376059609136606d7a4937c114709d8b633621 Mon Sep 17 00:00:00 2001 From: Klaas Schoute Date: Thu, 25 Oct 2018 09:23:27 +0200 Subject: [PATCH] Update Scrape sensor component configuration (#7065) --- source/_components/sensor.scrape.markdown | 50 ++++++++++++++++++----- 1 file changed, 39 insertions(+), 11 deletions(-) diff --git a/source/_components/sensor.scrape.markdown b/source/_components/sensor.scrape.markdown index b6da7d08d77..ccc6bebdf5f 100644 --- a/source/_components/sensor.scrape.markdown +++ b/source/_components/sensor.scrape.markdown @@ -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 %}