From 8072db6e39012c2928c483c6564a60ae38528bfe Mon Sep 17 00:00:00 2001 From: sen Date: Mon, 28 Aug 2023 17:47:43 +0800 Subject: [PATCH] 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) --- 2a/yaml/beta/human-sensor-2a-beta-github.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/2a/yaml/beta/human-sensor-2a-beta-github.yaml b/2a/yaml/beta/human-sensor-2a-beta-github.yaml index 769b60c..8c40cb4 100644 --- a/2a/yaml/beta/human-sensor-2a-beta-github.yaml +++ b/2a/yaml/beta/human-sensor-2a-beta-github.yaml @@ -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){