Skip to content

Commit 3b48211

Browse files
committed
add filter
1 parent c1a332f commit 3b48211

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

content/components/text_sensor/_index.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,17 @@ filters:
185185
}
186186
```
187187

188+
### `distinct`
189+
190+
The distinct filter passes through a new text value only when it changes.
191+
If the incoming string is identical to the previously emitted one, it is suppressed.
192+
This is useful to avoid unnecessary updates or MQTT traffic when the text sensor’s value stays the same.
193+
194+
```yaml
195+
filters:
196+
- distinct:
197+
```
198+
188199
## Text Sensor Automation
189200

190201
You can access the most recent state of the sensor in [lambdas](#config-lambda) using

0 commit comments

Comments
 (0)