Added new filters for templates (#7699)

* Added new filters for templates

* Minor fixes
This commit is contained in:
Pascal Vizeli 2018-12-01 11:47:19 +01:00 committed by Fabian Affolter
parent 4435f2be3e
commit b008b0f084

View File

@ -94,6 +94,9 @@ Home Assistant adds extensions to allow templates to access all of the current s
- Filter `regex_findall_index(string, find='', index=0, ignorecase=False)` will find all regex matches of find in string and return the match at index (findall returns an array of matches).
- Filter `bitwise_and(value_one, value_two)` perform a bitwise and(&) operation with two values.
- Filter `bitwise_or(value_one, value_two)` perform a bitwise or(\|) operation with two values.
- Filter `base64_encode` convert given value to a Base64 encoded string.
- Filter `base64_decode` convert given Base64 value to a regulary string.
- Filter `ordinal` convert a number into a speakable ordinal text.
[strp-format]: https://docs.python.org/3.6/library/datetime.html#strftime-and-strptime-behavior