From 85fcddbf17be788c9208b11aa78ba4c8af9d8c2c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 16 Nov 2017 21:05:16 +0100 Subject: [PATCH] Update configuration description style (#3994) --- source/_components/sensor.bitcoin.markdown | 79 +++++++++++++------ source/_components/sensor.blockchain.markdown | 9 ++- .../_components/sensor.coinmarketcap.markdown | 17 +++- .../_components/sensor.currencylayer.markdown | 20 ++++- source/_components/sensor.etherscan.markdown | 14 +++- source/_components/sensor.fixer.markdown | 22 ++++-- .../sensor.openexchangerates.markdown | 25 ++++-- source/_components/sensor.ripple.markdown | 14 +++- .../_components/sensor.yahoo_finance.markdown | 16 +++- 9 files changed, 160 insertions(+), 56 deletions(-) diff --git a/source/_components/sensor.bitcoin.markdown b/source/_components/sensor.bitcoin.markdown index f2475e71038..85173adc725 100644 --- a/source/_components/sensor.bitcoin.markdown +++ b/source/_components/sensor.bitcoin.markdown @@ -27,29 +27,58 @@ sensor: - trade_volume_btc ``` -Configuration variables: - -- **currency** (*Optional*): The currency to exchange to, eg. CHF, USD, EUR, etc. Default is USD. -- **display_options** array (*Required*): Options to display in the frontend. - - **exchangerate**: Exchange rate of 1 BTC - - **trade_volume_btc**: Trade volume - - **miners_revenue_usd**: Miners revenue - - **btc_mined**: BTC mined - - **trade_volume_usd**: Trade volume in USD - - **difficulty**: Difficulty - - **minutes_between_blocks**: Time between blocks in minutes - - **number_of_transactions**: Number of transactions - - **hash_rate**: Hash rate in PH/s - - **timestamp**: Timestamp - - **mined_blocks**: Minded Blocks - - **blocks_size**: Block size - - **total_fees_btc**: Total fees in BTC - - **total_btc_sent**: Total sent in BTC - - **estimated_btc_sent**: Estimated sent in BTC - - **total_btc**: Total of BTC - - **total_blocks**: Total Blocks - - **next_retarget**: Next retarget - - **estimated_transaction_volume_usd**: Estimated transaction volume in BTC - - **miners_revenue_btc**: Miners revenue in BTC - - **market_price_usd**: Market price in USD +{% configuration %} +currency: + description: The currency to exchange to, eg. CHF, USD, EUR, etc. + required: false + type: string + default: USD +display_options: + description: Options to display in the frontend. + required: true + type: map + keys: + exchangerate: + description: Exchange rate of 1 BTC + trade_volume_btc: + description: Trade volume + miners_revenue_usd: + description: Miners revenue + btc_mined: + description: BTC mined + trade_volume_usd: + description: Trade volume in USD + difficulty: + description: Difficulty + minutes_between_blocks: + description: Time between blocks in minutes + number_of_transactions: + description: Number of transactions + hash_rate: + description: Hash rate in PH/s + timestamp: + description: Timestamp + mined_blocks: + description: Minded Blocks + blocks_size: + description: Block size + total_fees_btc: + description: Total fees in BTC + total_btc_sent: + description: Total sent in BTC + estimated_btc_sent: + description: Estimated sent in BTC + total_btc: + description: Total of BTC + total_blocks: + description: Total Blocks + next_retarget: + description: Next retarget + estimated_transaction_volume_usd: + description: Estimated transaction volume in BTC + miners_revenue_btc: + description: Miners revenue in BTC + market_price_usd: + description: Market price in USD +{% endconfiguration %} diff --git a/source/_components/sensor.blockchain.markdown b/source/_components/sensor.blockchain.markdown index 26e5b590eda..21da2883379 100644 --- a/source/_components/sensor.blockchain.markdown +++ b/source/_components/sensor.blockchain.markdown @@ -27,7 +27,10 @@ sensor: - '183J5pXWqYYsxZ7inTVw9tEpejDXyMFroe' ``` -Configuration variables: - -- **addresses** (*Required*): List of bitcoin wallet addresses to watch. +{% configuration %} +addresses: + description: List of bitcoin wallet addresses to watch. + required: true + type: string, list +{% endconfiguration %} diff --git a/source/_components/sensor.coinmarketcap.markdown b/source/_components/sensor.coinmarketcap.markdown index e8ab719c944..f0d20afb171 100644 --- a/source/_components/sensor.coinmarketcap.markdown +++ b/source/_components/sensor.coinmarketcap.markdown @@ -24,7 +24,18 @@ sensor: - platform: coinmarketcap ``` -Configuration variables: +{% configuration %} +currency: + description: The cryptocurrency to use. + required: false + type: string, list + default: Bitcoin +display_currency: + description: The currency to display. + required: false + type: string, list + default: USD +{% endconfiguration %} + +All supported currencies can be found [here](https://coinmarketcap.com/api/). -- **currency** (*Optional*): The cryptocurrency to use, eg. `bitcoin`, `litecoin`, `steem`, etc. Default is `bitcoin`. -- **display_currency** (*Optional*): The currency to display, eg. `USD`, `EUR`, `GBP`, etc. Default is `USD`. All supported currencies can be found [here](https://coinmarketcap.com/api/). diff --git a/source/_components/sensor.currencylayer.markdown b/source/_components/sensor.currencylayer.markdown index d26955ba01d..2c59a2a8b9b 100644 --- a/source/_components/sensor.currencylayer.markdown +++ b/source/_components/sensor.currencylayer.markdown @@ -31,8 +31,20 @@ sensor: - INR ``` -Configuration variables: +{% configuration %} +api_key: + description: "The API Key from [Currencylayer](https://currencylayer.com/)." + required: true + type: string +quote: + description: The symbol(s) of the quote or target currencies. + required: false + type: string, list + default: Exchange rate +base: + description: The symbol of the base currency. + required: false + type: string + default: USD +{% endconfiguration %} -- **api_key** (*Required*): API Key from [Currencylayer](https://currencylayer.com/). -- **base** (*Optional*): The symbol of the base currency. Defaults to USD. -- **quote** (*Required*): The symbol(s) of the quote or target currencies. diff --git a/source/_components/sensor.etherscan.markdown b/source/_components/sensor.etherscan.markdown index 8200f531779..fcdc5387059 100644 --- a/source/_components/sensor.etherscan.markdown +++ b/source/_components/sensor.etherscan.markdown @@ -25,7 +25,15 @@ sensor: address: '0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359' ``` -Configuration variables: +{% configuration %} +address: + description: Ethereum wallet address to watch. + required: true + type: string +name: + description: The name of the sensor used in the frontend. + required: false + type: string + default: Ethereum Balance +{% endconfiguration %} -- **address** (*Required*): Ethereum wallet address to watch. -- **name** (*Optional*): The name of the sensor used in the frontend. diff --git a/source/_components/sensor.fixer.markdown b/source/_components/sensor.fixer.markdown index 3a555f2c254..220619cf301 100644 --- a/source/_components/sensor.fixer.markdown +++ b/source/_components/sensor.fixer.markdown @@ -27,9 +27,19 @@ sensor: target: CHF ``` -Configuration variables: - -- **target** (*Required*): The symbol of the target currency. -- **name** (*Optional*): Name to use in the frontend. -- **base** (*Optional*): The symbol of the base currency. Default to USD - +{% configuration %} +target: + description: The symbol of the target currency. + required: true + type: string +name: + description: Name to use in the frontend. + required: false + type: string + default: Exchange rate +base: + description: The symbol of the base currency. + required: false + type: string + default: USD +{% endconfiguration %} diff --git a/source/_components/sensor.openexchangerates.markdown b/source/_components/sensor.openexchangerates.markdown index 63e94b74a85..14340a44711 100644 --- a/source/_components/sensor.openexchangerates.markdown +++ b/source/_components/sensor.openexchangerates.markdown @@ -28,9 +28,24 @@ sensor: quote: EUR ``` -Configuration variables: +{% configuration %} +name: + description: The name of the sensor. + required: false + type: string + default: Exchange Rate Sensor +api_key: + description: "The API Key for [Open Exchange Rates](https://openexchangerates.org)." + required: true + type: string +quote: + description: The symbol of the quote or target currency. + required: true + type: string +base: + description: The symbol of the base currency. + required: false + type: string + default: USD +{% endconfiguration %} -- **api_key** (*Required*): API Key for [Open Exchange Rates](https://openexchangerates.org). -- **quote** (*Required*): The symbol of the quote or target currency. -- **name** (*Optional*): Name to use in the frontend. -- **base** (*Optional*): The symbol of the base currency. Defaults to USD. diff --git a/source/_components/sensor.ripple.markdown b/source/_components/sensor.ripple.markdown index 1db3abc0979..ad960c30e53 100644 --- a/source/_components/sensor.ripple.markdown +++ b/source/_components/sensor.ripple.markdown @@ -25,7 +25,15 @@ sensor: address: 'r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV' ``` -Configuration variables: +{% configuration %} +address: + description: Ripple wallet address to watch. + required: true + type: string +name: + description: Name for the sensor to use in the frontend. + required: false + type: string + default: Ripple Balance +{% endconfiguration %} -- **address** (*Required*): Ripple wallet address to watch -- **name** (*Optional*): Name for the sensor to use in the frontend. diff --git a/source/_components/sensor.yahoo_finance.markdown b/source/_components/sensor.yahoo_finance.markdown index f6f8fdb8568..de79cc87bd3 100644 --- a/source/_components/sensor.yahoo_finance.markdown +++ b/source/_components/sensor.yahoo_finance.markdown @@ -24,10 +24,18 @@ sensor: - platform: yahoo_finance ``` -Configuration variables: - -- **name** (*Optional*): The name of the sensor. If not specified, it defaults to *Yahoo Stock*. -- **symbols** array (*Optional*): List of stock market symbols for given companies. If not specified, it defaults to *Yahoo (YHOO)*. +{% configuration %} +name: + description: The name of the sensor. + required: false + type: string + default: Yahoo Stock +symbols: + description: List of stock market symbols for given companies. + required: false + type: string, list + default: YHOO +{% endconfiguration %} ## {% linkable_title Examples %}