Update API json.htm
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
#pylint: disable=line-too-long, invalid-name, undefined-variable, global-at-module-level
|
||||
"""
|
||||
<plugin key="Hygrostat" name="Hygrostat" author="fjumelle" version="2.0.0" wikilink="" externallink="">
|
||||
<plugin key="Hygrostat" name="Hygrostat" author="fjumelle" version="2.1.0" wikilink="" externallink="">
|
||||
<description>
|
||||
<h2>Hygrostat</h2><br/>
|
||||
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}")
|
||||
|
||||
Reference in New Issue
Block a user