diff --git a/components/text_sensor/index.rst b/components/text_sensor/index.rst index c2a643442..d5379c67d 100644 --- a/components/text_sensor/index.rst +++ b/components/text_sensor/index.rst @@ -142,6 +142,25 @@ Search the current value of the text sensor for a string, and replace it with an The arguments are a list of substitutions, each in the form ``TO_FIND -> REPLACEMENT``. +``map`` +******* + +Lookup the current value of the text sensor in a list, and return the matching item if found. +Does not change the value of the text sensor if the current value wasn't found. + + +.. code-block:: yaml + + # Example configuration entry + - platform: template + # ... + filters: + - map: + - high -> On + - low -> Off + +The arguments are a list of substitutions, each in the form ``LOOKUP -> REPLACEMENT``. + ``lambda`` **********