Hi, first post here from a new user.
I have Ener-J lights throughout my home all working well through Apilio and the Tuya/Smartlife integrations.
I have recently purchased a light sensor (BENEXMART model on Amazon).
I setup the device in the Smart Life app and it’s detecting light conditions without any issue (a LUX reading from 0 to 1000 where 0 is dark and 1000 is very bright light).
So my scenario is that I have the light sensor in my hallway and if the LUX reading goes below let’s say 30lux (which means it’s dark) I want to switch on the hall lights.
I’ve created a boolean “is_hallway_dark” which gets updated by a condition.
The condition is configured based on the lux value of the TUYA light sensor being less than a value of 30 (so it’s reading the light sensor value).
I have a logicblock that uses a CRON based time trigger (every 15mins) and checks if the “is_hallway_dark” boolean is True. If it is then set a scene in TUYA/Smart Life using Apilio.
It all works well however my question is about the rate of change of the sensor values.
I see event logs every couple of seconds now as the light reading is constantly changing by 1 or 2 lux.
While my logic block is only set to trigger every 15mins in order to limit the amount of “work” being done I’m a bit concerned by the amount of times the condition is being evaluated due to the rapid changes in the light sensor values.
I’ve tried using the delay option in the condition for 5min to see if it slows down the processing but it doesn’t.
I suppose the only way to resolve this would be is there was an option to adjust the sensor calibration but there’s no option to do this on it (e.g. an interpolation type setting to “smooth” reading values).
Do you know if my scenario will cause any issues in terms of system performance based on the rate of condition checking/evaluation being done or is there something I’ve missed that would be a better way to handle this scenario?
Many thanks and sorry for the long-winded post.
Joe