-
Notifications
You must be signed in to change notification settings - Fork 10
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
Wont run? #6
Comments
you need to run on Python 3.10+ |
try this example I wrote . it's basicaly a refactor without using the login decorator. Region is important so change it to match yours https://github.com/dantimofte/ewelink-api-python/blob/master/main.py
|
client: ewelink.Client = ewelink.Client("your_username", "email_or_phone", region="eu"), first parameter is actually the password. Otherwise works. |
yeah, for some reason they are reversed and couldn't fight the instinct , I edited the code in my comment to reflect your correction. Thank you |
For me there is some issue getting device type:
A quick dirty fix for my unrecognized thermostats:
|
import ewelink @ewelink.login('password', 'eamail')
when I run this code I'm able to print the params but when it comes to device.edit an exception is thrown: Traceback (most recent call last): anybody knows how to fix it? |
Exception has occurred: TypeError
unsupported operand type(s) for |: 'types.GenericAlias' and 'type'
File "C:\Utils\repository\ewelink-monitor\ewelink\models\enumerations.py", line 65, in Power
def getitem(self, channels: tuple[int, ...] | int):
File "C:\Utils\repository\ewelink-monitor\ewelink\models\enumerations.py", line 57, in
class Power(Enum):
The text was updated successfully, but these errors were encountered: