(17.03.2020, 09:03)admin Wrote: The code inside "if" won't execute because value variable is never defined in your code:
Code:if value then
value1 = grp.getvalue('20/2/2') -- this is 09.001 type
log(value1)
grp.update('40/1/1', value1)
end
admin, yes now I know now mistake in my example, but I mean that for my group with 09.001 type your example not working. To this group I save data from 1-wire sensor.. Why it could be??
Code:
if event.getvalue() > grp.getvalue('40/1/1') then
grp.update('40/1/1', event.getvalue())
grp.update('40/1/2', os.date('%A %d %B %H:%M'))
end
Finally found problem - group was not created correctly - group number Now all working