Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid area code #565

Closed
americobarros opened this issue Oct 6, 2023 · 2 comments
Closed

Invalid area code #565

americobarros opened this issue Oct 6, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@americobarros
Copy link

The area code matcher may not be working properly. I have updated to 1.1.4 and I am using area code 1, and I keep getting "Invalid area code AZ, must be one of AY, EU, US". Downgrading to 1.1.3 make it work.

Steps To Reproduce

  1. Set area code to "1"
  2. Retry auth
  3. See console

Plugin Version
1.1.4

Homebridge Config

  "name": "TuyaWebPlatform",
           "options": {
               "username": "------",
               "password": "--------",
               "countryCode": 1,
               "platform": "tuya"
           },
           "defaults": [
               {
                   "device_type": "form"
               }
           ],
           "scenes": false,
           "_bridge": {
               "username": "-------",
               "port": 34138
           },
           "platform": "TuyaWebPlatform"

Device Config

{ 'header': {'code': 'SUCCESS', 'payloadVersion': 1},
'payload': { 'devices': [ { 'data': {'online': True, 'state': False},
'dev_type': 'switch',
'ha_type': 'switch',
'icon': 'https://images.tuyaus.com/smart/icon/bay1588900714943KlYF/1589188786cafbef5f7af.jpg',
'id': 'ebb335a847tk',
'name': 'Living Room Fan'},
{ 'data': { 'brightness': '1000',
'color_mode': 'white',
'color_temp': 11588,
'online': False,
'state': 'true'},
'dev_type': 'light',
'ha_type': 'light',
'icon': 'https://images.tuyaus.com/smart/icon/ay1545812972898u8wAi/158504523520e541bb089.jpg',
'id': '238cfd10',
'name': 'Kitchen White 2'},
{ 'data': {'online': True, 'state': False},
'dev_type': 'switch',
'ha_type': 'switch',
'icon': 'https://images.tuyaus.com/smart/icon/bay1588900714943KlYF/1589188786cafbef5f7af.jpg',
'id': 'eb8af2b9deb26aiw',
'name': 'Bed Fan'},
{ 'data': { 'brightness': '1000',
'color_mode': 'white',
'color_temp': 11588,
'online': False,
'state': 'true'},
'dev_type': 'light',
'ha_type': 'light',
'icon': 'https://images.tuyaus.com/smart/solution/143006/37e69c2be34b7642_cover.png',
'id': 'eb8b18028eddqlye',
'name': 'Colour Kitchen 2'},
{ 'data': { 'brightness': '1000',
'color_mode': 'white',
'color_temp': 11588,
'online': False,
'state': 'true'},
'dev_type': 'light',
'ha_type': 'light',
'icon': 'https://images.tuyaus.com/smart/solution/143006/37e69c2be34b7642_cover.png',
'id': 'ebfac0dc83360e16a9p6gi',
'name': 'Colour Kitchen'},
{ 'data': { 'brightness': '1000',
'color_mode': 'white',
'color_temp': 11588,
'online': False,
'state': 'true'},
'dev_type': 'light',
'ha_type': 'light',
'icon': 'https://images.tuyaus.com/smart/icon/ay1545812972898u8wAi/158504523520e541bb089.jpg',
'id': '2380821428f',
'name': 'Kitchen White'},
{ 'data': {},
'dev_type': 'scene',
'ha_type': 'scene',
'id': 'mA8BUxY209tTPySp',
'name': 'If WiFi Temperature & Humidity '
'Sensor Temperature : <68.0℉'},
{ 'data': {},
'dev_type': 'scene',
'ha_type': 'scene',
'id': 'O1dAYpRaq',
'name': 'Temp & Humidity >72.0℉ or >55%'},
{ 'data': {},
'dev_type': 'scene',
'ha_type': 'scene',
'id': 'BQ3wb5GuN1pX38Nf',
'name': 'If Washing Machine Leak Sensor '
'Flooding Detection State : '
'Flooding Alarm'},
{ 'data': {},
'dev_type': 'scene',
'ha_type': 'scene',
'id': '9qT8pafURyAT',
'name': 'Water Leak'},
{ 'data': {},
'dev_type': 'scene',
'ha_type': 'scene',
'id': '1HTk5oDX',
'name': 'Kitchen Lights Changing'}],
'scenes': []}}

Additional Context

@americobarros americobarros added the bug Something isn't working label Oct 6, 2023
@milo526
Copy link
Owner

milo526 commented Oct 6, 2023

Thank you for notifying me of this problem;

This should be fixed in v1.1.5 (9e0ed9c) which I just released; could you please verify?

(It's getting late in my timezone, so I will probably take some time to respond)

@americobarros
Copy link
Author

Seems to be working well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants