From 21bc020c1e943a79d4f1dab7eb0efb146b8a16f5 Mon Sep 17 00:00:00 2001 From: David <8933824+durd@users.noreply.github.com> Date: Mon, 22 Jul 2024 10:10:24 +0200 Subject: [PATCH] Update human-sensor-f2-stable-github.yaml Added filters for sensors and a lambda-filter for text-sensor --- f2/yaml/human-sensor-f2-stable-github.yaml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/f2/yaml/human-sensor-f2-stable-github.yaml b/f2/yaml/human-sensor-f2-stable-github.yaml index abb1e53..cb611bf 100644 --- a/f2/yaml/human-sensor-f2-stable-github.yaml +++ b/f2/yaml/human-sensor-f2-stable-github.yaml @@ -148,6 +148,13 @@ text_sensor: icon: "mdi:format-text" entity_category: "diagnostic" internal: False #If Don't Want to See UART Receive Data, Set To True + filters: + - lambda: |- + static std::string last; + if (x == last) + return {}; + last = x; + return x; on_value: lambda: |- if (id(LD1125F_UART_Text).state.substr(0,3) == "occ") { @@ -247,15 +254,14 @@ sensor: unit_of_measurement: "m" accuracy_decimals: 2 filters: # Use Fliter To Debounce - - sliding_window_moving_average: - window_size: 8 - send_every: 2 - - heartbeat: 0.2s + - delta: 0% - platform: bh1750 name: "Illuminance" accuracy_decimals: 1 id: bh1750_light update_interval: 1s + filters: + - delta: 0.1 light: - platform: status_led @@ -415,4 +421,3 @@ number: min_value: 0.5 max_value: 10 step: 0.5 -