Can you make sure there is only '1' version of the source code online? I currently see a few mentioned in comments from other users, but there is one in the start post which does not seem to be in sync with the wiki. Which is leading?jmleglise wrote:I will update the source code,
By the way, i think there is an error in the Lua script (on the wiki)
Code: Select all
if tonumber(otherdevices_svalues['Lux'])+round(weightedLux,0)>0 -- No update if Lux is already 0. So lastUpdate of the sensor switch will keep the time of day when Lux has reached 0. (Kind of timeofday['SunsetInMinutes'])
then
...
end
Code: Select all
if tonumber(otherdevices_svalues['Lux']) ~= round(weightedLux,0)
then
...
end