in my lua script i use this command to recover the temperature and the humidity of a DHT sensor.
line 99 T, RH = otherdevices_svalues['Kitchen']:match("([^;]+);([^;]+)")
However i would like to treat this error i receive when the sensor is disconnect:
Code: Select all
Error: EventSystem: in domoticz/scripts/lua/script_time_thermostathyst.lua:99: attempt to index field 'Kitchen' (a nil value)
For example if a nil value is returned, change by default value and continue to execute the code.