Skip to content

Commit b80d69c

Browse files
mathewpetersonfabaff
authored andcommitted
Updates round filter documentation (home-assistant#2159)
Updates round filter documentation to include the 'method' argument.
1 parent 40423cb commit b80d69c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/_docs/configuration/templating.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Home Assistant adds extensions to allow templates to access all of the current s
8080
- `relative_time(timestamp)` will format the date time as relative time vs now (ie 7 seconds)
8181
- `float` will format the output as float.
8282
- `strptime(string, format)` will parse a string to a datetime based on a [format][strp-format].
83-
- Filter `round(x)` will convert the input to a number and round it to `x` decimals.
83+
- Filter `round(x, method='common')` will convert the input to a number and round it to `x` decimals. A method can be 'common', 'ceil', or 'floor'. If you don’t specify a method 'common' is used.
8484
- Filter `timestamp_local` will convert an UNIX timestamp to local time/data.
8585
- Filter `timestamp_utc` will convert an UNIX timestamp to UTC time/data.
8686
- 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).

0 commit comments

Comments
 (0)