mirror of
https://github.com/esphome/esphome.git
synced 2025-10-30 14:43:51 +00:00
Add map filter for text sensors (#2761)
This commit is contained in:
@@ -458,6 +458,16 @@ text_sensor:
|
||||
name: 'Template Text Sensor'
|
||||
lambda: |-
|
||||
return {"Hello World"};
|
||||
filters:
|
||||
- to_upper:
|
||||
- to_lower:
|
||||
- append: "xyz"
|
||||
- prepend: "abcd"
|
||||
- substitute:
|
||||
- Hello -> Goodbye
|
||||
- map:
|
||||
- red -> green
|
||||
- lambda: return {"1234"};
|
||||
- platform: homeassistant
|
||||
entity_id: sensor.hello_world2
|
||||
id: ha_hello_world2
|
||||
|
||||
Reference in New Issue
Block a user