From 1b7b3557ffc774c6d310d0a962a460a96df61b59 Mon Sep 17 00:00:00 2001 From: Alberto Geniola Date: Sat, 27 Jan 2024 15:31:35 +0100 Subject: [PATCH] Fix local example adding missing parameter --- examples/cover.py | 2 +- examples/creds.py | 2 +- examples/dump.py | 2 +- examples/electricity.py | 2 +- examples/light.py | 2 +- examples/list.py | 2 +- examples/local.py | 2 +- examples/readme.py | 2 +- examples/roller_shutter_timer.py | 2 +- examples/sensor.py | 2 +- examples/toggle.py | 2 +- examples/valve.py | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/examples/cover.py b/examples/cover.py index ffbbba30..f3220a3f 100644 --- a/examples/cover.py +++ b/examples/cover.py @@ -11,7 +11,7 @@ async def main(): # Setup the HTTP client API from user-password - http_api_client = await MerossHttpClient.async_from_user_password(email=EMAIL, password=PASSWORD) + http_api_client = await MerossHttpClient.async_from_user_password(email=EMAIL, password=PASSWORD, api_base_url="https://iot.meross.com") # Setup and start the device manager manager = MerossManager(http_client=http_api_client) diff --git a/examples/creds.py b/examples/creds.py index f53c718c..e4ae8888 100644 --- a/examples/creds.py +++ b/examples/creds.py @@ -9,7 +9,7 @@ async def main(): # Setup the HTTP client API from user-password - http_api_client = await MerossHttpClient.async_from_user_password(email=EMAIL, password=PASSWORD) + http_api_client = await MerossHttpClient.async_from_user_password(email=EMAIL, password=PASSWORD, api_base_url="https://iot.meross.com") # Print credentials including device key, which is useful for some HA integrations like Meross LAN. print(http_api_client.cloud_credentials.to_json()) await http_api_client.async_logout() diff --git a/examples/dump.py b/examples/dump.py index 498ff5d9..d42cf131 100644 --- a/examples/dump.py +++ b/examples/dump.py @@ -11,7 +11,7 @@ async def main(): # Setup the HTTP client API from user-password - http_api_client = await MerossHttpClient.async_from_user_password(email=EMAIL, password=PASSWORD) + http_api_client = await MerossHttpClient.async_from_user_password(email=EMAIL, password=PASSWORD, api_base_url="https://iot.meross.com") # Setup and start the device manager manager = MerossManager(http_client=http_api_client) diff --git a/examples/electricity.py b/examples/electricity.py index b7175372..35d31e61 100644 --- a/examples/electricity.py +++ b/examples/electricity.py @@ -11,7 +11,7 @@ async def main(): # Setup the HTTP client API from user-password - http_api_client = await MerossHttpClient.async_from_user_password(email=EMAIL, password=PASSWORD) + http_api_client = await MerossHttpClient.async_from_user_password(email=EMAIL, password=PASSWORD, api_base_url="https://iot.meross.com") # Setup and start the device manager manager = MerossManager(http_client=http_api_client) diff --git a/examples/light.py b/examples/light.py index dead455d..80ca01a4 100644 --- a/examples/light.py +++ b/examples/light.py @@ -12,7 +12,7 @@ async def main(): # Setup the HTTP client API from user-password - http_api_client = await MerossHttpClient.async_from_user_password(email=EMAIL, password=PASSWORD) + http_api_client = await MerossHttpClient.async_from_user_password(email=EMAIL, password=PASSWORD, api_base_url="https://iot.meross.com") # Setup and start the device manager manager = MerossManager(http_client=http_api_client) diff --git a/examples/list.py b/examples/list.py index 2f9616a8..ac9f3413 100644 --- a/examples/list.py +++ b/examples/list.py @@ -10,7 +10,7 @@ async def main(): # Setup the HTTP client API from user-password - http_api_client = await MerossHttpClient.async_from_user_password(email=EMAIL, password=PASSWORD) + http_api_client = await MerossHttpClient.async_from_user_password(email=EMAIL, password=PASSWORD, api_base_url="https://iot.meross.com") # Setup and start the device manager manager = MerossManager(http_client=http_api_client) diff --git a/examples/local.py b/examples/local.py index a1ee2a02..c104b3c0 100644 --- a/examples/local.py +++ b/examples/local.py @@ -11,7 +11,7 @@ async def main(): # Setup the HTTP client API from user-password - http_api_client = await MerossHttpClient.async_from_user_password(email=EMAIL, password=PASSWORD) + http_api_client = await MerossHttpClient.async_from_user_password(email=EMAIL, password=PASSWORD, api_base_url="https://iot.meross.com") # Setup and start the device manager manager = MerossManager(http_client=http_api_client) diff --git a/examples/readme.py b/examples/readme.py index 075e069f..a23f10b9 100644 --- a/examples/readme.py +++ b/examples/readme.py @@ -10,7 +10,7 @@ async def main(): # Setup the HTTP client API from user-password - http_api_client = await MerossHttpClient.async_from_user_password(email=EMAIL, password=PASSWORD) + http_api_client = await MerossHttpClient.async_from_user_password(email=EMAIL, password=PASSWORD, api_base_url="https://iot.meross.com") # Setup and start the device manager manager = MerossManager(http_client=http_api_client) diff --git a/examples/roller_shutter_timer.py b/examples/roller_shutter_timer.py index c13a15aa..79f4f830 100644 --- a/examples/roller_shutter_timer.py +++ b/examples/roller_shutter_timer.py @@ -12,7 +12,7 @@ async def main(): # Setup the HTTP client API from user-password - http_api_client = await MerossHttpClient.async_from_user_password(email=EMAIL, password=PASSWORD) + http_api_client = await MerossHttpClient.async_from_user_password(email=EMAIL, password=PASSWORD, api_base_url="https://iot.meross.com") # Setup and start the device manager manager = MerossManager(http_client=http_api_client) diff --git a/examples/sensor.py b/examples/sensor.py index 0e2d05e2..81e25a23 100644 --- a/examples/sensor.py +++ b/examples/sensor.py @@ -10,7 +10,7 @@ async def main(): # Setup the HTTP client API from user-password - http_api_client = await MerossHttpClient.async_from_user_password(email=EMAIL, password=PASSWORD) + http_api_client = await MerossHttpClient.async_from_user_password(email=EMAIL, password=PASSWORD, api_base_url="https://iot.meross.com") # Setup and start the device manager manager = MerossManager(http_client=http_api_client) diff --git a/examples/toggle.py b/examples/toggle.py index 3bd05ba6..b625068c 100644 --- a/examples/toggle.py +++ b/examples/toggle.py @@ -10,7 +10,7 @@ async def main(): # Setup the HTTP client API from user-password - http_api_client = await MerossHttpClient.async_from_user_password(email=EMAIL, password=PASSWORD) + http_api_client = await MerossHttpClient.async_from_user_password(email=EMAIL, password=PASSWORD, api_base_url="https://iot.meross.com") # Setup and start the device manager manager = MerossManager(http_client=http_api_client) diff --git a/examples/valve.py b/examples/valve.py index fc122114..349d81cb 100644 --- a/examples/valve.py +++ b/examples/valve.py @@ -11,7 +11,7 @@ async def main(): # Setup the HTTP client API from user-password - http_api_client = await MerossHttpClient.async_from_user_password(email=EMAIL, password=PASSWORD) + http_api_client = await MerossHttpClient.async_from_user_password(email=EMAIL, password=PASSWORD, api_base_url="https://iot.meross.com") # Setup and start the device manager manager = MerossManager(http_client=http_api_client)