File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ class TuyaLinkWizard {
8686
8787 debug ( 'Token: ' , token ) ;
8888
89- this . device . registerSmartLink ( { region : this . region ,
89+ this . device . registerSmartLink ( { region : token . region ,
9090 token : token . token ,
9191 secret : token . secret ,
9292 ssid,
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ class TuyaLink {
3535 * @param {String } options.wifiPassword
3636 * password of WiFi
3737 * @example
38- * device.registerSmartLink({region: 'us ',
38+ * device.registerSmartLink({region: 'AZ ',
3939 * token: '00000000',
4040 * secret: '0101',
4141 * ssid: 'Example SSID',
@@ -46,7 +46,7 @@ class TuyaLink {
4646 */
4747 async registerSmartLink ( options ) {
4848 // Check arguments
49- if ( options . region . length !== 2 || ! [ 'us ' , 'cn ' , 'eu ' ] . includes ( options . region ) ) {
49+ if ( options . region . length !== 2 || ! [ 'AZ ' , 'CN ' , 'EU ' ] . includes ( options . region ) ) {
5050 throw new Error ( 'Invalid region' ) ;
5151 }
5252
@@ -143,7 +143,7 @@ class TuyaLink {
143143 * lengths.
144144 * @param {Object } options options
145145 * @param {String } options.region
146- * two-letter region (us =Americas, cn =Asia, eu =Europe)
146+ * two-letter region (AZ =Americas, CN =Asia, EU =Europe)
147147 * @param {String } options.token token
148148 * @param {String } options.secret secret
149149 * @param {String } options.ssid SSID
You can’t perform that action at this time.
0 commit comments