Optimize the last light update logic to ensure that switching fast update mode does not cause a delay in the update. (Thanks to rob_sm7219for for the feedback)
This commit is contained in:
parent
71b88d18f9
commit
8072db6e39
|
|
@ -442,6 +442,7 @@ sensor:
|
|||
return {};
|
||||
}
|
||||
if (id(bh1750_fast_update).state){
|
||||
id(last_illuminance) = x;
|
||||
return x;
|
||||
}
|
||||
if (abs(id(last_illuminance) - x) > 1){
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user