Page 1 of 1

How to update a Dummy value with dzvents

Posted: Sunday 24 April 2022 18:19
by watchmyhome
How to save the Lux_East Value to a Dummy device?

return
{
on =
{
timer =
{
'every minute',
},
},


execute = function(dz, device)
Lux_East = dz.utils.round(math.exp(dz.devices(142).temperature/10) , 0 ) --1-wire sensor idx 142 is reporting temperature and need to be converted to Lux
dz.log(Ost)
end
}

Re: How to update a Dummy value with dzvents

Posted: Monday 25 April 2022 19:15
by hestia

Code: Select all

dz.devices(theDummyDeviceId).updateLux(Lux_East)

Re: How to update a Dummy value with dzvents

Posted: Monday 25 April 2022 19:52
by watchmyhome
thx, easier than expected :)

Re: How to update a Dummy value with dzvents

Posted: Monday 25 April 2022 21:51
by hestia
:)