diff --git a/source/_topics/templating.markdown b/source/_topics/templating.markdown index 10f4ff6615a..ff637a5b8af 100644 --- a/source/_topics/templating.markdown +++ b/source/_topics/templating.markdown @@ -80,6 +80,7 @@ Home Assistant adds extensions to allow templates to access all of the current s - Filter `round(x)` will convert the input to a number and round it to `x` decimals. - Filter `timestamp_local` will convert an UNIX timestamp to local time/data. - Filter `timestamp_utc` will convert an UNIX timestamp to UTC time/data. +- Filter `timestamp_custom(format_string, local_boolean)` will convert an UNIX timestamp to a custom format, the use of a local timestamp is default, supporting [Python format options](https://docs.python.org/3/library/time.html#time.strftime). ## {% linkable_title Examples %} @@ -199,4 +200,5 @@ It depends per component or platform but it is common to be able to define a tem # Timestamps {% raw %}{{ value_json.tst | timestamp_local }}{% endraw %} {% raw %}{{ value_json.tst | timestamp_utc }}{% endraw %} +{% raw %}{{ value_json.tst | timestamp_custom('%Y' True) }}{% endraw %} ```