diff --git a/plugin.py b/plugin.py index 6dca122..8e515be 100755 --- a/plugin.py +++ b/plugin.py @@ -5,7 +5,7 @@ #pylint: disable=line-too-long, invalid-name, undefined-variable, global-at-module-level """ - +

Hygrostat


Implementation of an hygrostat as a Domoticz Plugin. @@ -227,7 +227,7 @@ def onCommand(Unit, Command, Level, Color): #NOSONAR def get_temp_devide_info(idx): """Get data from temp/hum devide idx""" - res = domoticz_api(f"type=devices&rid={idx}") + res = domoticz_api(f"type=command¶m=getdevices&rid={idx}") name = res['result'][0]['Name'] temp = res['result'][0]['Temp'] last_update = res['result'][0]['LastUpdate'] @@ -244,7 +244,7 @@ def get_temp_devide_info(idx): def get_switch_device_info(idx): """Get data from switch devide idx""" - res = domoticz_api(f"type=devices&rid={idx}") + res = domoticz_api(f"type=command¶m=getdevices&rid={idx}") name = res['result'][0]['Name'] status = False if res['result'][0]['Status'] == "Off" else True Domoticz.Debug(f"Device #{idx}: {name} / Status={status}")