I need simple rule in ESPEasy:
Code: Select all
if lux>1000 and lux<2000 then publish dim 50
if lux>2000 and lux<3000 then publish dim 60
if lux>3000 and lux<4000 then publish dim 70
Moderators: grovkillen, Stuntteam, TD-er
Code: Select all
if lux>1000 and lux<2000 then publish dim 50
if lux>2000 and lux<3000 then publish dim 60
if lux>3000 and lux<4000 then publish dim 70
Not sure about the mqtt part (I don't use it),but rules aremartiniman wrote: ↑23 Apr 2017, 23:24 Hi.
I need simple rule in ESPEasy:
Please help with codeCode: Select all
if lux>1000 and lux<2000 then publish dim 50 if lux>2000 and lux<3000 then publish dim 60 if lux>3000 and lux<4000 then publish dim 70
Code: Select all
On Light#Lux>1000 do // if light levels are above 1000 trigger this event
if [Light#Lux]<2000 // if light levels are above 1000 and below 2000
publish dim 50 // publish 50
endif
Endon
On Light#Lux>2000 do // if light levels are above 2000 trigger this event
if [Light#Lux]<3000 // if light levels are above 2000 and below 3000
publish dim 60 // publish 60
endif
Endon
On Light#Lux>3000 do // if light levels are above 3000 trigger this event
if [Light#Lux]<4000 // if light levels are above 3000 and below 4000
publish dim 70 // publish 70
endif
Endon
Users browsing this forum: No registered users and 45 guests