Page 1 of 1

Does lua script trigger devicechanged?

Posted: Thursday 11 February 2021 11:41
by darrepac
Hi

I don't remember if a LUA script could trigger a devicechanged of a device:
if I change a value in a LUA script (in my case, I change the setpoint of a thermostat like this: commandArray['UpdateDevice'] = idx .. '|0|' .. consigneECSbas), does it trigger the devicechanged of this device. Cause I have an other script that effectively send the command on my device when the devicechanged. It works well when I change manually the setpoint of the device but not when I change it through a script... may-be it is normal!

thx

Re: Does lua script trigger devicechanged?

Posted: Thursday 11 February 2021 11:50
by jvdz
darrepac wrote: Thursday 11 February 2021 11:41 ... may-be it is normal!
Yes it is normal as you are already in a script triggering the Thermostat to update, so you can also handle the rest of the required logic.

Re: Does lua script trigger devicechanged?

Posted: Thursday 11 February 2021 11:54
by darrepac
thanks