From 29efb1f7b178256877d7be73863c0cb4597b4fbb Mon Sep 17 00:00:00 2001 From: Klaas Schoute Date: Wed, 17 Oct 2018 11:50:15 +0200 Subject: [PATCH] Update Pilight switch component configuration variable (#6883) --- source/_components/switch.pilight.markdown | 36 +++++++++++++++++----- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/source/_components/switch.pilight.markdown b/source/_components/switch.pilight.markdown index d70f748cfa5..40bdbd0a86b 100644 --- a/source/_components/switch.pilight.markdown +++ b/source/_components/switch.pilight.markdown @@ -37,14 +37,34 @@ switch: 'off': 1 ``` -Configuration variables: - -- **switches** array (*Required*): The list that contains all command switches. - - **[entry]** (*Required*): Name of the command switch. Multiple entries are possible. - - **on_code** (*Required*): The code to turn the device on. - - **off_code** (*Required*): The code to turn the device off. - - **on_code_receive** (*Optional*): If given, this command will turn the switch on if it is received by pilight. - - **off_code_receive** (*Optional*): If given, this command will turn the switch off if it is received by pilight. +{% configuration %} +switches: + description: The list that contains all command switches. + required: true + type: string + keys: + entry: + description: Name of the command switch. Multiple entries are possible. + required: true + type: list + keys: + on_code: + description: The code to turn the device on. + required: true + type: list + off_code: + description: The code to turn the device off. + required: true + type: list + on_code_receive: + description: If given, this command will turn the switch on if it is received by pilight. + required: false + type: list + off_code_receive: + description: If given, this command will turn the switch off if it is received by pilight. + required: false + type: list +{% endconfiguration %} Variables for the different codes (`on_code` and `off_code`):