Skip to content

Commit

Permalink
v2.2.2:
Browse files Browse the repository at this point in the history
- fetching V1 Thinq devices has been failing, fixed now.
  • Loading branch information
majki09 committed Aug 21, 2024
1 parent b810507 commit 2d7448d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
18 changes: 11 additions & 7 deletions example.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,18 @@ def authenticate(gateway):
def ls(client):
"""List the user's devices."""

thinq1_devices = [dev for dev in client.devices if dev.platform_type == "thinq1"]
thinq2_devices = [dev for dev in client.devices if dev.platform_type == "thinq2"]
try:
thinq1_devices = [dev for dev in client.devices if dev.platform_type == "thinq1"]

if len(thinq1_devices) > 0:
print("\nthinq1 devices: {}".format(len(thinq1_devices)))
print("WARNING! Following devices are V1 LG API and will likely NOT work with this domoticz plugin!\n")
for device in thinq1_devices:
print("{0.id}: {0.name} ({0.type.name} {0.model_id} / {0.platform_type})".format(device))
if len(thinq1_devices) > 0:
print("\nthinq1 devices: {}".format(len(thinq1_devices)))
print("WARNING! Following devices are V1 LG API and will likely NOT work with this domoticz plugin!\n")
for device in thinq1_devices:
print("{0.id}: {0.name} ({0.type.name} {0.model_id} / {0.platform_type})".format(device))
except TypeError:
print("No thinq1 devices found or there was some LG server error.")

thinq2_devices = [dev for dev in client.devices if dev.platform_type == "thinq2"]

print("\nthinq2 devices: {}".format(len(thinq2_devices)))
if len(thinq2_devices) > 0:
Expand Down
2 changes: 1 addition & 1 deletion plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Author: majki
#
"""
<plugin key="LG_ThinQ" name="LG ThinQ" author="majki" version="2.2.1" externallink="https://github.com/majki09/domoticz_lg_thinq_plugin">
<plugin key="LG_ThinQ" name="LG ThinQ" author="majki" version="2.2.2" externallink="https://github.com/majki09/domoticz_lg_thinq_plugin">
<description>
<h2>LG ThinQ domoticz plugin</h2><br/>
Plugin uses LG API v2. All API interface (with some mods) comes from <a href="https://github.com/no2chem/wideq"> github.com/no2chem/wideq</a>.<br/><br/>
Expand Down

0 comments on commit 2d7448d

Please sign in to comment.