From 3b48211cbd84ad0267135be7cb845183d47f3ac1 Mon Sep 17 00:00:00 2001 From: Petr Kejval Date: Thu, 9 Oct 2025 14:45:34 +0200 Subject: [PATCH] add filter --- content/components/text_sensor/_index.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/content/components/text_sensor/_index.md b/content/components/text_sensor/_index.md index 1b15ba827a..d970f21811 100644 --- a/content/components/text_sensor/_index.md +++ b/content/components/text_sensor/_index.md @@ -185,6 +185,17 @@ filters: } ``` +### `distinct` + +The distinct filter passes through a new text value only when it changes. +If the incoming string is identical to the previously emitted one, it is suppressed. +This is useful to avoid unnecessary updates or MQTT traffic when the text sensor’s value stays the same. + +```yaml +filters: + - distinct: +``` + ## Text Sensor Automation You can access the most recent state of the sensor in [lambdas](#config-lambda) using